URL encode/decode for URLs and query strings

Encode or decode URL text (percent-encoding) instantly in your browser. Switch between encodeURIComponent and encodeURI behavior, and detect possible double encoding.

Auto mode is the default. Paste text, get an immediate result, then copy, swap, or clear it in one flow.

Input is processed locally in your browser and is never sent to a server.

How to use

  1. Paste a URL or parameter string into the input box.
  2. Choose a mode (Auto, Encode, or Decode) and a target (Parameter value or Complete URL).
  3. Review and copy the result. Use Swap when you need another pass.

Which option should you choose?

Parameter value (recommended)

Use encodeURIComponent for query values, path fragments, and file names.

Complete URL

Use encodeURI when you need to preserve the structure of a complete URL.

+ versus %20

In form-style queries, + may represent a space. You can change this behavior under Advanced options.

Sample

URL with special characters

Input

https://example.com/search?q=Tokyo lunch&ref=email#section

Output preview

Choose the Complete URL target to preserve URL structure while encoding

UTM parameters

Input

utm_source=email&utm_campaign=spring sale 2026

Output preview

Compare how + and %20 represent spaces

String with symbols

Input

Hello/World?name=John Doe&note=10%OFF

Output preview

Safe decoding keeps invalid % sequences and warns instead of stopping

What are URL encoding and decoding (percent-encoding)?

  • Percent-encoding converts characters that are not URL-safe into %XX escapes.
  • Decoding turns %XX escapes back into the original characters.
  • It is essential for Japanese text, spaces, and symbols inside URLs.

When should you use encodeURI or encodeURIComponent?

  • Use encodeURIComponent for individual values, such as a query value or path fragment.
  • Use encodeURI when you are encoding a complete URL.
  • Choose based on whether delimiters such as ?, &, =, and / must remain intact.

FAQ

What is the difference between + and %20?

%20 is the RFC-style representation of a space. The + sign is mainly used by application/x-www-form-urlencoded forms, where it may be decoded as a space.

Which function should I use?

Use encodeURIComponent for individual values and encodeURI for complete URLs. Decide based on whether URL delimiters should remain unchanged.

What is double encoding?

Many %25 sequences usually mean the same value was encoded more than once. This tool detects that pattern and lets you decode one more time with a click.