URL Encoder/Decoder
Encode or decode URL components. Use encodeURIComponent for query parameters or encodeURI for full URLs.
Component encoding (for query parameters):
Full URL encoding (preserves :, /, ?, #, etc.):
Everything you need to know about URL encoding (percent-encoding)
Why do you need to encode URLs?
RFC 3986 defines a restricted set of characters allowed in URLs: unaccented letters, digits, and 4 symbols (-, ., _, ~). All other characters — spaces, accents, &, =, # — must be converted to percent-encoding format (%XX) to be transmitted unambiguously by browsers and servers.
This tool offers two encoding modes matching the native JavaScript functions: encodeURIComponent (encodes all special characters, ideal for parameter values) and encodeURI (preserves structural characters :, /, ?, #, suited for full URLs). The distinction is critical to avoid broken URLs.
All processing happens entirely in your browser using native JavaScript engine functions. No data is sent to any server. You can safely encode sensitive data (tokens, API keys) with full privacy.
Who uses this tool?
- API developers
- Encode query parameter values containing special characters (&, =, +) before embedding them in REST or GraphQL calls. A poorly encoded parameter can break a request or cause an injection vulnerability.
- SEO specialists
- Decode complex URLs from Google Search Console or analytics tools to understand the actual structure of indexed pages. Identify poorly encoded UTM parameters that skew your statistics.
- QA testers
- Test how your application handles international characters (accents, ideographs, emojis) in URLs. A single "e with accent" takes 2 bytes in UTF-8 and produces %C3%A9 in percent-encoding.
- Marketing teams
- Create and verify UTM-tagged links with values containing spaces or special characters. A poorly encoded utm_campaign=summer%202025 can lose your attribution data in Google Analytics.
How does the tool work?
Paste your text or URL in the input field. Choose from 4 actions: encode/decode a component (encodeURIComponent) or encode/decode a full URL (encodeURI). The result appears instantly with a copy button.
In component mode, every disallowed character is converted to UTF-8 bytes then to %XX sequences. In full URL mode, structural characters (:, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =) are preserved.
The Clear button resets both fields. There is no server-side size limit since all computation happens locally. The tool correctly handles multi-byte UTF-8 strings, including emojis and CJK ideographs.
Frequently asked questions
- What is the difference between encodeURI and encodeURIComponent?
- encodeURIComponent encodes all special characters, including :, /, ?, # and &. It is designed to encode query parameter values. encodeURI preserves these structural characters and is used to encode a full URL while keeping its structure intact.
- Why does a space become %20 and not +?
- RFC 3986 specifies %20 as the standard encoding for a space in URLs. The + as space is a historical convention from the application/x-www-form-urlencoded format (HTML forms). encodeURIComponent uses %20, which is correct for most modern use cases.
- Is my data sent to a server?
- No. Encoding and decoding happen entirely in your browser using native JavaScript functions (encodeURIComponent, decodeURIComponent, encodeURI, decodeURI). No data is transmitted, stored, or logged on any remote server.
- How are Unicode characters and accents handled?
- The URL encoding functions first convert characters to UTF-8 bytes, then each byte is represented in %XX format. For example, "e with accent" (U+00E9) becomes %C3%A9 because it takes 2 bytes in UTF-8. Emojis like the grinning face (U+1F600) produce 4 bytes: %F0%9F%98%80.