About this tool
Encode a single value with encodeURIComponent rules so characters like &, = and / cannot break a query string, or encode a whole URL with encodeURI, which keeps its structure intact. You can write spaces as + for HTML form encoding. When the input is a link with a query string, its parameters are also listed with decoded values. Everything runs on your device.
How to use URL Encoder
- Paste the text or URL you want to encode.
- Choose whether it is a single value or a complete URL.
- Optionally write spaces as +.
- Copy the encoded result.
Frequently asked questions
encodeURIComponent or encodeURI?
Use encodeURIComponent for one parameter value or path segment. Use encodeURI only for a full URL, because it leaves : / ? & = # untouched.
Should spaces be %20 or +?
%20 works everywhere. + means a space only in query strings sent as application/x-www-form-urlencoded, such as HTML form submissions.
Why do accented letters turn into several %XX codes?
URLs carry bytes, so each character is first converted to UTF-8, and characters like é take two bytes.