Percent Encoding — URL Encode Special Characters
encodeURIComponent · encodeURI · RFC 3986 — Query Params Table · URL Builder · Batch Mode — 100% browser-side
Paste text → get encoded URL
Real-time · 200ms debounce · No button click needed
Percent encoding is the official name for URL encoding — it replaces unsafe characters with % followed by two hex digits. This tool supports RFC 3986 (the internet standard), encodeURIComponent (JavaScript), and encodeURI. The Diff View highlights exactly which characters were encoded and shows their reference on hover.
What is URL Encoding?
URL encoding (percent encoding) converts special characters into a % followed by two hex digits. For example, a space becomes %20, & becomes %26, and / becomes %2F. This ensures URLs remain valid across all browsers, servers, and APIs regardless of the special characters they contain.
encodeURIComponent vs encodeURI vs RFC 3986
encodeURIComponent is the safest choice for encoding individual query parameter values — it encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). encodeURI is designed for full URLs and preserves characters like : / ? # [ ] . RFC 3986 is the strictest standard — also encoding ! ' ( ) * — recommended for OAuth signatures and API authentication headers.
Frequently Asked Questions
What is percent encoding?
Percent encoding is the formal name for URL encoding. It converts unsafe characters to % followed by two uppercase hex digits representing the ASCII code. For example, space (ASCII 32 = 0x20) becomes %20.
What is RFC 3986?
RFC 3986 is the internet standard (IETF) that defines URI syntax and percent encoding rules. It specifies which characters are unreserved (safe) and which must be encoded. It is stricter than JavaScript's encodeURIComponent.
What characters does RFC 3986 encode that encodeURIComponent does not?
RFC 3986 also encodes !, ', (, ), * — five characters that encodeURIComponent leaves unencoded. This matters for OAuth 1.0a signatures where these characters must be encoded.
How does the Diff View work?
The Diff View shows your original text with encoded characters highlighted in amber. Hover over any %XX token to see what character it represents — %20 = Space, %2F = /, etc.
Should I use percent encoding or Base64?
Percent encoding is for URLs — it keeps data readable and compact. Base64 is for binary data in JSON, email, HTML. For query strings and API parameters, always use percent encoding (URL encoding).