Developer tool

URL Encode and Decode

URL encoder and decoder: percent-encode text for a URL component or decode it back, including non-English text. Malformed escapes show a clear error. No upload.

Your file never leaves your device.

Runs locally in your browser

Your text is not uploaded.

Simple steps

How it works

  1. 01

    Enter a URL value or encoded component.

  2. 02

    Choose Encode or Decode.

  3. 03

    Copy the converted value.

What gets encoded

Encoding uses the browser's encodeURIComponent. Letters, digits and the characters - _ . ! ~ * ' ( ) stay as they are; every other character is replaced by percent escapes of its UTF-8 bytes. A space becomes %20, & becomes %26, / becomes %2F, and é becomes %C3%A9 because it takes two bytes in UTF-8.

That makes the result safe to put inside one part of a URL, such as a query parameter value or a path segment, without changing the meaning of the rest of the address.

Example: a search term inside a link

To link to a search for cats & dogs, encode only the term: ?q=cats%20%26%20dogs. Left unencoded, the & would start a new parameter and the search would only see "cats ".

Do not encode a whole address. Encoding https://example.com/a?b=c turns the slashes, colon and question mark into escapes as well, and the link stops working. Encode the pieces you insert, then join them.

Decoding and common problems

Decoding turns escapes back into text. A lone % or an escape that is not valid UTF-8, such as %E9 on its own, cannot be decoded; the tool says so instead of guessing. %E9 usually means the text was encoded as Latin-1 rather than UTF-8.

If you see %2520 where you expect %20, the text was encoded twice: decode it twice. Plus signs are left as they are, because + means a space only in HTML form data. If your text came from a submitted form, replace + with %20 before decoding.

Good to know

Frequently asked questions

Which encoding is used?

The tool uses JavaScript encodeURIComponent and decodeURIComponent for URL components.

Does this encode a complete URL?

It encodes a component value. Do not apply it to an entire URL with separators you need to preserve.

What happens to malformed percent escapes?

Decode errors are reported clearly instead of silently changing the value.

Are query parameters sent anywhere?

No. URL conversion runs locally in your browser.

Are spaces converted to plus signs?

No. Component encoding uses percent escapes; form encoding has different space rules.