Nifty Dev Tools
  1. Home
  2. URL Encode
Encode / Decode

Make text safe for URLs, or turn %20-style escapes back into readable text. Converts as you type.

Text to encode
Encoded

The encoded text will appear here as you type.

What is URL encoding?

URLs may only contain a limited set of characters. Everything else (spaces, accents, emoji, and characters with a special meaning like & or ?) is written as % plus two hex digits for each UTF-8 byte. A space becomes %20, and é becomes %C3%A9. This is also called percent-encoding.

How to use it

  1. Pick Encode or Decode and type or paste. The result updates as you type.
  2. Choose Part of a URL for one value (a search term, a path segment) or Whole URL for a complete address.
  3. Turn on Spaces as + for HTML form data. Swap sends the result back into the input.

Part of a URL or whole URL?

OptionKeepsUse forJavaScript
Part of a URLLetters, digits, - _ . ! ~ * ' ( )One query value or path segment, e.g. a search termencodeURIComponent
Whole URLAlso : / ? # [ ] @ & = + $ ,A complete address that should still work as a linkencodeURI

Spaces as + follows the HTML form format, where a space is written as +. When decoding, it turns + back into spaces.

Example

café & crème
caf%C3%A9%20%26%20cr%C3%A8me

Common errors

  • “%of” isn't a valid escape: a % must be followed by two hex digits. A literal percent sign is written %25.
  • The bytes “%E9” aren't valid UTF-8: the text was encoded in an old encoding like Latin-1, where é was one byte. Today's URLs use UTF-8, where é is %C3%A9.

FAQ

Why didn't “Whole URL” decode %2F?

In whole-URL mode, escapes for characters that have a meaning in URLs (like / as %2F or & as %26) are kept, so the URL's structure doesn't change. Use Part of a URL to decode everything.

Is my text uploaded?

No. Encoding and decoding happen in your browser. See the privacy page.