MockFoxAdvertise

URL Encode & Decode

Updated Free mock REST & WebSocket APIs

Percent-encode text so it's safe in a URL, decode encoded strings back to readable text, or break a URL's query string into a clean table of parameters.

🔒 Runs in your browser — nothing you paste is uploaded.

How to URL-encode or decode

  1. Pick Encode, Decode or Parse query string.
  2. Paste your text or URL; the result updates live.
  3. When encoding, choose Component for a single parameter value or path segment, and Full URL to keep a complete URL's structure intact.

encodeURIComponent vs. encodeURI

CharactersencodeURIencodeURIComponent
A–Z a–z 0–9 - _ . ! ~ * ' ( )keptkept
; , / ? : @ & = + $ #keptencoded
Space%20%20
Non-ASCII, e.g. é%C3%A9%C3%A9

Use encodeURI on a whole URL — it leaves /, ? and & alone so the URL still works. Use encodeURIComponent on each value you insert into a URL. A classic bug is building "?q=" + encodeURI(value): an & inside the value then splits it into two parameters.

Spaces: + or %20?

In query strings submitted by HTML forms (application/x-www-form-urlencoded), + means a space — that's what URLSearchParams writes. Everywhere else in a URL, including the path, + is a literal plus sign and spaces must be %20. When decoding a query string, treat + as a space; when decoding a path, don't.

Related tools

Frequently asked questions

Is my text sent to a server?

No. This tool runs entirely in your browser with JavaScript, so your text never leaves your device and isn't logged or stored. You can even use it offline once the page has loaded.

Why do I get “Malformed percent-encoding”?

A % must be followed by two hex digits, and multi-byte characters must be complete — %E2%9C on its own is half of a character. Literal percent signs must be written as %25.

Should I encode a whole URL with encodeURIComponent?

No — it would encode the :// and every / too, producing a string that's no longer a URL. Encode only the pieces you insert, or use encodeURI for the whole thing.

How are non-English characters encoded?

They're converted to UTF-8 bytes and each byte is written as %XX. For example é becomes %C3%A9 and the emoji 🦊 becomes %F0%9F%A6%8A.

Your business here? Sponsor this tool from $16/week. See placements