URL encoder and decoder

Percent-encode and decode text or whole addresses, with the position of any malformed escape. Runs in your browser.

Everything happens on your device. What you type never leaves it.

Mode
Scope
Plus for spaces

This tool needs JavaScript to run

About this tool

Web addresses may only contain a small set of plain characters. Anything else, such as a space, an accented letter or an ampersand inside a value, is written as a percent sign and two hex digits: a space becomes %20 and the letter é becomes %C3%A9. This tool converts in both directions. Choose Encode or Decode, paste your text, and the result appears as you type.

Choose the scope that matches what you have. Whole address keeps the characters that give an address its structure, such as : / ? # & and =, and encodes only the rest. Single component encodes those too, which is what you want for one value that will sit inside an address, such as a search term. Turn on Plus for spaces to use the + form that web forms produce.

Text is converted as UTF-8, so every alphabet and emoji works. If an encoded text is broken, for example a percent sign that is not followed by two hex digits, you are told which sequence is wrong and where. When the result is a complete web address, it can be passed on to other tools as an address.

Everything happens on your device. What you paste is never sent to a server, so it is safe to use with links that contain tokens or personal data.

Examples

Encode a whole address

Input

https://example.com/search?q=café au lait&lang=fr

Output

https://example.com/search?q=caf%C3%A9%20au%20lait&lang=fr

Encode one value (single component)

Input

name=Ana María&city=São Paulo

Output

name%3DAna%20Mar%C3%ADa%26city%3DS%C3%A3o%20Paulo

Decode an encoded text

Input

caf%C3%A9%20au%20lait

Output

café au lait

Common questions

Is the text I paste uploaded anywhere?

No. The text is converted by code running in your browser. Nothing is sent to ajx.io or to anyone else, and the tool keeps working if you go offline.

What is the difference between whole address and single component?

Whole address leaves the characters that structure a link alone (: / ? # & = and a few more), so a complete address stays a working address. Single component encodes all of them, so a value that contains an ampersand or a slash cannot be mistaken for part of the structure.

Why does a space sometimes appear as + instead of %20?

Web forms write spaces as + in the part of an address after the question mark. Turn on Plus for spaces to produce and read that form. Elsewhere in an address, a space is always %20.

What does a malformed percent sequence mean?

A percent sign must be followed by exactly two hex digits. If it is not, for example in "100% sure", the text cannot be decoded. The message gives the position of the sequence; write a literal percent sign as %25.

Why does decoding say the bytes are not valid UTF-8?

Characters outside plain ASCII are written as several escapes in a row. If those bytes do not form a valid character, because they are cut short or were encoded in another character set, they cannot be shown as text. The message names where they start.