Free URL Encoder & Decoder
Percent-encode URLs and query parameters. Component or full-URL mode, batch processing, full Unicode support.
Result
What URL encoding is
URLs are only allowed to contain a specific set of ASCII characters — letters, digits, and a few unreserved symbols like -, _, ., and ~. Anything else — spaces, non-Latin letters, special symbols like &, ?, #, or the entire universe of emoji and Unicode — must be percent-encoded before it can appear in a URL. Each character or byte becomes %HH in uppercase hex. A space becomes %20. An ampersand becomes %26. A Chinese character encoded in UTF-8 becomes three or four consecutive percent-encoded bytes. This free URL encoder handles every case, in both component mode (safest, encodes everything) and full-URL mode (preserves structural characters like ://).
How to use the URL encoder
- Pick your mode — Encode (raw → percent-encoded) or Decode (percent-encoded → raw).
- Paste your input. For batch processing, put one URL per line — each is processed independently.
- Choose scope: Component (encodes
?,&,=,/— use for query values) or Full URL (preserves URL structure — use for encoding a whole URL that happens to contain spaces or Unicode). - Click Convert →. The result appears below with a success/error summary.
- Copy or download using the buttons in the result panel.
Component mode vs Full URL mode
| Component (encodeURIComponent) | Full URL (encodeURI) | |
|---|---|---|
Encodes ? & = / : | ✅ Yes — all of them | ❌ No — preserves URL structure |
| Use for | Query parameter values, form data, path segments | Whole URLs that just need spaces/Unicode encoded |
| Example input | hello world & more | https://example.com/?q=hello world |
| Example output | hello%20world%20%26%20more | https://example.com/?q=hello%20world |
| Safe to paste in URL? | Yes — anywhere | Yes — anywhere |
Rule of thumb: If you’re encoding the value of a single query parameter, use Component. If you’re encoding an entire URL string that already contains structure, use Full URL.
Which characters need encoding?
The RFC 3986 “unreserved” set never needs encoding: A–Z, a–z, 0–9, and the four characters - _ . ~. Everything else is either “reserved” (has structural meaning in URLs) or unsafe (some ASCII characters break older systems). Every non-ASCII character (accented letters, Cyrillic, Greek, CJK, emoji) must be UTF-8 encoded first, then each resulting byte percent-encoded.
Common use cases
Building query strings
Every value in ?key=value&key2=value2 must be Component-encoded. A search query like “coffee & donuts” becomes ?q=coffee%20%26%20donuts. Without encoding, the & would split the URL into two separate parameters and mangle the request.
Sharing URLs on social media
When you want to prefill a share dialog with a URL, that URL itself needs to be encoded first: https://twitter.com/intent/tweet?url={encoded URL}. If the URL contains query parameters, those must be encoded within the encoded URL — leading to double-encoded strings like %253F (which decodes to %3F, which decodes to ?).
Debugging URLs from logs
Web server logs and analytics tools often show URLs already percent-encoded. Paste them into Decode mode to see the original human-readable value. Great for tracing weird search-term stats or referrer data.
API request formation
REST APIs that accept parameters in the URL require every user-generated value to be Component-encoded. Failing to do so is a common source of API errors and (worse) request-forgery vulnerabilities.
Google/Bing search URLs
Search-engine result URLs are heavily encoded. Decode them to see what someone actually searched, or encode a query to build a custom search URL programmatically.
The + vs %20 question for spaces
In the pre-Unicode era, HTML forms used + to encode a space in query strings. This survives in some places today: PHP’s urlencode() function still uses +, while rawurlencode() uses %20. JavaScript’s encodeURIComponent() always uses %20, which is the modern standard.
Both are technically valid in query strings, but:
- Use
%20everywhere else — path segments, fragments, headers, JSON +is only for space inapplication/x-www-form-urlencodedquery strings
Our tool uses %20 consistently, which works everywhere.
URL encoder comparison
| Feature | This tool | Browser dev console | Random online sites |
|---|---|---|---|
| Encode / decode both directions | ✅ | ✅ | Usually |
| Component vs Full URL modes | ✅ | Manual choice | Some |
| Batch (one per line) | ✅ | ❌ | Rare |
| Handles Unicode/emoji | ✅ | ✅ | Varies |
| Runs offline | ✅ After first load | ✅ | Some upload |
| Sign-up | Never | N/A | Never |
Pro tips
- When in doubt, Component mode. Over-encoding is safe — receiving software will decode it. Under-encoding breaks URLs.
- Double-encoding is real and sometimes intended. If a URL flows through multiple systems (redirect → tracking → destination), each layer may add its own encoding. To decode fully, run Decode mode multiple times until nothing changes.
- Encode before you concatenate, not after. Building URLs by string concatenation without encoding user input is one of the top web security vulnerabilities. Always encode each variable individually.
- The
#fragment doesn’t get sent to the server. Text after#stays in the browser. But encoding matters if the fragment contains structural characters your JS reads. - File names in URLs need encoding. A file called
Report Final (v2).pdfbecomesReport%20Final%20%28v2%29.pdfin a URL.
Frequently asked questions (FAQs)
In query strings, + historically meant space (from the pre-Unicode era). To send a literal + character, encode it as %2B. Modern APIs generally use %20 for space and reserve + only for math.
Yes. Every non-ASCII character must be UTF-8 encoded first, then each resulting byte percent-encoded. Our tool does this automatically.
The “unreserved” set from RFC 3986: A-Z, a-z, 0-9, and the four characters – _ . ~. Everything else needs encoding when it appears in a URL component.
Yes. Put one URL per line in the input — each line is encoded independently and the results appear line by line in the output.
Different contexts. URL encoding uses %HH sequences to protect URLs. HTML encoding uses entities like < to protect HTML documents. Use the right one — see our HTML Entity Encoder for HTML.
When a URL passes through multiple systems (redirects, tracking, share dialogs), each layer may add its own encoding. Run Decode multiple times until the output stops changing.