Skip to main content
SuperTextTools

URL Encoder/Decoder

Percent-encode and decode URL components instantly. Unicode-safe, form-style + option, encode-all mode. Runs entirely in your browser.

Instant 100% Private Free Forever
URL Encoder Decoder Percent-Encoding Developer
Direction

Useful for embedding in URLs where even alphanumerics need encoding

Form-style encoding (older convention)

Input 0 chars · 0 lines
Output
Try an example

How to use the URL Encoder/Decoder

Four steps to encode or decode URL text in your browser.

  1. 1

    Paste text or an encoded string

    Enter plain text to encode, or paste a percent-encoded string to decode. Auto-detect switches mode when %XX patterns are found.

  2. 2

    Choose Encode or Decode

    Use the direction toggle to override auto-detect if the tool picks the wrong mode.

  3. 3

    Set encoding options

    In Encode mode, enable "Encode all characters" for full percent-encoding, or "Encode spaces as +" for form-style output.

  4. 4

    Copy or download

    Copy the result to your clipboard, download as a text file, or share a link with your input in the URL hash.

What is URL Encoding?

URL encoding — also called percent-encoding — converts characters that are unsafe or illegal in URLs into a safe ASCII representation. Defined in RFC 3986, it replaces problematic bytes with a percent sign followed by two hexadecimal digits: a space becomes %20, an ampersand becomes %26, and the letter é becomes %C3%A9. URLs were designed for a limited ASCII character set; spaces, accents, emoji, and many symbols must be encoded before they travel through browsers, servers, and APIs without breaking.

A URL encoder takes plain text and escapes reserved or non-ASCII characters. A URL decoder reverses the process. This is transport encoding, not encryption — anyone can decode a percent-encoded string instantly. The goal is compatibility: a query value like hello world must become hello%20world (or hello+world in form encoding) so the server reads one parameter value, not two tokens split at the space.

Plain text

hello world

Encoded

hello%20world

Why URL encoding exists

URIs can only contain certain unreserved characters: letters, digits, and a small set of symbols like -._~. Reserved characters — including ! * ' ( ) ; : @ & = + $ , / ? % # [ ] — have special meaning in different parts of a URL. Encoding ensures a dollar sign in a search query is data, not a delimiter confusion.

encodeURI vs encodeURIComponent

JavaScript provides two built-in functions. encodeURI encodes a full URI but preserves structure characters like slashes and question marks — use it when encoding an entire URL string. encodeURIComponent encodes everything except alphanumerics — use it for individual query parameter values, path segments, or any string that will be embedded inside a larger URL. This tool defaults to encodeURIComponent behavior because most users paste a value to encode, not a complete URL. Enable "Encode all characters" when even letters and digits must be percent-encoded.

Common use cases

  • Query strings. Build ?q=hello+world&category=tech safely from user input.
  • Form submissions. Encode field values for application/x-www-form-urlencoded bodies (spaces as +).
  • API requests. Escape parameters in REST URLs and webhook callbacks.
  • International URLs. Encode non-ASCII paths and filenames for sharing links with accented or CJK characters.
  • Debugging. Decode broken links, inspect double-encoded strings, verify what a server actually received.

Why decoding sometimes fails

Malformed sequences cause errors: % must always be followed by exactly two hex digits. %ZZ and truncated %2 throw URIError. Double-encoding — encoding an already-encoded string — produces %2520 instead of %20, which decodes to a literal %20 rather than a space. Decode once, fix the source, encode once.

Why use an online URL encoder?

Every language has URL encoding libraries, but a browser-based encode url online tool is faster for one-off checks: paste an API parameter, verify a redirect URL, decode a query string from analytics, or test how emoji render when encoded. SuperTextTools runs locally with encodeURIComponent and decodeURIComponent — Unicode-safe, no deprecated escape(), nothing uploaded. Whether you need urlencode, urldecode, or percent encoding for a quick debug, the result stays on your device.

Frequently asked questions

What's the difference between encodeURI and encodeURIComponent?
encodeURI is for entire URLs — it keeps reserved structure characters like /, ?, &, =, and # intact. encodeURIComponent encodes everything except alphanumerics — used for individual query parameter values. This tool uses encodeURIComponent by default because most users want to encode a single value, not a whole URL path.
Why is + decoded as a space?
The application/x-www-form-urlencoded format (used by HTML forms) historically encodes spaces as + instead of %20. Our decoder treats + as a space to handle form data. Modern URI encoding uses %20. For a literal plus sign, use %2B.
How do I encode a URL that already contains an encoded character?
Avoid double-encoding. If your input is Hello%20World and you encode it again, the % becomes %25, producing Hello%2520World. Decode first if you need the plain text, then encode once.
Are emojis and Chinese characters supported?
Yes. Non-ASCII characters are encoded as their UTF-8 byte sequences. For example, 🎉 becomes %F0%9F%8E%89 (4 bytes) and becomes %E4%B8%AD (3 bytes).
Is encoded data more secure?
No. URL encoding (percent-encoding) is for safe transport, not encryption. Anyone can decode it instantly — including with this free decode url online tool. Use HTTPS for transport security and proper encryption for secrets.