URL Encode / Decode
Make a string safe to travel inside a URL — or rescue a percent-encoded tangle back into readable text. Component mode for query values, full-URL mode for whole addresses.
Encode or decode
In short
"hello world & more" → hello%20world%20%26%20more. Spaces become %20, reserved characters become %XX — the URL survives the journey intact.
Why URLs need an encoding at all
A URL is a sentence in a strict grammar: certain characters are punctuation with jobs — / separates path segments, ? opens the query, & separates parameters, = binds a name to a value, # marks a fragment. When those same characters appear as data — a search for "fish & chips", a file named "a/b.txt" — the grammar cannot tell data from punctuation, and the URL breaks or silently changes meaning. Percent-encoding is the escape hatch: the character is replaced by % plus its byte value in hex, a form the grammar treats as inert data. The same mechanism carries every character outside plain ASCII — Urdu, emoji, accented letters — as their UTF-8 bytes. Knowing which mode you need is the only real skill: encode a component (one value) with everything reserved escaped; encode a full URL leaving its skeleton intact. This tool's three buttons are exactly those two encodings plus the decoder.
How to use this tool
- Paste the string or URL.
- For a query value or path segment, use Encode component. For a whole address, use Encode full URL.
- To read a percent-encoded string, paste it and press Decode.
- Copy the output.
Privacy: everything runs in your browser; nothing is uploaded.
Frequently asked questions
What is URL encoding?
URLs may only contain a limited set of characters safely, so everything else is written as percent-encoding: a % followed by two hex digits of the character's byte value. A space becomes %20, an ampersand %26, and 'hello world & more' becomes hello%20world%20%26%20more. Without it, the & would be read as a separator and the URL would break.
What is the difference between encoding a component and a full URL?
A component (a query value, a path segment) must encode everything reserved — including /, ?, & and = — because inside a component those characters are data, not structure. A full URL keeps its structure characters intact and encodes only the unsafe ones (spaces, non-ASCII). This tool defaults to component encoding, the stricter and more commonly needed kind; use the full-URL mode when sanitising a complete address someone handed you.
Should spaces be %20 or + in a URL?
Both exist, in different places. In the query string of a form submission (application/x-www-form-urlencoded), a space may be written as +. Everywhere else in a URL, %20 is the correct and unambiguous form. This tool produces %20; when decoding, it accepts both.
How are Urdu and other non-English characters encoded?
As their UTF-8 bytes, each percent-encoded: a single Urdu letter becomes two %XX sequences, which is why a pasted Urdu URL blooms into a long string of percentages. It is correct and reversible — the decoder here restores the original text exactly — but for page addresses, a Roman slug (see the Slug Generator) is far more shareable.
Is my text uploaded?
No. Encoding and decoding run in your browser; nothing is transmitted.