developer utility
URL Encoder
Percent-encode any string for safe use in a URL, query string, or path segment.
What is URL Encoder?
Percent-encode any string for safe use in a URL, query string, or path segment. Everything runs 100% client-side in your browser — no data is ever uploaded to a server, nothing is logged or stored, and the tool is completely free with no signup required.
Quick Answers
- When should I URL-encode a string?
- Encode any text before placing it inside a query string, path segment, or form submission if it contains reserved characters like spaces, &, =, ?, or non-ASCII characters — otherwise the receiving server may misinterpret the URL.
- What's the difference between encodeURIComponent and encodeURI?
- encodeURIComponent escapes nearly all reserved characters and is correct for encoding a single query parameter or path segment. encodeURI leaves characters like / and : untouched because it's meant for encoding a full URL, not a fragment of one.
- Does this tool send my data anywhere?
- No. Encoding and decoding run locally in your browser's JavaScript engine with zero network requests.
All decoding happens entirely in your browser. No data is ever sent to a server — nothing you paste here is transmitted, logged, or stored.
Frequently asked questions
When should I URL-encode a string?
Encode any text before placing it inside a query string, path segment, or form submission if it contains reserved characters like spaces, &, =, ?, or non-ASCII characters — otherwise the receiving server may misinterpret the URL.
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes nearly all reserved characters and is correct for encoding a single query parameter or path segment. encodeURI leaves characters like / and : untouched because it's meant for encoding a full URL, not a fragment of one.
Does this tool send my data anywhere?
No. Encoding and decoding run locally in your browser's JavaScript engine with zero network requests.
Quick comparison
URL encoding vs percent-encoding — what the tool does
URL encoding (also called percent-encoding) replaces unsafe characters in a URL with a % followed by their two-digit hex code. It guarantees a query string or path segment is transmitted exactly as intended.
| Aspect | Encoded URL | Raw URL |
|---|---|---|
| Spaces | Become %20 (or + in query strings) | Broke or ambiguous in most clients |
| Reserved chars | Escaped as %XX | Can change the meaning of the URL |
| Unicode | Encoded as UTF-8 bytes | Not transmitted reliably |
| Server parsing | Predictable and correct | Error-prone |
| Readability | Less readable to humans | Readable but unreliable |
How to encode or decode a URL in 3 steps
URL encoding (percent-encoding) replaces unsafe characters like spaces, & and = with %-codes so they can live safely inside a URL or query string.
- 1Paste your text or encoded URL into the input box.
- 2Pick the mode: Encode turns plain text into a URL-safe string; Decode restores an encoded URL back to readable form.
- 3Copy the result into your link, redirect target, or query parameter. You can run the same value through both modes to round-trip it.