Skip to content
Menu
Theme

URL Encode and Decode

Percent-encode text for a web address, decode it back, and read or edit the parts and query parameters of any URL. Free, private, in your browser.

DeveloperRuns in your browser

Encode or decode

Direction
Paste or type. The result updates as you type.

Read and edit an address

A full web address, starting with https://
Protocol
https:
Host
example.com
Port
None
Path
/search
Fragment
#results

Query parameters

What is URL encoding?

A web address can only hold a small set of characters. Letters, digits and a few symbols are fine. Spaces, accented letters, emoji and symbols like the ampersand or the question mark either break the address or change what it means. URL encoding, also called percent encoding, solves this by writing each of those characters as a percent sign followed by two hexadecimal digits. A space becomes “%20”, and the Vietnamese letter “é” becomes “%C3%A9”, because it takes two bytes in UTF-8.

You need this when you put a search phrase, a file name or a person’s name into a link, when you build a query string for an API, or when you are trying to read a long address that is full of percent signs. Decoding turns those back into the words a person would actually type.

This page has two parts.

The first part encodes or decodes a piece of text. When encoding, you choose how much to change. Encoding a part of an address is the usual choice for a single value, such as one search term, because it also escapes the slash, the ampersand and the equals sign. Encoding a whole address keeps those symbols as they are, so a complete link still works. The third choice encodes every single character, which is rarely needed but handy for testing. When decoding, you can choose to read a plus sign as a space, which is how web forms send spaces.

The second part reads a full address and splits it into its pieces: protocol, host, port, path and the part after the hash sign. Each query parameter gets its own row with a key and a value, already decoded, so you can read and change them easily. You can remove a parameter or add a new one, and the rebuilt address appears below, encoded correctly. Addresses that contain a user name or password are refused, so those details never show up on screen.

Everything runs in your browser. Nothing you paste is sent anywhere, and it is gone when you close the page.

How to use the URL encoder

  1. In the first part, choose whether to encode or decode.
  2. Paste or type your text in the input box. The Result box updates as you type.
  3. For encoding, pick how much of the text should change. For decoding, choose whether a plus sign means a space.
  4. Use the copy button under the result to put it on your clipboard.
  5. To work on a full link, paste it into the address box in the second part.
  6. Read the parts of the address, then change, remove or add query parameters.
  7. Copy the rebuilt address from the box at the bottom.

FAQ

Should I encode a whole address or only a part of it?

Encode only the part you are inserting, such as the value after “q=”. If you encode a whole address with the part option, the slashes and the colon after “https” get encoded too and the link stops working. Use the whole address option only when you already have a complete link with a few unsafe characters in it.

Why is a space sometimes “%20” and sometimes “+”?

Both are common. Web forms send spaces in the query string as a plus sign, while most other places use “%20”. When you decode text that came from a form, turn on the option that reads plus as a space.

Why does decoding show an error?

A percent sign must be followed by two hexadecimal digits, and the bytes together must form valid UTF-8 text. A lone “%” or a cut-off sequence like “%E1%BB” cannot be decoded. Check that you copied the full address.

Why are addresses with a password refused?

An address like “https://name:secret@example.com” carries login details. Showing or rebuilding it would put that password on screen and on your clipboard, so the tool stops and tells you instead.

Is the address I paste sent anywhere?

No. Splitting, encoding and decoding all happen inside the page on your own device. The tool never opens the link and never sends it to a server.

Related tools