URL Encoder
Encode and decode URL strings.
Input
Auto: EncodingLn 1, Col 11 lines, 49 characters
100 characters
A URL encoder and decoder that fixes what is broken
Paste text or a link and the result updates as you type. It encodes, decodes, repairs damaged input and shows what is inside a link, all without leaving your browser.
- It knows which way to go. Leave the direction on Auto detect. Paste text with
%20or%C3%A9and it decodes, type a sentence or a link and it encodes. Not what you wanted? Switch to Encode or Decode in one click. - Keeps a link working. Paste a full address and Auto switches to Full URL mode, so
https://, slashes,?and&stay in place while spaces and accents are encoded. Existing%XXsequences are never encoded a second time. - The right kind of encoding. Choose Component for one value, Full URL for a link, Form data for HTML forms, where a space is
+, or Everything to encode every character. Strict RFC 3986 mode also encodes! ' ( ) *. - Reads broken and old encodings. A stray
%, a half-finished sequence, a raw space mixed into an encoded string or accents written the old Latin-1 way (%E9) are each explained in plain words. Fix input repairs the text, and Undo brings your original back. - Undoes double encoding. When a result still has
%25or%20in it, the tool says the text was encoded more than once. Turn on Decode repeatedly to unwrap every layer in one step and see how many there were. - Takes a link apart. The Inspect tab splits a link into scheme, host, port, path segments, query and fragment, lists every query parameter with its decoded value, and shows each character that changed with its code point and bytes.
- Ready-to-paste results. Wrap the result as a
name=valuequery parameter, an HTML link or a JSON string. Pick upper or lower case hex, and decode JSON inside a query value with automatic formatting. - Batch mode. Turn on Each line separately to encode or decode a whole list, one link or value per line, and keep the lines aligned.
How this URL tool compares with other online tools
Most online URL encoders apply one fixed rule and stop there. Here is what you usually get from a basic one and what this tool adds.
| Feature | Typical online tool | This tool |
|---|---|---|
| Your data | Some tools send your text to a server. | Everything runs in your browser. Nothing you paste or open is uploaded. |
| Direction | You pick encode or decode, and the wrong choice gives garbage. | Auto detect picks for you, and you can still override it. |
| Whole links | Encodes the colon and slashes too, which breaks the link. | Full URL mode keeps the structure and never double-encodes a %XX that is already there. |
| Encoding types | One fixed behaviour. | Component, Full URL, Form data and Everything, plus strict RFC 3986, %20 or +, and hex case. |
| Broken input | An "URI malformed" error, or silently wrong output. | Names the broken sequence and its position, and repairs it in one click. |
| Double encoding | You decode again and again by hand. | Detects it and decodes every layer at once, reporting how many there were. |
| Accents and old sites | Fails on Latin-1 text such as %E9 or shows garbage. | Reads UTF-8, falls back to Latin-1 with a warning, and can encode as Latin-1 on request. |
| Understanding a link | Shows only the decoded text. | Breaks it into parts and query parameters, and lists every changed character with its bytes. |
| Lists | One value at a time. | Each line separately, for a whole list in one pass. |
How to encode and decode a URL
- Type or paste into the Input box, drop a text file onto it, or press Open file. The badge shows whether it is encoding or decoding.
- Read the result in the Output tab and press Copy, or Download to save it as a text file. When encoding, choose Encode as above the result: Component, Full URL, Form data or Everything.
- If the input has a problem, press Fix input in the card under it. The Issues tab lists everything that was found.
- Open Inspect to see the parts of a link, its query parameters and every character that changed.
- Press Swap (Ctrl or Cmd + Enter) to use the result as the next input, for example to check a round trip. Open Settings for strict mode, plus signs, repeat decoding and output format.
URL encoding questions
Is my data uploaded anywhere?
No. Encoding, decoding, fixing and the link breakdown all run in your browser, and nothing is sent to a server.
What is URL encoding?
A URL can only safely hold letters, digits and a few symbols. Anything else, such as a space, an accent or an ampersand inside a value, is written as a percent sign and two hex digits that give each byte of the character. A space becomes %20, and the letter e with an acute accent becomes %C3%A9.
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it is meant for a single value, such as a query parameter. encodeURI also keeps the characters that give a link its structure: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. This tool calls them Component and Full URL, and Auto picks Full URL when the text starts with https:// or another scheme.
Should a space be %20 or +?
In a path, always %20. In a query string, both are accepted, because HTML forms write a space as +. Auto uses + only in Form data mode, and you can force either one in Settings. When decoding, Auto reads + as a space only after the first ?, so a + in a path is left alone.
What is double encoding?
Text that was encoded twice, so each % became %25. For example %2520 is a space that was encoded twice. It usually happens when a tool encodes a value that was already encoded. Turn on Decode repeatedly in Settings to unwrap every layer.
Why does decoding say a sequence is not valid UTF-8?
Modern links write accents as two or more bytes, such as %C3%A9. Older sites wrote them as a single byte, such as %E9, which is not valid UTF-8. The tool reads those as Latin-1 and warns you. If the result still looks wrong, change the text encoding in Settings.
Which characters never need encoding?
Letters A to Z and a to z, digits 0 to 9, and the four symbols hyphen, period, underscore and tilde. Everything else is either reserved for the structure of a link or has to be encoded.
Why is a percent sign reported as broken?
A % must be followed by exactly two hex digits. A lone %, something like 50% off, or a sequence such as %zz is not valid. The tool keeps it as a plain % when decoding, and Fix input rewrites it as %25.
How big a file can I convert?
Text files up to 5 MB. Very long results are slower to colour in the editor, but the conversion itself stays accurate.