Skip to content

URL Encoder & Decoder

Percent-encode or decode text for URLs, choosing between component and full-URL modes, and split any query string into a clear table of keys and values.

  • Free, no sign-up
  • Runs in your browser
  • Developer
Encode or decode
Mode
Component mode (encodeURIComponent) also encodes / ? & = and #, which is right for a query value. Full URL mode (encodeURI) keeps them so the address still works.
Up to 500,000 characters. Results update as you type.

Parse a query string
For example https://example.com/search?q=red+shoes&page=2 or just q=red+shoes&page=2. Keys and values are decoded; + counts as a space.

Read the guide What Is URL Encoding? Percent-Encoding Explained

How to use the URL encoder

  1. Choose Encode or Decode.
  2. Choose what you are converting: a single value (for example one query parameter) or a full URL.
  3. Type or paste your text. The result updates as you type.
  4. When decoding form data, tick Treat + as a space.
  5. Press Copy, or Use result as input to reverse the operation.

Below, the query string parser takes a full URL or just the part after the question mark and lists every parameter in a table, already decoded. Repeated keys appear once per occurrence, in their original order.

Your text stays on your device

All encoding, decoding and parsing happen in your browser. Nothing you enter is sent to our server.

How percent-encoding works

A URL may only contain a limited set of characters. Every other character is converted to its UTF-8 bytes, and each byte is written as a percent sign followed by two hex digits. A space becomes %20, and the euro sign, which is three bytes in UTF-8, becomes %E2%82%AC.

The two modes differ in which characters they leave alone:

  • Single value (encodeURIComponent) encodes everything except letters, digits and - _ . ! ~ * ' ( ). It also encodes / ? & = and #, so a value can never break the URL around it.
  • Full URL (encodeURI) keeps the characters that give a URL its structure, such as : / ? & = and #, and only encodes the rest.

Worked example

Encoding the value red shoes & socks/2 as a single value gives red%20shoes%20%26%20socks%2F2. The & and / are encoded, so they stay part of the value.

Encoding https://example.com/a b?q=café as a full URL gives https://example.com/a%20b?q=caf%C3%A9. The address still works because its slashes and question mark are untouched.

Good to know

  • When decoding fails, the tool names the position and the faulty sequence. For example, 100% fails at character 4 because the % is not followed by two hex digits.
  • In HTML form data a + means a space, but in other parts of a URL it is a literal plus. That is why the option is off by default.
  • Full URL mode does not decode reserved characters such as %2F, because turning them back into / could change the meaning of the address.
  • The query parser is lenient, like browsers: a broken sequence is kept as typed instead of stopping the whole list.

Frequently asked questions

Should I use encodeURIComponent or encodeURI?

Use encodeURIComponent (single value) for anything you insert into a URL, such as a search term or a parameter value. Use encodeURI (full URL) only when you already have a complete address and just need to make spaces and non-ASCII characters safe.

Why is a space sometimes %20 and sometimes +?

Both are common. Percent-encoding always uses %20. HTML forms submitted with the default encoding use + for spaces in the query string. When decoding form data, turn on the Treat + as a space option.

What does a malformed URI sequence error mean?

It means a percent sign is not followed by two hex digits, or the bytes do not form valid UTF-8 text. The tool shows the exact position and the sequence, such as %E2%82 with its third byte missing, so you can fix it.

Does the parser show duplicate keys?

Yes. If a key such as tag appears several times, each occurrence gets its own row in the order it appears, exactly as a server would receive them.

Is my URL sent anywhere?

No. Everything runs in your browser and nothing is sent to our server, so it is safe to inspect links that contain tokens or personal data.