URL Encoder / Decoder
Encode or decode URLs instantly. 100% private.
Output will appear here...Common Encodings
| Character | Encoded |
|---|---|
| Space | %20 |
| ! | %21 |
| # | %23 |
| $ | %24 |
| & | %26 |
| + | %2B |
| / | %2F |
| : | %3A |
| = | %3D |
| ? | %3F |
| @ | %40 |
Quick Examples
URLs can only safely carry a limited set of characters. Spaces, ampersands, question marks, and non-English letters all need to be percent-encoded — like %20 representing a space — before they can be reliably passed as part of a query string or link. Skip this step, and a link can break, or an API silently drops part of the submitted data at the first special character it hits.
This tool encodes plain text into its percent-encoded, URL-safe form, or decodes an already-encoded URL back into readable text, so you can inspect exactly what data a link is actually carrying.
Both directions run using the browser's built-in encoding functions, so results are instant and match exactly how a real browser or server would interpret the same string.
The specific set of 'reserved' characters that need encoding in a URL — like &, ?, #, and space — are reserved precisely because they already have a structural meaning within a URL itself: & separates query parameters, ? starts the query string, and # marks a page fragment. Encoding a literal instance of one of these characters within a value prevents it from being misread as that structural marker.
This is exactly why a search term containing an ampersand, like 'salt & pepper', breaks a naively constructed URL if not encoded first — the server or browser reads the & as starting a new parameter rather than as part of your intended search text.
It's also worth knowing that some characters are technically allowed unencoded in a URL but are still commonly encoded anyway for safety and consistency across different systems that may interpret the URL spec slightly differently — when in doubt, encoding a character that didn't strictly need it rarely causes a problem, while failing to encode one that did can silently break a link.
Step-by-step instructions
- 1
Choose encode or decode
Select whether you're encoding plain text or decoding an existing URL-encoded string.
- 2
Paste your input
Enter the text or the encoded URL fragment.
- 3
Review the output
The converted result updates instantly.
- 4
Copy the result
Copy the encoded or decoded text for use elsewhere.
Common use cases
Building query string parameters
Encode a search term or user input safely before appending it to a URL.
Debugging broken links
Decode a suspicious-looking URL to see exactly what data it's carrying.
API request construction
Ensure values passed as URL parameters won't be misinterpreted by the server.
Sharing links with special characters
Safely encode a URL that includes spaces or symbols before sharing it.
Constructing shareable pre-filled search links
Encode a search query correctly so a shared link opens with the exact intended search term pre-filled.
Tips for best results
- Encode any value you insert into a query string or URL path that might contain spaces, symbols, or non-ASCII characters.
- %20 and + both represent a space, but in different encoding contexts — know which one your target system expects.
- Decode a suspicious link before clicking it if you want to verify its actual destination or parameters first.
- Double-encoding (encoding an already-encoded string) is a common mistake — check your input isn't already encoded first.
- Any reserved character with structural meaning in URLs — &, ?, #, / — needs encoding when it appears as part of a value rather than as the URL's actual structure.
- When building URLs programmatically, use your language's built-in URL encoding function rather than manual string replacement to avoid missing an edge case.
Frequently asked questions
When do I need to encode a URL?
Encode any value inserted into a query string or URL path that might contain spaces, symbols, or non-ASCII characters.
Why does %20 sometimes appear as a plus sign (+)?
Both represent a space, but in different encoding contexts — %20 is standard URL encoding, while + is used in form data encoding.
Is my text sent anywhere during encoding?
No, both encoding and decoding happen locally in your browser using built-in JavaScript functions.
Can I encode an entire URL, not just a parameter?
You can, though typically only the specific parameter values need encoding, not the base URL structure itself.
Why does an ampersand in my search term break a URL?
The ampersand has structural meaning in URLs — it separates query parameters — so an unencoded ampersand within a value gets misread as starting a new parameter.
What are 'reserved characters' in a URL?
Characters like &, ?, #, and / already have structural meaning within a URL's syntax, which is why they need encoding when they appear as part of a value rather than the structure itself.
Is it ever harmful to encode a character that didn't need it?
Rarely — over-encoding a character that was technically already safe almost never causes issues, while failing to encode a character that needed it can silently break a link, so erring toward encoding is generally the safer choice.