URL Encoder and Decoder
Percent-encode or decode URLs, query values and form data, line by line if you like, and see any URL broken into its parts.
- Free, no sign-up
- Runs in your browser
- Sources cited
- A value in a URL (encodeURIComponent)
- A whole URL, keeping / ? & = # (encodeURI)
- Form data, with + for spaces
- Strict RFC 3986, also ! ’ ( ) *
Text is encoded as UTF-8, so accents, other alphabets and emoji work.
Encoded
- Characters
- 91
- % sequences
- 15
URL parts
- Scheme
- https
- Host
- example.com
- Path
- /search
- Fragment
- top
Query parameters
| Name | Value (decoded) |
|---|---|
| q | café crème |
| sort | price desc |
Everything runs in your browser. Nothing you enter is uploaded.
How to use the URL encoder and decoder
Choose encode or decode
The result updates as you type.
Choose what the text is for
A single value inside a URL, a whole URL, HTML form data, or strict RFC 3986. Each leaves different characters alone.
Convert many at once
Turn on “Each line separately” to encode or decode a list.
Read the URL parts
When the input is a full URL, the tool lists its scheme, host, port, path, fragment and every query parameter, decoded.
Copy, download or swap
Copy the result, download it, or send it back to the input to reverse the conversion.
How URL encoding works
RFC 3986 allows only some characters in a URL. Others are written with percent-encoding: each byte of the character, in UTF-8, as % followed by two hexadecimal digits. Letters, digits and - . _ ~ are never encoded. Characters such as / ? & = and # have special meanings, so whether they are encoded depends on where the text goes.
| Mode | Use it for | Leaves alone |
|---|---|---|
| A value in a URL | A query value or path segment | Letters, digits and - _ . ! ~ * ' ( ) |
| A whole URL | A complete address with spaces or accents | Also ; , / ? : @ & = + $ # |
| Form data | Bodies sent by HTML forms | Like a value, but a space becomes + |
| Strict RFC 3986 | Signatures and APIs that need it | Only letters, digits and - . _ ~ |
The first two match JavaScript’s encodeURIComponent and encodeURI, which MDN documents. Form data follows the application/x-www-form-urlencoded format in the URL Standard, where spaces become +. The URL parts are read with the browser’s own URL parser, which follows the same standard.
Worked example
The value “café & crème” becomes caf%C3%A9%20%26%20cr%C3%A8me as a value in a URL, and caf%C3%A9+%26+cr%C3%A8me as form data. The letter é is the bytes C3 A9 in UTF-8, so it is written %C3%A9.
Encoding the whole address https://example.com/a b?q=café as a URL keeps its structure: https://example.com/a%20b?q=caf%C3%A9. Encoding it as a value would also encode the slashes and colon: https%3A%2F%2Fexample.com%2Fa%20b%3Fq%3Dcaf%C3%A9, which only makes sense when the address itself goes inside another URL.
The text it's (fine)! is it's%20(fine)! as a value, but it%27s%20%28fine%29%21 in strict mode. Decoding the value form of “café & crème” gives the original back.
Understanding the result, and common mistakes
- Encoding twice. %20 encoded again becomes %2520. Decode first if the text is already encoded.
- Encoding a whole URL as a value. Slashes and the colon get encoded and the address stops working.
- Using + for spaces in paths. + means a space only in form data; elsewhere use %20.
- Malformed sequences. A % must be followed by two hexadecimal digits, and multi-byte characters need all their bytes. The tool shows the line and position of the first problem.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps the characters that give a URL its structure, such as / ? and &; encodeURIComponent encodes them too, for a single value.
Why is a space sometimes + and sometimes %20?
Form data writes spaces as +; everywhere else in a URL they are %20.
Is my text sent anywhere?
No. Everything runs in your browser.
Can I see the parameters of a long URL?
Yes. Paste the full URL and the tool lists each query parameter, decoded.
Sources
- RFC 3986: Uniform Resource Identifier (URI): Generic SyntaxRFC Editor · retrieved Nov 14, 2026
- URL StandardWHATWG · retrieved Nov 14, 2026
- encodeURIComponent()MDN Web Docs · retrieved Nov 14, 2026
About these results
- Encoding and decoding run in your browser. Nothing you enter is uploaded.