Free developer tool

URL Encoder and Decoder

URL encoding replaces unsafe characters with a percent sign and two hex digits so a link works everywhere. Paste text to encode or decode it.

What is url encoder and decoder?

URLs can contain only a limited set of characters. Spaces, ampersands and non English letters must be encoded when they appear in query strings or paths.

Use encode for values you add to a link, and decode when you want to read a link copied from a browser or log.

How to use the url encoder and decoder

  1. Choose encode or decode.
  2. Tick the full URL box if the input is a complete link.
  3. Press Calculate and copy the result.

How the url encoder and decoder works

Encoding uses the standard percent encoding of UTF 8 bytes. For a full URL, characters that have meaning in a URL such as colon, slash and question mark are kept.

Worked example

coffee & tea becomes coffee%20%26%20tea.

Common uses of the url encoder and decoder

  • Adding a search phrase or email address to a query string.
  • Reading a long tracking link copied from a browser.
  • Fixing links that break because of spaces or symbols.
  • Building redirect and API request URLs.
  • Debugging double encoded values.

Tips and common mistakes

Encode each query value separately, then join them with ampersands.

Double encoding is a common bug. If you see %2520, the text was encoded twice.

Background: what to know before you rely on it

URLs may only contain a small set of letters, digits and symbols. Everything else is replaced by a percent sign followed by the two hex digits of the byte, so a space becomes %20. Non English letters are first turned into UTF 8 bytes and each byte is encoded, which is why a single accented letter can become six characters. Some characters have special meaning, such as question mark, ampersand and equals, so they must be encoded when they are part of a value. A plus sign in a query string often means a space in forms, which is another source of confusion. Always encode values, not the whole URL, unless you know you need to.

Private, free and fast

This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all developer tools, or browse the full list of tools.

Frequently asked questions

What is %20?

A space.

What is the difference between encodeURI and encodeURIComponent?

The first keeps URL structure characters. The second encodes them too.

Why decode a URL?

To read the original text.

Related tools

Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Do not paste live secrets into any website.