URL Encode & Decode

Percent-encode a string or decode one, with component, full-URL and form modes.
Client-side · verifiable
How this tool works

URLs can only contain a limited set of characters. Everything else, including spaces, accents, ampersands inside values and the characters that have structural meaning, must be written as % followed by two hex digits of its UTF-8 byte. Getting this wrong is behind a surprising share of broken links and injection bugs.

Three modes because there are three jobs:

  • Component (encodeURIComponent) encodes everything except unreserved characters. Use it for a value going into a query string.
  • Full URL (encodeURI) keeps :/?#&= intact so an existing URL keeps its structure.
  • Form is component encoding with spaces as +, the application/x-www-form-urlencoded convention browsers use when submitting forms.

When the input parses as a URL, the page also lists its origin, path and each decoded query parameter.

Security note

What leaves your browser

Encoding runs in your browser. URLs you paste are parsed locally and never requested or transmitted.

FAQ
When do I use component vs full URL encoding?

Component for a single value you are inserting into a URL. Full URL when you have a complete URL that just needs its unsafe characters escaped.

Why does a space become %20 in one mode and + in another?

Both are valid. + is the older form-submission convention; %20 is the general URL rule. Servers accept both in query strings.

Why does decoding fail?

A % that is not followed by two hex digits is malformed. Check for a literal % that should have been encoded as %25.