Skip to main content
UtilityStack

URL Encoder and Decoder

Convert text to and from URL-percent encoding instantly. Choose Component for query-string fragments and path segments, or Full URL when the input is already a complete URL and you only want to encode the unsafe parts.

Input
Output

What is URL encoding?

URLs may only contain a small subset of ASCII characters: letters, digits, and a handful of reserved punctuation. Anything else — spaces, accented letters, emojis, query string values that contain ampersands — must be percent-encoded: each non-allowed byte becomes a percent sign followed by its hex value (e.g. space becomes %20, é becomes %C3%A9 in UTF-8).

Two encoders exist in JavaScript and most languages: a permissive one (encodeURI) that leaves the URL structure characters intact (so you can encode a whole URL safely without breaking it), and a stricter one (encodeURIComponent) that encodes everything that isn't strictly safe — meant for embedding inside a query string value or path segment.

How to use this tool

  1. Pick Encode or Decode.
  2. Pick the variant: Component for query/path fragments, Full URL for whole URLs.
  3. Paste your text in the input area. The result appears instantly on the right. Use Swap to verify a round-trip.

Frequently asked questions

When should I use Component vs Full URL?

Use Component when the input is a piece of data going inside a URL (a query value, a path segment with special characters). Use Full URL when the input is already a complete URL and you just want to escape any rough edges (spaces, non-ASCII) without touching the structure.

Why does + decode to space sometimes?

In application/x-www-form-urlencoded (HTML forms), + represents a space. JavaScript's decodeURIComponent does NOT do that — it only handles %20. If you are decoding form data, replace + with %20 first, or use a dedicated form-urlencoded parser.

Is there a length limit?

Browsers and servers typically limit URLs to 2-8 KB. The encoder itself has no limit, but if your encoded output exceeds your target system's limit you will get an error elsewhere — consider sending the data in the request body instead.

Related tools