URL Encode / Decode

Percent-encode or decode URLs and query strings.

Loading tool…

URL Encode / DecodePercent-encode text for safe use in URLs, or decode an encoded URL back to readable form. Component mode encodes every reserved character (for query parameter values), while Whole URI mode keeps URL structure characters like :// and ? intact. All processing stays in your browser.

What is URL Encode / Decode?

URL Encode / Decode is a free online URL encoder and decoder that percent-encodes text for safe use in URLs, or decodes an encoded URL or query string back to readable form. Developers, QA testers, and API users reach for it to escape spaces, ampersands, equals signs, and non-ASCII characters in query parameters, or to unescape a %20 / %3A / %2F string they pasted from a browser address bar or log. Switch between Encode and Decode, and pick Component scope (encodes every reserved character, ideal for a single query parameter value) or Whole URI scope (preserves URL structure characters like ://, ?, &, and =). A Swap button moves the output back into the input and flips the Encode/Decode mode for fast round-trip checks.

How to use URL Encode / Decode

  1. Choose Encode or Decode using the first segmented toggle in the toolbar.
  2. Pick the scope: Component to escape all reserved characters, or Whole URI to keep :// ? & = intact.
  3. Paste or type your text into the Input box; the result appears live in the read-only Output box below.
  4. Click the copy button on the Output field to copy the encoded or decoded string.
  5. Click Swap to move the output into the input and flip the mode for a round-trip check, or Clear to reset the input.

Examples

Encode a query value (Component)

Input

a b&c=日

Output

a%20b%26c%3D%E6%97%A5

Decode a percent-encoded URL (Component)

Input

https%3A%2F%2Fexample.com

Output

https://example.com

Encode a full URL (Whole URI)

Input

https://x.com/p q?a=1&b=2

Output

https://x.com/p%20q?a=1&b=2

Frequently asked questions

What is the difference between Component and Whole URI mode?
Component mode (encodeURIComponent) encodes every reserved character, so :, /, ?, &, and = all become %3A, %2F, %3F, %26, and %3D — use it for a single query parameter value. Whole URI mode (encodeURI) leaves those URL structure characters intact and only escapes characters that aren't valid anywhere in a URL, such as spaces, so the overall link still works.
Why does decoding show an 'invalid' error?
Decoding fails when the input contains a malformed percent sequence, such as a lone % or %ZZ that isn't a valid two-digit hex code. Fix or remove the broken sequence and the output will appear again.
Does it handle non-ASCII and Unicode characters?
Yes. Encoding converts characters like 日 or emoji to their UTF-8 percent-encoded bytes (for example 日 becomes %E6%97%A5), and decoding turns them back into the original characters.
Is there a length limit on the text I can encode or decode?
There is no fixed character limit imposed by the tool; it converts whatever you paste instantly in the browser, so practical limits depend only on your device's memory.
Is my data uploaded to a server?
No. All encoding and decoding runs entirely in your browser using the built-in JavaScript URL functions. Nothing is uploaded, stored, or sent anywhere, so it is safe for private URLs, tokens, and internal links.

Related tools