Skip to content

Encode and decode URLs

Percent-encode or decode URLs, query values and form data, UTF-8 safe, with every query parameter decoded; it all runs in your browser.

What are you encoding?

encodeURIComponent: escapes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for one parameter value.

Percent-encoded
The result appears here as you type.
Runs in your browser · no uploadHow it works

How to use URL encoder / decoder

  1. 1

    Choose Encode or Decode

    Encode turns spaces and special characters into %XX; Decode turns %XX back into readable text.

  2. 2

    Pick what you are encoding

    Query value for one parameter, Whole URL for a full address, or Form data when spaces should become +.

  3. 3

    Paste the text or link

    The result updates as you type, and a full URL gets a breakdown of its parts and parameters.

  4. 4

    Copy the result

    Copy it, save it as a file, or swap it back into the input to check the round trip.

Limits and Pro

Free with no sign-up and no length cap for pasted text; outputs longer than 600,000 characters are shown in part and copied or saved in full.

Pro removes the ads; the converter is identical on every plan. See Pro

About URL encoder / decoder

URLs may only contain a limited set of ASCII characters, so anything else — spaces, accents, emoji, and reserved symbols used as data — has to be written as % followed by two hex digits for each UTF-8 byte. This page converts in both directions and shows you exactly what changed.

Three modes match the three places encoding actually happens. Query value mode behaves like JavaScript's encodeURIComponent and is the right choice for a single parameter, a path segment or a redirect target embedded inside another URL. Whole URL mode behaves like encodeURI: it leaves the scheme, slashes, question mark, ampersands and equals signs alone and only escapes what would break the address. Form data mode follows application/x-www-form-urlencoded, where a space becomes a plus sign, as in HTML forms and URLSearchParams.

Paste a complete link and the breakdown panel lists the scheme, host, port, path and fragment, plus a table of every query parameter with its decoded value — handy for reading tracking links, OAuth callbacks and signed URLs. Decoding stops at malformed input and says where: a lone % that isn't followed by two hex digits, or byte sequences that aren't valid UTF-8, which usually means the text was encoded as Latin-1 by an older system.

Percent-encoding is not encryption and doesn't shorten anything; use a link shortener for that. Base64 and HTML entity conversion live in the other two tabs.

Privacy

URLs and text are encoded and decoded inside this page, so links containing tokens, e-mail addresses or session IDs are never sent anywhere. The selected mode is stored in local storage for next time; what you paste is not.

URL encoder / decoder: frequently asked questions

Should I use encodeURI or encodeURIComponent?
Use encodeURIComponent, the Query value mode here, for anything you insert into a URL: a search term, a parameter value or a nested redirect URL. It escapes & = ? / so they can't be mistaken for structure. Use encodeURI, the Whole URL mode, only on a complete address that already has the right structure and just needs spaces or non-ASCII characters fixed.
Why is a space sometimes %20 and sometimes +?
Percent-encoding as defined for URLs writes a space as %20. HTML forms use an older format, application/x-www-form-urlencoded, where a space becomes + and a literal plus sign becomes %2B. Both are common in query strings. Choose Form data mode when decoding values submitted by a form, otherwise a + stays a plus sign.
What does “not valid UTF-8” mean when decoding?
Modern URLs encode each character as its UTF-8 bytes, so é is %C3%A9. Some older systems used Latin-1, where é is the single byte %E9, and that sequence is not valid UTF-8. The error shows its position. Re-encode the source as UTF-8, or replace the Latin-1 sequence by hand if only a few characters are affected.
Can I see the parameters of a long tracking link?
Yes. Paste the full link with its https:// prefix and the breakdown panel appears below the result. It lists the host, path and fragment and shows each query parameter with its decoded value, including repeated keys, so UTM tags, OAuth state values and nested redirect URLs become readable without decoding them one by one.
Does encoding a URL twice cause problems?
Yes, double encoding is a frequent bug: a % from the first pass becomes %25, so %20 turns into %2520 and the server receives the wrong value. If decoding once still leaves %XX sequences, the text was encoded twice. Press Use output as input and decode again to recover the original.

Other tasks with this tool

All developer tools