Skip to content
FastUtil
Menu
Developer Tools

URL Encoder & Decoder

Percent-encode or decode URLs and query strings, and break a URL into its parts.

Private by design: this tool runs entirely in your browser. What you type is not uploaded to our servers.

About this url encoder and decoder

URLs may only contain a limited set of characters. Anything else, such as spaces, accented letters, emoji or reserved symbols that have a special meaning, must be percent-encoded: replaced with a % sign followed by two hexadecimal digits. This tool encodes and decodes text using percent-encoding, and breaks a full URL into its parts so that you can read its query parameters.

How to use it

  1. Paste the text or URL into the input box.
  2. Choose “Component” to encode a single value or query parameter, or “Full URL” to encode a whole address while keeping its structure characters.
  3. Press “Encode” or “Decode”. Tick “Decode + as space” for data from HTML forms.
  4. If the input is a complete URL, the breakdown below lists its protocol, host, path and each decoded query parameter.

Component versus full URL encoding

Choosing the right mode prevents broken links. Encoding a single value, such as a search term or a redirect address that you will put inside a query string, needs “Component” mode: it encodes characters like & = ? / # and : so that they cannot be mistaken for URL structure. Encoding an entire address with “Component” mode would also encode the slashes and colons and make the link unusable.

For a full URL, use “Full URL” mode: it leaves reserved structure characters (: / ? # & = and others) alone and only encodes characters that are not allowed, such as spaces and non-ASCII letters. The two modes correspond to the JavaScript functions encodeURIComponent and encodeURI.

How percent-encoding works

Unreserved characters, which are letters, digits, hyphen, underscore, period and tilde, never need encoding. Every other character is converted to its UTF-8 bytes and each byte is written as %XX. A space becomes %20, an ampersand becomes %26, and “é” becomes %C3%A9 because it takes two bytes in UTF-8.

HTML forms submitted with the application/x-www-form-urlencoded format use a plus sign for spaces, which is why decoding query strings often needs “Decode + as space”. In a URL path, a plus sign is a literal plus, so turn that option off when decoding path segments.

Debugging links and query strings

Paste a long tracking or redirect URL to see each parameter decoded on its own line. This makes it easy to spot double-encoding (a value containing %2520, where %25 is an encoded percent sign), missing encoding in a value that contains an ampersand, or a nested URL that needs a second pass of decoding.

Decoding fails with an “Invalid percent-encoding” message when a % is not followed by two hex digits or the decoded bytes are not valid UTF-8. That usually means part of the text was truncated or encoded with a different character set.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI keeps characters that structure a URL (: / ? # & = and more); encodeURIComponent encodes them so a value can be safely placed inside a query string.

Why do I see %20 and sometimes +?

%20 is the standard encoding of a space. A + represents a space only in form-encoded query strings, so treat it as a space when decoding query data but not in paths.

What does %25 mean?

It is an encoded percent sign. Seeing %2520 means a value was encoded twice (the % of %20 was encoded again).

Does it support non-English characters?

Yes. Characters are converted to UTF-8 bytes first, so accents, other scripts and emoji encode and decode correctly.

Why can’t it decode my text?

A % may not be followed by two hex digits, or the data may not be UTF-8. Check for truncation or copy errors.

Is my URL sent anywhere?

No. Encoding, decoding and the URL breakdown all run in your browser.