URL Encode

Paste your text below and click Encode to percent-encode it for safe use in URLs. All processing happens locally in your browser.

Copied!

What is URL Encoding?

URL encoding (percent-encoding) replaces unsafe characters in a URL with a % followed by two hexadecimal digits. For example, a space becomes %20 and & becomes %26.

Standard mode encodes all special characters - use it when encoding a single value (e.g. a search query). Full URL mode preserves URL-structural characters like :, /, ?, # - use it when encoding an entire URL.

The three modes differ only in which characters they leave alone. Encoding one value leaves nothing reserved untouched, so a slash inside it becomes %2F rather than a path separator. Encoding a whole URL keeps the delimiters that make it a URL. Form encoding follows what a browser sends for an HTML form, where a space becomes a plus sign. You can also pick the character set, which matters because older systems percent-encoded bytes that were not UTF-8.

Debugging something that will not decode?

A payload that will not decode is usually a symptom rather than the fault: a double encoding somewhere in the pipeline, a charset assumed instead of declared, a token signed over bytes that are not quite the bytes anyone expected. We do this kind of work, on integrations, APIs and the systems that pass data between them.

Tell us what is breaking

Frequently Asked Questions

What is URL encoding?
URL encoding, also called percent encoding, replaces a character with a percent sign and the hexadecimal value of each of its bytes. A URL may only carry a small set of characters, so everything else, from a space to an emoji, has to travel in that form.
Should I encode one value or the whole URL?
Encode one value when you are putting text into a query string, a path segment or a fragment, because a slash or an ampersand inside it would otherwise break the URL apart. Encode a whole URL only when you already have a valid one and want to keep the delimiters that give it its structure.
Why does a space sometimes become a plus sign?
Form data follows the x-www-form-urlencoded rules, which write a space as a plus sign. Every other part of a URL writes it as %20. A form parser reads both back as a space, but only %20 is safe inside a path.
Do I ever need a character set other than UTF-8?
Rarely, but it happens. Older applications percent-encoded bytes from Windows-1252, ISO-8859-1 or Shift_JIS, so a value built for one of those systems arrives as nonsense if you assume UTF-8. Pick the character set the other side actually uses.
Is anything sent to your server?
No. The whole page runs in your browser using the standard web platform APIs, so your text never leaves the tab. That makes it safe for tokens, internal URLs and anything else you would not paste into a remote service.