URL Encoder & Decoder

Percent-encode or decode URLs, query strings and parameters. Two modes cover everything from full URLs to individual values. Runs locally in your browser.

URL encoding in one line: it converts characters that are not URL-safe into a %XX hex form — a space becomes %20, & becomes %26 — so URLs, query strings and parameters transmit without ambiguity.

✅ Quick Answer

"a b" → a%20b. "a&b=c" → a%26b%3Dc. "中文" → %E4%B8%AD%E6%96%87. "😀" → %F0%9F%98%80.

Rule of thumb: use Strict (encodeURIComponent) for parameter values; use Standard (encodeURI) for a whole URL. Encode once — never double-encode. Safe characters (A–Z a–z 0–9 - _ . ! ~ * ' ( )) stay as-is.

Try an example:
0input chars
0output chars
0%XX escapes
—mode

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts characters that are not allowed in URLs into a safe %XX format. For example, a space becomes %20 and the & character in query strings becomes %26, so the URL is transmitted without ambiguity.

What is the difference between the two encoding modes?

The strict mode (encodeURIComponent) encodes almost everything including / and :, which is perfect for query parameter values. The standard mode (encodeURI) keeps URL structure characters like / : ? and & intact, which is better for encoding a full URL string.

Is the URL encoder safe to use with sensitive data?

Yes. All encoding and decoding happens entirely in your browser. Your data is never sent to any server.

When do I need URL encoding?

Whenever you build a URL with user input, pass parameters via query strings, or embed URLs inside other URLs. Encoding prevents broken links, mangled query values and security issues caused by special characters.

Is the URL encoder free?

Yes, completely free with no registration, no usage limits and no uploads. Everything runs locally in your browser.

What is the difference between %20 and +?

%20 is the standard percent-encoding of a space in any URL component. + only means "space" inside application/x-www-form-urlencoded form bodies (and some query parsers). In a path segment, + is a literal plus — so prefer %20 for safety.

Why is my URL double-encoded?

Double-encoding happens when an already-encoded string is encoded again: %20 becomes %2520 because % itself is encoded to %25. Always decode first, then encode once — or only encode raw, un-encoded values.

encodeURI vs encodeURIComponent — which should I use?

Use encodeURIComponent for a single parameter value — it encodes / : ? & = # so the value cannot break out of its slot. Use encodeURI for a complete URL you want to preserve structurally — it leaves / : ? & = intact.

Does URL encoding prevent XSS?

No. URL encoding is for transport safety, not output sanitization. Encoding a <script> as %3Cscript%3E does not stop it from executing if the decoded value is later inserted into HTML without proper escaping. Always apply context-appropriate output encoding (HTML, attribute, JS) at render time.

Why does Chinese text become so long when encoded?

Each Chinese character is 3 bytes in UTF-8, and each byte becomes a 3-character %XX escape — so one character can expand to 9 characters. That is why URLs with CJK text can get very long and why slugs use transliteration or IDs instead.

URL Encoder & Decoder — Handle Special Characters the Right Way

Special characters in URLs cause broken links, truncated parameters and unexpected errors. Our URL encoder converts any text into its percent-encoded form, and the decoder restores it — perfect for developers, marketers and anyone building links by hand.

Why use our URL encoder?

  • Encode or decode in one click with instant feedback.
  • Strict mode for query parameter values and nested data.
  • Standard mode that preserves the structure of full URLs.
  • Correct Unicode handling for spaces, Chinese, emoji and more.
  • 100% private and free — nothing is uploaded.

Common use cases

  • Building query strings with user-provided values safely.
  • Debugging encoded parameters in network requests.
  • Embedding one URL inside another (redirects, callbacks).
  • Preparing values for form submissions and API calls.

URL encoding quick reference

Character Encoded Context
space%20Everywhere (use + only in form bodies)
&%26Query values
=%3DQuery values
?%3FParameter values
/%2FInside a parameter value
#%23Inside a parameter value
中%E4%B8%ADUTF-8, 3 bytes → 9 chars
😀%F0%9F%98%80UTF-8, 4 bytes → 12 chars

Safe characters (A–Z a–z 0–9 - _ . ! ~ * ' ( ) and reserved / : ? & = #) are handled differently by encodeURI and encodeURIComponent.

Stop guessing whether your special characters will survive the trip. Encode them correctly with our free URL encoder and decoder.

Working with encoded URLs? Pair this tool with the Base64 Encoder for decoding tokens, the JSON Formatter for validating API responses, and the Password Generator before you embed any credential in a URL.