URL Encoder / Decoder
Encode or decode URLs and query strings
About URL Encoder / Decoder
Encodes text into URL-safe format (percent-encoding) or decodes an encoded URL back into readable text.
Paste your text or encoded URL, select encode or decode, and the converted result appears immediately.
URL encoding matters most for characters like spaces, ampersands, and special symbols that have specific meaning in a URL's structure — plain alphanumeric text generally doesn't need encoding at all.
Watch: URL Encoder / Decoder in Action
- Does every character need to be URL-encoded?
- No — encoding matters most for characters like spaces, ampersands, and special symbols that have specific meaning in a URL's structure. Plain alphanumeric text generally doesn't need encoding at all.
- What is the difference between Whole URL mode on and off?
- Off, the tool escapes everything except letters, digits and a few marks such as hyphen, underscore, period and tilde, so it is right for one value. On, characters that give a URL its structure, like colon, slash, question mark, ampersand, equals and hash, stay as typed, so a full address is not broken.
- Why did a plus sign turn into a space when I decoded?
- The Decode + as a space checkbox is on by default, and it replaces every plus sign with a space before decoding. That matches how HTML forms write spaces. Untick it if your text contains real plus signs, such as in a phone number or a math expression.
- Why does Decode say Invalid encoded string?
- The browser's decoder rejects a percent sign that is not followed by two hexadecimal digits, and byte sequences that are not valid UTF-8. Look for a stray percent sign, such as a literal 50% in the middle of text, and encode that part first.
- Are spaces encoded as plus signs or as %20?
- Always as %20. The Encode button never writes a plus sign for a space. Many servers accept %20 in both paths and query strings, but if a form handler expects plus signs, replace them yourself after encoding.
- How are accented letters and emoji encoded?
- As UTF-8 bytes, each written as a percent sign and two hex digits. An e with an acute accent becomes %C3%A9, and an emoji becomes four such groups. Decode reverses this, provided the bytes form valid UTF-8.
How to use URL Encoder / Decoder
Type or paste text into the Input box. Press Encode to turn it into percent-encoded text, or press Decode to turn sequences such as %20 back into characters. Nothing converts while you type; the Output box fills only after you press one of the two buttons, and a Copy button then appears beneath it.
Two checkboxes change the behavior. With Whole URL mode off, the tool encodes every character that has a structural meaning in an address, including slash, colon, question mark, ampersand, equals and hash, which suits a single query value or path segment. Turn Whole URL mode on when you are pasting a complete address and want those characters left alone. Decode + as a space is on by default and swaps each plus sign for a space before decoding, which matches form-style query strings. Turn it off when a plus sign in your text is meant literally.
When to use it
Reach for it when you are building a link by hand and a value contains spaces, an ampersand or non-English letters, for example a search phrase you are appending to a query string. It also helps when a log line or redirect shows a long run of %2F and %3D sequences and you want to read the original address, or when you need to see exactly what a browser would send for a given value.
When not to use it
Skip it when the data is binary or has to travel as a Base64 string; that is a different encoding, and a Base64 tool is the right choice. It also cannot tell you whether a link is safe to open, because decoding only reveals characters and says nothing about the destination. When URLs are built inside application code, use your language's own URL library so escaping rules stay consistent.
Tips for best results
Encode each value on its own, then join the pieces with literal ampersands and equals signs; encoding a whole query string in the default mode would also escape those separators and break it. If a decoded result still shows a plus sign where you expected a space, the original was probably written as %2B, which is a real plus. A double-encoded value such as %2520 needs two presses of Decode to reach the original text.
Limitations
Decode stops with the message Invalid encoded string if a percent sign is followed by anything other than two hex digits, or if the bytes do not form valid UTF-8. In Whole URL mode, escapes for reserved characters such as %2F are deliberately left as they are when decoding, so the output can still contain percent sequences. Spaces are always encoded as %20, never as a plus sign, so output aimed at form-style data may need a manual swap.
Privacy
The conversion uses the encodeURIComponent, encodeURI, decodeURIComponent and decodeURI functions built into your browser, so your text is processed on your device and the output is created there. The input is not uploaded. When you press Encode or Decode, the site may log that this tool was used, together with a device identifier, but never the text itself.
Next: Hash Generator
Generate a hash of the result
More from Security & Developer: