DEV
URL Encoder & Decoder
Percent-encode text so it is safe to put in a URL, or decode a percent-encoded string back to readable text.
INPUT
OUTPUT
How it works
Percent-encoding replaces characters that aren't safe in a URL with a % followed by two hex digits — a space becomes %20. This tool uses the browser's built-in encodeURIComponent / decodeURIComponent (component mode) and encodeURI / decodeURI (full URL mode).
Which mode should I use?
| Mode | Use it for |
|---|---|
| Component | A single value going inside a URL, like a query-string parameter. Encodes reserved characters such as &, = and /. |
| Full URL | An entire URL that should stay structurally intact. Leaves : / ? & = # alone. |
Frequently asked
Why does my decoded text show an error?
A malformed percent-sequence — such as a lone % not followed by two hex digits — can't be decoded. Check for a stray percent sign, or text that was only partly encoded.
Is my text sent anywhere?
No. Encoding and decoding use your browser's built-in functions; nothing is uploaded to a server.