Skip to content
Codoryn Search tools

URL Encoder & Decoder

Percent-encode and decode URL components locally, with correct Unicode handling.

What percent-encoding does

URLs may only carry a limited set of ASCII characters. Percent-encoding replaces everything else with a % followed by two hexadecimal digits representing one UTF-8 byte. A space becomes %20; é is two bytes and becomes %C3%A9; an emoji is four bytes and becomes four escapes.

This tool encodes and decodes components — a single query value, a path segment, a fragment. It is the equivalent of encodeURIComponent and decodeURIComponent, so reserved characters such as &, =, ?, / and # are escaped rather than left as structure.

How to use it

  1. Choose Encode or Decode.
  2. Paste your text. Results update as you type for inputs under 256 KB; larger inputs run when you press Run or Ctrl/Cmd + Enter.
  3. Leave Preserve line breaks on to encode each line separately and keep the text readable; turn it off to encode newlines as %0A.

Spaces are %20, not +

Codoryn follows the URI standard: a space encodes to %20, and a literal + encodes to %2B. When decoding, + decodes to a plain +.

The +-means-space convention belongs to HTML form submission (application/x-www-form-urlencoded), not to URIs generally. Treating the two as interchangeable silently corrupts data that legitimately contains a plus sign, so this version does not do it. A separate explicit form-encoding mode may be added later.

Decoding errors

Decoding fails when a % is not followed by two hexadecimal digits, or when the escapes are well-formed but do not spell valid UTF-8.

  • abc% — nothing follows the percent sign.
  • abc%2 — only one digit follows.
  • abc%ZZ — Z is not a hexadecimal digit.
  • %C3%28 — valid escapes, but C3 28 is not a valid UTF-8 sequence.

Each error reports the exact line and column, and the last successful result stays on screen marked as previous output rather than being wiped.

Frequently asked questions

Does my text leave the browser?

No. Encoding and decoding run in your browser, and this tool does not send your input over the network.

Why does encoding an already-encoded string change it again?

Because % is itself a character that must be escaped. Encoding caf%C3%A9 produces caf%25C3%25A9. That is correct — decode once to get back to where you were.

Why are !, ', (, ) and * left alone?

These match encodeURIComponent behaviour exactly. Some contexts prefer them escaped; this tool does not diverge from the platform function.

Is there a size limit?

Inputs above 5 MB are refused in this version.