Encoding

URL Encoder & Decoder

Percent-encode text for safe use in URLs, or decode %XX sequences back to readable text.

Guide: URL Encoding: encodeURIComponent vs encodeURI, %20 vs +

Ready.

What it does

URLs may only contain a limited set of characters. Percent-encoding replaces every other character with % followed by its UTF-8 bytes in hexadecimal, so a space becomes %20 and é becomes %C3%A9.

Which mode should I use?

  • Encode component escapes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query value or path segment.
  • Encode full URL keeps characters that give a URL its structure (: / ? # & =) and escapes the rest.
  • Decode reverses percent-encoding. Malformed sequences are reported instead of guessed.

Plus signs

HTML form submissions write spaces as +. Tick "Use + for spaces" to encode that way, or to decode + back to a space.

Examples

Encode component is for a single value, such as one query parameter. This input:

a b&c=d/é?x=1#t

becomes:

a%20b%26c%3Dd%2F%C3%A9%3Fx%3D1%23t

Encode full URL keeps the structure of a URL and escapes only what cannot appear in one:

https://example.com/a b?q=café&x=1#top
→ https://example.com/a%20b?q=caf%C3%A9&x=1#top

Decode reverses it: %E2%9C%93%20ok%2Fdone becomes ✓ ok/done.

Component or full URL? The same as encodeURIComponent and encodeURI

Encode component gives the same result as JavaScript’s encodeURIComponent, and Encode full URL gives the same result as encodeURI. In full-URL mode characters such as ; , @ $ + stay as they are, while square brackets are escaped as %5B and %5D. The rule of thumb is to encode each value on its own with Encode component, and then join the pieces into a URL. Encoding a complete URL in component mode escapes the :// and the ? as well, and the link stops working.

Spaces: %20 or +?

A space is always safe as %20. The plus sign means a space only in form-encoded data, such as the query string of an HTML form, and a literal plus in a URL path is just a plus. Tick “Use + for spaces” to write form-style data: a b+c becomes a+b%2Bc, with the real plus sign escaped as %2B. The same option decodes + back to a space.

Common problems

  • Double encoding. %2520 is an already encoded %20. Decoding it once gives %20, and a second pass gives a space. If you see %25 in a URL, something encoded the text twice.
  • Malformed sequences. A % that is not followed by two hexadecimal digits, as in %E0%A4%A, is reported as “Malformed URL-encoded text (check the % sequences)” instead of being guessed.
  • Non-ASCII text. Letters outside basic ASCII become their UTF-8 bytes, so é is %C3%A9 and an emoji becomes four escaped bytes.

Frequently asked questions

Which characters never need encoding?

The unreserved characters of RFC 3986: letters, digits and the symbols - . _ ~. Everything else is escaped in a query value.

Is URL encoding the same as Base64?

No. Percent-encoding makes text safe inside a URL and keeps it readable. Base64 turns bytes into a different alphabet, and you can try that with the Base64 tool.

Does encoding protect sensitive data?

No. It only changes how characters are written, and anyone can decode it. It is not encryption.

Is my text uploaded?

No. Encoding and decoding run in your browser.

Privacy

This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server.

Share this tool

Your data is not included in this link.