I once shared a link to a file named "Q3 report (final) & approved.pdf" and watched it break in spectacular fashion — the ampersand split the URL in two, the parentheses confused the server, and the spaces turned into a mess. The link worked for me and for nobody else. That was my introduction to percent-encoding: URLs can only safely carry a limited set of characters, and everything else — spaces, ampersands, accented letters, emoji — has to be rewritten in a form every browser and server reads the same way. This tool does that rewriting in both directions.
What URL Encoding Is
URL encoding (also called percent-encoding) replaces any character that isn't safe in a web address with a % sign followed by two hexadecimal digits representing the character's code. A space becomes %20, an ampersand becomes %26, a question mark becomes %3F. Non-ASCII characters — accented letters, Chinese, Arabic, emoji — are first converted to their UTF-8 bytes, and each byte is percent-encoded, so a single Chinese character can expand to nine encoded characters.
Why does this matter? Because characters like &, =, ?, and # have structural jobs inside a URL: & separates query parameters, # starts a fragment. If your search term contains a literal & ("fish & chips"), the server reads it as a parameter separator and your query breaks in half. Encoding turns the data & into %26 — inert data instead of structure — and the link survives intact.
encodeURIComponent vs encodeURI
This is the distinction that causes most encoding bugs, and the tool offers both methods because they solve different problems:
| Method | What It Encodes | Use It For |
|---|---|---|
encodeURIComponent | Everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ) | A value inside a URL — query parameters, path segments, form data |
encodeURI | Only unsafe characters; preserves :// / ? # & = | A whole URL that already has structure |
In practice:
encodeURIComponent("hello world & goodbye")
→ hello%20world%20%26%20goodbye
encodeURI("https://example.com/search?q=hello world")
→ https://example.com/search?q=hello%20world
Notice the difference: the component encoder escaped the & (it's data), while the full-URL encoder left ://, ? and = alone (they're structure). Use the wrong one and you either break the URL's structure or leave dangerous characters unescaped. When in doubt: encoding a piece of a URL → component; encoding a complete address → full URL.
How to Use the URL Encoder Decoder
Paste, pick a direction and method, copy the result. The output updates as you type.
Step 1 — Paste your text. A full URL, a query parameter value, form data, or any text with special characters.
Step 2 — Choose Encode or Decode, and the method. Encode converts text to percent-encoded form; Decode reverses %XX sequences back to readable characters. Pick the component method for values and the full-URL method for complete addresses.
Step 3 — Read the result. The encoded or decoded output appears instantly, with character counts showing how much the string grew — useful when you're working near URL length limits (browsers cap URLs around 2,048 characters).
Step 4 — Copy and use. One click copies the result for pasting into code, links, API calls, or redirect targets.
A note on the plus sign: in HTML form data (application/x-www-form-urlencoded), spaces are traditionally written as + rather than %20. When decoding form submissions, treat + as a space; when encoding for general URLs, %20 is correct. Mixing these up is a classic source of "why is there a plus in my search term" bugs.
Common Encoded Characters
| Character | Encoded | Why It Needs Encoding |
|---|---|---|
| space | %20 | Not allowed raw in URLs |
& | %26 | Separates query parameters |
= | %3D | Separates parameter names from values |
? | %3F | Starts the query string |
# | %23 | Starts the fragment |
+ | %2B | Means "space" in form data |
/ | %2F | Separates path segments |
% | %25 | The escape character itself |
Who Uses a URL Encoder Decoder?
Web developers encode query parameters, build redirect URLs, and debug API calls — the most common daily use by far.
SEO and marketing folks fix broken tracking links and UTM parameters, where one unencoded & silently corrupts campaign data.
API testers decode percent-encoded URLs from logs to read the actual parameters that were passed.
Anyone sharing links with spaces, parentheses, or non-English characters encodes them so the link works for every recipient, not just the sender.
Key Features
- Two encoding methods — component encoding for values, full-URL encoding that preserves structure.
- Bidirectional — encode text to percent-form and decode
%XXsequences back. - Real-time conversion — output updates as you type.
- Full UTF-8 support — Chinese, Arabic, emoji, and all Unicode handled correctly.
- Size comparison — see original vs encoded character counts.
- Copy and swap — one-click copy; swap input/output for quick round-trips.
- Private and free — runs entirely in your browser; URLs and tokens never leave your device.
Writing a character as % plus two hexadecimal digits (e.g., space → %20, & → %26). It lets URLs safely carry characters that would otherwise break their structure.
Use encodeURIComponent for a value inside a URL (query parameters, path segments) — it encodes everything structural. Use encodeURI for a complete URL — it preserves ://, /, ?, &, and =.
The server read your literal & as a query-parameter separator, splitting your value in two. Encode it as %26 so it's treated as data.
In HTML form data, + traditionally represents a space. In general URLs, %20 is correct. When decoding form submissions, convert + back to spaces.
They're converted to UTF-8 bytes first, then each byte is percent-encoded. One Chinese character typically becomes nine encoded characters (e.g., %E4%B8%8A).
Yes — paste the encoded URL and decode it. Percent sequences revert to readable characters, revealing the actual query values and redirect targets.
No. Like Base64, it's a reversible encoding with no key and no security — anyone can decode it. It exists for safe transport, not secrecy.
Yes — free, no signup, and nothing you paste leaves your browser.