URL Encoder Decoder Online
Encode special characters for URLs or decode URL-encoded strings. Handles Unicode characters and query parameters.
The Deep Principles of URL Encoding and Percent-Encoding
Percent-encoding (RFC 3986) converts non-ASCII characters and reserved URL characters into %XX sequences. Unreserved characters (A-Z, a-z, 0-9, -._~) stay as-is; reserved characters must be encoded when they are data rather than delimiters. UTF-8 bytes become hex pairs prefixed with % — for example, the character "好" encodes to %E5%A5%BD. Use encodeURIComponent for individual query values and encodeURI when preserving full URL structure.
Practical Engineering Scenarios
Building API requests with user input. Search text like C++ & Java breaks naive URL concatenation because & starts a new query parameter. Encode each key and value with encodeURIComponent, then join with = and &.
Debugging OAuth redirect URIs. redirect_uri values are often encoded twice in the wild. Paste the value here and decode step-by-step to see whether you are at single or double encoding before the callback fails.
Email-safe links with Unicode paths. Mail clients handle percent-encoded paths more reliably than raw Unicode segments in href attributes.
Encoding Strategy and Common Pitfalls
Spaces: query strings may use %20 (RFC 3986) or + (legacy form encoding). encodeURI vs encodeURIComponent: the former keeps URL delimiters; the latter encodes nearly everything except unreserved characters. Double decoding: many frameworks decode once automatically — agree on a single decode boundary in your stack.
Frequently Asked Questions
Q: How is URL encoding different from Base64?
A: URL encoding makes text safe inside URLs using %XX triplets. Base64 transports binary in ASCII but uses + / =, which are reserved in URLs — use Base64URL for URL contexts.
Q: Do encoded URLs affect SEO?
A: Crawlers decode percent sequences before indexing. Prefer readable English path segments; encode query values when needed.
Q: Which characters never need encoding?
A: Unreserved characters per RFC 3986: letters, digits, and -._~.
Privacy & Security
Your data never leaves your browser. Encoding and decoding run entirely in client-side JavaScript — including URLs with tokens or internal endpoints.
URL Encoding Reference
URLs can only be sent over the Internet using the ASCII character-set. URL encoding converts characters into a format that can be transmitted over the Internet.
Space
" " → %20
Question Mark
"?" → %3F
Ampersand
"&" → %26
Equals
"=" → %3D
How to Use This URL Encoder and Decoder Online
This free online URL encoder and decoder provides accurate URL encoding and decoding with proper percent-encoding for all query parameters. Whether you're constructing API request URLs, handling form data, or debugging encoded strings, this URL encode decode tool handles special characters, Unicode, and reserved characters according to RFC 3986.
How to URL Encode and Decode Strings
- To encode: enter your text or URL fragment. Click Encode to convert spaces to
%20or+, and special characters to their percent-encoded equivalents. - To decode: paste a percent-encoded URL string and click Decode to restore the original readable text.
- The tool handles all query parameter encoding including
&,=,#, and Unicode characters.
URL Encoding Example
// Before encoding
https://api.example.com/search?q=hello world&lang=en
// After encoding
https://api.example.com/search?q=hello%20world&lang=en
// JavaScript equivalents
encodeURIComponent("hello world") // "hello%20world"
decodeURIComponent("hello%20world") // "hello world"
This free URL encoder decoder runs completely in your browser, ensuring your data stays private. For web developers building REST APIs, constructing dynamic URLs, or handling user-submitted form data, this URL encoding guide is an everyday essential.