URL Encoder / Decoder

Percent-encode and decode URLs, with component and full-URL modes kept separate.

Runs locally in your browser. Your input is never sent anywhere.

Input

Output

Component or full URL?

This is the choice that matters, and getting it wrong is the usual cause of subtly broken links, so both are offered explicitly rather than guessed at.

Component (encodeURIComponent) is for a single value going into a query string or path segment. It escapes / ? : @ & = + $ # so they cannot be mistaken for structure. Use it for the parts you are assembling a URL from.

Full URL (encodeURI) is for a URL that is already complete. It leaves the structural characters alone and escapes only what is never legal — spaces, for instance. Use it to make an existing URL safe, never to encode a value you are about to insert into one.

Why + sometimes means space

In application/x-www-form-urlencoded data — what an HTML form posts, and what many query strings use — a space is written as +. Percent-decoding alone leaves it as a literal plus, so enable Treat + as space when decoding something that came from a form.