URL Encoder / Decoder
URL encode or decode text instantly. Handles %20 spaces, special characters, full URLs, query strings. Free, no signup, runs in your browser.
About URL Encoder / Decoder
URL encoding is one of those things you need maybe once a week — when debugging a redirect, decoding a callback URL from a payment gateway, building an OAuth state parameter, or just reading a query string that someone double-encoded. This tool handles both directions with the choice between encodeURI (full-URI safe) and encodeURIComponent (single-value safe), live status feedback, and a ‘Use as input’ button to chain decode→encode or encode→decode.
Common encoded characters
| Character | Encoded |
|---|---|
| space | %20 |
| ! | %21 |
| ” | %22 |
| # | %23 |
| $ | %24 |
| & | %26 |
| ’ | %27 |
| + | %2B |
| / | %2F |
| : | %3A |
| ? | %3F |
| @ | %40 |
| [ | %5B |
| ] | %5D |
Spaces in form submissions are sometimes encoded as + instead of %20 — both are valid in application/x-www-form-urlencoded. The tool decodes both.
How to use
- Encode: paste plain text → toggle to “Encode” → see the encoded result. Click Copy to grab it.
- Decode: paste URL-encoded text → toggle to “Decode” → see the decoded result.
- Component vs URI: leave “Component” checked when encoding a single query-string value or path segment (this is the safer default). Uncheck it only when you’re encoding a complete URL and need to preserve the structural characters.
Component vs URI in practice
Input: https://example.com/search?q=hello world&lang=en
encodeURI: https://example.com/search?q=hello%20world&lang=en
encodeURIComponent: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den
You want URI mode for the first output (keep the URL working). You want Component mode when you’re putting that whole URL inside another URL as a parameter value.
Free, no signup, runs entirely in your browser.
Frequently asked questions
URL encoding (also called percent-encoding) replaces characters that have special meaning in a URL — like spaces, slashes, question marks, hashes — with a percent sign and two hex digits. A space becomes %20, an at-sign becomes %40, and so on. It's the mechanism that lets URLs carry arbitrary text safely in query strings, anchors, and form submissions.
Whenever text needs to be placed inside a URL and that text could contain characters with reserved URL meaning. Common cases: query string values (?q=hello+world), redirect parameters that contain another URL (?next=https%3A%2F%2Fexample.com), API request bodies sent as application/x-www-form-urlencoded, and OAuth state parameters.
encodeURI is meant for encoding a complete URL — it leaves reserved characters like /, ?, #, and : alone because they have structural meaning. encodeURIComponent is for encoding a single piece of a URL (a query value, a path segment) — it encodes everything that isn't a letter, digit, or one of -_.!~*'(). For most use cases (encoding a value to put inside a query string), you want Component mode.
Probably a double-encoding issue — the text was URL-encoded twice and you're only decoding it once. Try decoding the output again. The opposite case (decoding text that wasn't actually URL-encoded) usually surfaces as a 'URI malformed' error, which the tool flags.