Skip to content

Developer Tool

URL Encoder & Decoder

Percent-encode text for use in a URL, or decode an encoded URL back into readable text.

Runs in your browser — nothing is uploaded

What this does

URLs can only contain a limited set of characters. Anything else — a space, an ampersand inside a search term, a non-English character — has to be written as a percent sign followed by the byte's hexadecimal value. Getting this wrong is a classic source of broken links and of query parameters that split in the wrong place.

The tool offers the two standard JavaScript behaviours: encoding a single component (such as one query-string value), which escapes characters like & and = that have meaning inside a URL, and encoding a whole URL, which leaves those structural characters alone.

How to use it

  1. Paste text and choose Component (for one value) or Whole URL.
  2. Press Encode or Decode.
  3. Copy the result with the Copy button.

Where it stops being right

  • Decoding fails on a malformed percent sequence, such as % followed by characters that are not hexadecimal.
  • HTML form submissions traditionally encode a space as +. Standard percent-decoding does not turn + back into a space, so this tool leaves + as it is.

Questions

When should I encode a component rather than a whole URL?
Encode a component when you are inserting a value into a URL — a search term, a redirect target, a name. Encoding the whole URL is for text that is already a complete URL with a few unsafe characters in it.
Why does %20 sometimes appear as + instead?
HTML forms historically encode spaces as +. Both conventions exist; a server has to know which one it is receiving.
Is my URL sent anywhere?
No. The conversion happens in your browser.

More developer tools

All developer tools →