Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

URL Encode & Decode

Percent-encode text for URLs and decode it back. Component mode for query values, full mode to keep a URL's structure. UTF-8 safe, runs in your browser.


    

What percent-encoding is

URLs may only contain a limited set of ASCII characters, so anything else — spaces, accented letters, most punctuation — is replaced by a percent sign and the hex value of each UTF-8 byte. A space becomes %20, and é (two UTF-8 bytes) becomes %C3%A9. This tool encodes text that way and decodes it back, and because it works on UTF-8 bytes it handles emoji and non-Latin scripts correctly.

Component vs full

The choice here matters. Component uses encodeURIComponent, which escapes reserved characters like &, =, ?, / and #, so the result is safe to drop into a single query-string value or path segment. Full uses encodeURI, which deliberately leaves those structural characters alone so an entire URL stays usable — it only encodes spaces and other clearly illegal characters.

Worked example

Take the query value name=John Doe&city=São Paulo. In component mode the whole string becomes name%3DJohn%20Doe%26city%3DS%C3%A3o%20Paulo, so the stray = and & cannot be mistaken for field separators. In full mode those symbols survive, which is what you want when you are encoding a complete address rather than one value.

Decoding and common pitfalls

Decoding turns %20 back into a space and %C3%A9 back into é, and it also treats a literal + as a space to match how HTML forms encode query strings. Two things trip people up: double-encoding, where a % that was already escaped to %25 is encoded again and the string drifts; and a lone % not followed by two hex digits, which is malformed and cannot be decoded. If decoding fails, check for a stray percent sign. To escape text for HTML rather than URLs, use HTML Entities; to pull an existing URL apart into its pieces, use URL Parser.

Privacy

All encoding runs locally; nothing is uploaded.

Frequently asked questions

Component or full encoding — which do I use?

Component (encodeURIComponent) for a single value like a query parameter; it escapes &, =, ? and /. Full (encodeURI) for a whole URL you want to keep working; it leaves those structural characters intact.

Does it treat + as a space when decoding?

Yes — the decoder converts + to a space (the form-encoding convention) as well as %20, so pasted query strings decode as expected.

Related tools