Related Tools
Extend your analytical workflow with adjacent geometric and numeric synthesis modules.
Extend your analytical workflow with adjacent geometric and numeric synthesis modules.
Percent-encoding for global mesh compatibility. Sanitizing reserved character clusters for deterministic data transport.
Full compliance with Uniform Resource Identifier (URI) Generic Syntax. Maps reserved character ranges to hexadecimal byte sequences.
Synthesis occurs within local browser memory. Eliminates XSS injection risks by performing client-side data virtualization.
---
Percent Ratio
0%
Protocol Type
HEX-TRANS
URI Reserved characters (! # $ & ' ( ) * + , / : ; = ? @ [ ]) are percent-encoded to prevent structural parsing ambiguities in the GET stack.
A URL encode / decode calculator answers the question that every web developer, API user, and browser user runs into: “How do I include spaces, question marks, ampersands, or non‑English characters in a URL without breaking it – and how do I convert them back to their original form?”
URL encoding (also called percent‑encoding) converts reserved and unsafe characters into a format that can be safely transmitted over the internet. It works by replacing each special character with a percent sign (%) followed by two hexadecimal digits representing its ASCII (or UTF‑8) value.
For example:
A URL encoder/decoder tool does the conversion automatically. It’s essential when constructing query strings, form submissions, or API calls that contain user input or special characters.
Here’s what most people miss: URLs can only contain a limited set of characters (unreserved: A‑Z, a‑z, 0‑9, - , _ , . , ~). Everything else must be percent‑encoded. The browser usually does this automatically, but if you’re building a URL by hand (e.g., for an API request), you need to encode manually.
When you see %20 in a URL, it’s a space. When you see %C3%A9 in a URL, it’s the UTF‑8 encoded form of the character é. Modern URLs use UTF‑8 encoding.
| Category | Characters | Notes |
|---|---|---|
| Unreserved (safe) | A‑Z, a‑z, 0‑9, -, _, ., ~ | Do not need encoding |
| Reserved (may need encoding) | :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, = | Encode if used as data, not as special meaning |
| Unsafe (should always encode) | space, {, }, |, \, ^, %, (percent itself becomes %25) | Could be misinterpreted |
Example: q=hello world → q=hello%20world (space encoded)
Example: q=hello&world (if & is data, not a separator) → q=hello%26world
The Calculator’s Job
A good URL encoder should take plain text and replace all reserved/unsafe characters with their percent‑encoded equivalents, using UTF‑8 encoding for non‑ASCII characters. The decoder should do the opposite.
Example: Encode “Hello World”
- Space becomes %20
- Result: Hello%20World
Example: Encode “élève” (French)
- UTF‑8 bytes:
- é = C3 A9 → %C3%A9
- l = 6C → l (unchanged)
- è = C3 A8 → %C3%A8
- v = 76 → v
- e = 65 → e
- Result: %C3%A9l%C3%A8ve
Example: Encode a full query string
name=Jean-Pierre & city=Paris
→ name=Jean-Pierre%20%26%20city=Paris
Note: Ampersand (&) is encoded as %26 to distinguish it from the query string separator.
The Calculator’s Job
The calculator should properly handle UTF‑8 characters (including emojis: 😊 → %F0%9F%98%8A).
In HTML forms using the POST method (or GET with query strings), spaces are sometimes encoded as + instead of %20. This is an older convention from the application/x-www-form-urlencoded content type.
| Encoding style | Space encoding | Plus (+) encoding |
|---|---|---|
| Standard URL (percent) | %20 | %2B |
| Form data (obsolete) | + | + (interpreted as space) |
- Modern APIs use percent‑encoding (%20 for spaces). Avoid using + unless you’re dealing with legacy form submissions.
- If you receive a + in a query string, it should be decoded to a space (but only if context indicates form data). A good decoder handles both.
The Calculator’s Job
The tool should offer two modes: “URL percent‑encoding” (RFC 3986) and “form‑data mode” (spaces become +). It should also decode both forms.
Scenario A: Search Query in a URL
You want to include “Paris cafe” in a search URL.
- Incorrect: https://example.com/search?q=Paris cafe (space not allowed)
- Correct: https://example.com/search?q=Paris%20cafe
Scenario B: Multi‑word tag with ampersand
Tag: “Rock & Roll”
- Encoded: Rock%20%26%20Roll (& becomes %26)
Scenario C: Email address in a query parameter
Email: user+tag@example.com
- Encoded: user%2Btag%40example.com (+ becomes %2B, @ becomes %40)
Scenario D: Non‑English characters (UTF‑8)
Text: “München”
- Encoded: M%C3%BCnchen (ü in UTF‑8 is C3 BC → %C3%BC)
Scenario E: Decoding a URL to read user‑friendly text
URL: https://example.com/page?name=Jean-Pierre%20%26%20Fils
- Decoded: https://example.com/page?name=Jean-Pierre & Fils (name parameter value)
When debugging, paste your URL into a decoder to see the original parameter values. Many browsers show decoded text in the address bar, but the actual request uses encoded characters.
| Mistake | Why It's Wrong |
|---|---|
| Encoding the entire URL, including :// and ? | The protocol (http://) and path separators (/) must remain unencoded. Encode only the parameter values and maybe the path if unsafe characters are present. |
| Using + for space in modern API calls | + is not universally interpretable as space in standard URL percent‑encoding. Use %20. |
| Double‑encoding | If you encode %20 again, you get %2520 (the percent sign itself is encoded as %25). This happens when you encode an already encoded string. |
| Not using UTF‑8 for non‑ASCII characters | If you treat é as single byte (as in Latin‑1), you get %E9, which may not be understood by servers expecting UTF‑8. Always use UTF‑8. |
| Decoding with the wrong encoding | Decoding %C3%BC without UTF‑8 would produce two garbage characters instead of ü. Make sure the decoder uses UTF‑8. |
| Forgetting to decode form data properly | Form data may use + for spaces. The decoder should treat + as space unless it’s actually a literal + (encoded as %2B). |
→ Standard: Hello%20World. Form data: Hello+World.
→ UTF‑8: caf%C3%A9. (é = C3 A9)
→ q=example&sort=asc (the %3D becomes =, %26 becomes &).
Then ask:
A URL encode / decode calculator is the essential tool for building safe, standards‑compliant URLs and processing web form data. It converts special characters into percent‑encoded form and back, preserving the intended meaning across the internet.
The best URL encoder/decoder is the one that supports UTF‑8, offers both percent‑encoding and form‑data modes, and clearly distinguishes between reserved and unreserved characters. Whether you’re a web developer, an API tester, or just someone who wants to understand how %20 appears in your browser bar, URL encoding is everywhere – and now you can encode and decode it instantly.
Configuration Matrix
Encode mode:
Decode mode:
Outputs: