URL Encoder / Decoder
Encode & decode percent-encoded URLs, parse a URL into its parts, and handle query strings — live, bulk-capable and 100% in your browser.
Quick Reference
- Space → %20 (or + in query strings)
- ! → %21 # → %23 $ → %24 & → %26
- = → %3D ? → %3F @ → %40
encodeURIComponentencodes everything;encodeURIpreserves: / ? # & =
How to Use the URL Encoder / Decoder
- Choose a tab — Encode to make text URL-safe, Decode to reverse percent-encoding, or Parse URL to break a URL into its parts.
- Pick the encode mode — Full (
encodeURIComponent) for individual values, or Partial (encodeURI) for whole URLs. - Handle spaces — tick "Space → +" for form/query-style encoding, or "+ as space" when decoding form data.
- Go bulk — enable "Per line" to encode or decode many strings at once, one per line.
- Copy, download or swap — results update live; reuse the output as new input with Swap.
What Is URL Encoding?
URL encoding (also called percent-encoding) converts characters that have special meaning in URLs — like spaces, ampersands and question marks — into a transmission-safe format. Each reserved character is replaced with a % followed by its two-digit hexadecimal code, so a space becomes %20 and an ampersand becomes %26. This keeps URLs interpreted correctly by browsers, servers and APIs without breaking.
This tool covers the whole workflow: encoding (full or partial), decoding (with optional +-as-space handling), and a URL parser that splits any link into protocol, host, port, path, query and fragment — with every query parameter decoded into a clean key/value table.
Common Use Cases
Why Choose Our URL Encoder / Decoder
- 🔗 Built-in URL parserBreak any link into protocol, host, path, query and hash instantly.
- ⚙️ Two encode modes
encodeURIComponentandencodeURIfor values vs whole URLs. - ➕ Smart space handlingSwitch between
%20and+for path vs query/form contexts. - 📝 Bulk per-line modeEncode or decode hundreds of strings in one pass.
- ⚡ Live & losslessReal-time conversion that round-trips Unicode and emojis perfectly.
- 🔒 100% privateRuns entirely in your browser — no uploads, no tracking.
Frequently Asked Questions
What's the difference between encodeURI and encodeURIComponent?
encodeURI is for entire URLs and leaves structural characters like : / ? # & = untouched. encodeURIComponent is for individual URL parts (like query-parameter values) and encodes everything except unreserved characters. Use encodeURIComponent for values you insert into a URL; use encodeURI for a full URL string.When should I URL-encode a string?
& ? # = +) or non-ASCII characters (like é, ñ, 中) and you're putting it into a URL. Encoding ensures browsers and servers interpret the URL correctly.Why do spaces become %20 sometimes and + other times?
%20. In query strings (after the ?), spaces are often encoded as + for historical form-submission reasons. Both are valid in their context — use the "Space → +" toggle to choose.