URL Encoder / Decoder
encodeURIComponent API.Overview
Percent-encode and decode URLs — Component and full-URL — in your browser
Percent-encode text for safe use in URLs, or decode an encoded URL back to readable text. Choose Component scope for a single query value or Full URL scope to keep a complete URL intact. Runs entirely in your browser.
Guide
How to Use
- 1 Choose a direction
Pick the Encode tab to turn text into a percent-encoded string, or the Decode tab to turn a percent-encoded URL back into readable text.
- 2 Select a scope
When encoding, choose Component to escape every reserved character (for a single query value), or Full URL to keep the structural characters — ://, /, ?, & — intact.
- 3 Enter your input
Type, paste, or use the Paste button to pull text from your clipboard. The result updates as you type — there is no button to press.
- 4 Copy or swap the result
Click Copy to put the result on your clipboard. Use Swap to move the result back into the input and flip the direction — handy for verifying a round-trip.
Reference
Component vs Full URL scope
| Scope | API | Escapes | Typical use |
|---|---|---|---|
| Component | encodeURIComponent | All reserved characters, including / ? & = # | A single query-parameter value or path segment |
| Full URL | encodeURI | Only unsafe characters; keeps :// / ? & # | A complete URL that must stay valid and navigable |
Pitfalls
Common Mistakes
-
Encoding a whole URL with Component scope
Component scope escapes the :// and slashes too, breaking the URL. To encode a full URL while keeping it navigable, use Full URL scope — it leaves the structural characters alone.
-
Double-encoding (the %2520 trap)
Encoding already-encoded text turns %20 into %2520, because the % itself is escaped to %25. If the input already contains %XX sequences, decode it instead — the tool flags this for you.
-
Confusing + with a space
In percent-encoding a space is %20. The + sign means a space only in application/x-www-form-urlencoded form data, not in URL paths. This tool follows RFC 3986, so a space always becomes %20.
-
Expecting URL encoding to hide data
Percent-encoding is reversible and uses no key — anyone can decode it. It only makes characters safe to carry in a URL; it is not a way to obscure tokens or secrets.