URL Encoder / Decoder
Encode special characters for use in URLs or decode percent-encoded strings. Runs entirely in your browser.
Encoded result will appear here.
Why URLs Need Encoding
URLs can only contain a limited set of ASCII characters. Characters outside this set — spaces, special symbols, non-ASCII Unicode — must be percent-encoded before inclusion in a URL. Without encoding, a URL containing a space would break because HTTP parsers treat spaces as delimiters. Special characters like &, =, ?, and # have structural meaning in URLs — using them in query parameter values without encoding causes the URL parser to misinterpret the structure.
Percent-Encoding Explained
Percent-encoding replaces each byte of the character's UTF-8 representation with a % followed by two hex digits. A space becomes %20; an ampersand becomes %26; a non-ASCII character like é (U+00E9) is encoded as two bytes in UTF-8 (0xC3 0xA9), becoming %C3%A9. JavaScript's encodeURIComponent() encodes everything except unreserved characters (letters, digits, -, _, ., ~). Use it for encoding query parameter values. encodeURI() preserves structural characters like /, ?, and & — use it for encoding full URLs, not individual parameter values.
Common Developer Pitfalls
Double-encoding is the most common URL encoding bug: encoding an already-encoded string converts %20 into %2520 (encoding the % itself). Always decode before re-encoding. Forgetting to encode query parameter values when constructing URLs programmatically causes broken links when values contain & or =. Use URLSearchParams in JavaScript to construct query strings — it handles encoding automatically and is less error-prone than manual string concatenation.
Sources
ToolHub Pro Editorial Team
Security Standards Reviewers · verified against NIST & IETF standards
Security tools are implemented and checked against published specifications, including NIST SP 800-63B password guidelines, FIPS 140-3 cryptographic module requirements, and the IETF RFCs covering encoding, hashing and key generation (RFC 4648, RFC 6234). Referenced standards are listed on each tool page.
Reviewed by ToolHub Pro Editorial Team, reviewed implementations against NIST, FIPS & IETF references
Editorial standards →Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
Why do spaces become %20 in URLs?
What causes double-encoding errors?
How are non-ASCII characters like Chinese or Arabic encoded in URLs?
Related Tools