Enter a URL or string
Paste the text you want to encode or decode.
Use the free URL Decoder & Encoder on CalculatorX for fast local results. Clear formulas, assumptions, and worked examples on the page. Try it free.
Loading tool…
Follow these steps for a clear answer.
Paste the text you want to encode or decode.
Pick the direction that matches your task.
Click Copy next to Result for use in links, redirects, or APIs.
Version 1.0.0 · Last reviewed 2026-07-28
encodeURIComponent(text) · decodeURIComponent(text)URL encoding (percent-encoding) converts special characters in URLs to %XX hex format. Browsers encode URLs automatically; developers encode manually when building query strings, mailto links, and API requests.
Original URL:
https://www.example.com/dev/url-decoder-encoder
Encoded URL:
https%3A%2F%2Fwww.example.com%2Fweb%2Ftools%2Furl-decoder-encoder
| Character | Encoded | Name |
|---|---|---|
| (space) | %20 |
Space |
| ! | %21 |
Exclamation |
| # | %23 |
Hash |
| $ | %24 |
Dollar |
| & | %26 |
Ampersand |
| + | %2B |
Plus |
| / | %2F |
Slash |
| : | %3A |
Colon |
| = | %3D |
Equals |
| ? | %3F |
Question mark |
| @ | %40 |
At sign |
// Encode a component (for query values)
encodeURIComponent("hello world"); // "hello%20world"
// Encode a full URI (preserves :// and /)
encodeURI("https://example.com/path?q=hello world");
decodeURIComponent("hello%20world"); // "hello world"
Key distinctions behind the tool.
In query strings, spaces can be %20 or +. In URL paths, use %20. %20 is always safe.
Encode individual components (query values, path segments), not the entire URL structure (://, / between segments).
No. URL encoding uses %XX for special characters. Base64 encodes binary data as ASCII text.
Browsers encode URLs when you click links or submit forms. Manual encoding is needed when building URLs in code.