URL Encoder & Decoder
Percent-encode text for URLs or decode it back, live as you type. Paste a full URL to see its parts and query parameters.
Last updated
Component mode encodes every reserved character (like / ? & =) — use it for a single query value or path segment.
Text or URL
Encoded
The result appears here as you type
Keyboard shortcuts:Ctrl ↵Copy resultCtrl SDownloadCtrl KSearch tools
How to use the URL Encoder/Decoder
Choose a direction
Select Encode to make text URL-safe, or Decode to turn percent-encoding back into text.
Pick the scope
Use Component for a single value or path segment, or Full URL to keep characters like / ? & intact.
Paste your text
The result appears instantly. Turn on form encoding if spaces should be written as +.
Inspect the URL
For full URLs, check the breakdown and the query parameter table, and copy any value.
Features
- Live encoding and decoding as you type
- Component mode (encodeURIComponent) or Full URL mode (encodeURI)
- Optional form encoding: spaces become + when encoding, and + becomes a space when decoding
- URL breakdown showing the protocol, host, port, path, fragment and origin
- Query parameter table with decoded values, one-click copy, and quick actions for values that contain a JWT, JSON or a timestamp
- UTF-8 support for non-English characters and emoji
- Clear errors for malformed percent-encoding, and a swap button to reverse the conversion
- Keyboard shortcuts: Ctrl/Cmd + Enter copies the result, Ctrl/Cmd + S downloads it
Is my URL sent anywhere?
No. Encoding, decoding and the URL breakdown use your browser's built-in encodeURIComponent, encodeURI, decodeURIComponent, decodeURI and URL functions. The URLs you paste — including any tokens in their query strings — stay on your device.
Examples
Encode a query value
Component mode encodes characters like & so the value can't break the URL.
Text
fish & chipsEncoded
fish%20%26%20chipsDecode percent-encoded text
Multi-byte UTF-8 sequences decode back to accents and emoji.
Encoded
caf%C3%A9%20%E2%98%95Decoded
café ☕Inspect a URL's query parameters
Paste a full URL to see each parameter decoded in a table.
URL
https://shop.example.com/search?q=red%20shoes&page=2&sort=priceQuery parameters
q = red shoes page = 2 sort = price
Understanding URL encoding
What is URL encoding?
URL encoding, also called percent-encoding (RFC 3986), replaces characters that aren't allowed in a URL — or that have a special meaning there — with a % followed by two hexadecimal digits for each byte of the character's UTF-8 encoding.
space → %20
& → %26
é → %C3%A9
😀 → %F0%9F%98%80Why URL encoding is needed
Some characters structure a URL: ? starts the query string, & separates parameters, = separates a key from its value, # starts the fragment and / separates path segments. If a value contains one of them, it has to be encoded, or the URL will be read differently from what you intended.
Searching for: fish & chips
Broken: /search?q=fish & chips
Correct: /search?q=fish%20%26%20chipsURL encoding vs URL decoding
Encoding turns text into its percent-encoded form so it can be placed safely in a URL; decoding reverses it so you can read it. Apply each exactly once: encoding text that's already encoded produces double encoding — a space becomes %2520 instead of %20 — which is a common source of bugs.
URL components vs complete URLs
| Aspect | Component mode | Full URL mode |
|---|---|---|
| JavaScript function | encodeURIComponent() | encodeURI() |
| Encodes / ? & = # : | Yes | No — they're kept as URL structure |
| Use it for | A single query value or path segment | A whole URL that should keep working |
| Example: a b&c | a%20b%26c | a%20b&c |
Query parameters
The query string is the part of a URL after ?: a list of key=value pairs separated by &. Values are percent-encoded, and HTML forms usually write spaces as +. When you paste a full URL, DevNest lists every parameter with its decoded value (using the browser's URLSearchParams, which also turns + into a space), so a query like ?q=hello+world&a=%C3%A9 reads as hello world and é.
Frequently asked questions
Should spaces be encoded as %20 or +?
In most of a URL, spaces are encoded as %20. In HTML form submissions (application/x-www-form-urlencoded), spaces in the query string are written as +. Turn on form encoding to use + for spaces and to decode + back into spaces.
Which characters are never encoded?
Letters, digits and - _ . ~ are never encoded. encodeURIComponent also leaves ! ' ( ) * unchanged, and encodeURI additionally keeps the characters that give a URL its structure.
Why do I get an error when decoding?
The input contains a % sign that isn't followed by two valid hexadecimal digits, or a sequence that isn't valid UTF-8. A literal percent sign must itself be encoded as %25.
Does URL encoding work with non-English text?
Yes. Characters are encoded as their UTF-8 bytes, so text in any language and emoji can be encoded and decoded.
Is URL encoding the same as encryption?
No. URL encoding only makes text safe to include in a URL. Anyone can decode it, so it provides no security or privacy.