T

URL Encode

Percent-encoding for query parameters and path segments.

Text
Loading editor…
0 B
Percent-encoded
Loading editor…
0 B

URL Encoder & Decoder

Percent-encodes text so it can travel safely inside a URL, and decodes percent-encoded strings back into readable text. A space becomes %20, a forward slash becomes %2F, and any non-ASCII character becomes the percent-encoded form of its UTF-8 bytes.

This is the encoding you need whenever a value goes into a query parameter, and the one to reach for when a URL in a log file is unreadable.

How to use it

  1. Paste a raw value on the left to percent-encode it.
  2. Press Swap to decode a percent-encoded string.
  3. Decode errors are reported rather than ignored, so a truncated escape sequence is visible instead of silently dropped.

Encoding a component versus a whole URL

This converter encodes a component: every reserved character including : / ? # & = is escaped, which is what you want for a single parameter value. Encoding an entire URL this way would destroy its structure by escaping the separators that make it a URL.

So encode values, then assemble them into the URL — not the other way round.

Frequently asked questions

Why did my whole URL get mangled?

Because component encoding escapes the separators too. Encode each parameter value individually and then build the URL around them.

What does %20 versus + mean for spaces?

%20 is the correct percent-encoding for a space anywhere in a URL. The + form is only valid inside application/x-www-form-urlencoded form bodies and query strings, which is why it decodes as a literal + here.

Why does decoding fail with 'invalid percent-encoded sequence'?

A % must be followed by exactly two hexadecimal digits. A truncated or malformed escape is reported rather than passed through, since guessing would produce wrong text.

Related tools

Everything on this page runs in your browser. TurboParse is a static site with no backend, so nothing you paste is uploaded, logged or stored.

Last updated .