Skip to content

URL Encode & Decode

Percent-encode text for URLs or decode encoded URLs. Runs in your browser.

Loading tool…

About this url encode & decode

This tool percent-encodes text so it is safe to put in a URL, and decodes encoded URLs such as caf%C3%A9%20%26%20bar back into readable text. Results update as you type, and a Swap button sends the output back to the input so you can check the round trip.

It is for developers building query strings and redirect links, marketers reading long tracking links, and anyone who received a link full of %20 and %3D. When you paste a full URL, the tool also breaks it into scheme, host, path and fragment, and lists every query parameter with its decoded value in a table.

Everything happens in your browser. Links often carry session tokens, email addresses or campaign data, and none of it is sent anywhere.

Features

  • Component and Full URL modes

    Component mode encodes a single value, including / ? & and =. Full URL mode keeps the characters that give a URL its structure, so the link still works after encoding.

  • Decoding that does not give up

    A stray % or a broken byte sequence does not stop the decode. The tool decodes everything it can, keeps the broken parts as they were, and lists each one with its position.

  • Plus signs as spaces

    Turn on the + option to write spaces as + when encoding, or to read + as a space when decoding, the way HTML forms and many query strings do.

  • Double-encoding check

    If a decoded result still contains sequences such as %20, the tool tells you the text was probably encoded twice and offers a Decode again button.

  • URL and query parameter breakdown

    Paste a URL or a bare query string such as a=1&b=2 to see each part and every parameter decoded in a table, each with its own copy button.

  • Strict RFC 3986 and line-by-line options

    Strict mode also encodes ! ' ( ) and *, which some APIs and signature schemes require. Line-by-line mode encodes or decodes each line on its own and keeps the line breaks.

  • Full Unicode support

    Accented letters, non-Latin scripts and emoji are encoded as UTF-8 bytes, so πŸš€ becomes %F0%9F%9A%80 and decodes back exactly.

How to use the url encode & decode

  1. 1Choose Encode or Decode.
  2. 2Paste text or a URL and pick Component or Full URL. The result updates as you type.
  3. 3Copy the result or single values from the URL breakdown.

When to use it

  • Building a query string

    Encode a search term or a redirect address before adding it as a parameter, so characters such as & and = do not break the link.

  • Reading a tracking link

    Paste a long marketing or email link to see each UTM tag and parameter in plain text.

  • Debugging redirects and callbacks

    Decode the redirect_uri or state parameter in an OAuth or login flow to see what is actually being passed.

  • Cleaning up copied links

    Turn a link full of %20 and %2F into readable text for documentation, a support ticket or a chat message.

  • Encoding a list of values

    Use line-by-line mode to encode many values at once, such as a list of search terms or file names.

Percent-encoding explained

A URL may only contain a limited set of characters: letters, digits and a few symbols. Some symbols, such as / ? & = and #, have special jobs. They separate the path, start the query, split parameters and mark the fragment.

Percent-encoding lets any other character travel safely. The character is converted to UTF-8 bytes, and each byte is written as % followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and Γ©, which is two bytes in UTF-8, becomes %C3%A9.

Decoding reverses the process. Each %XX sequence is turned back into a byte, and the bytes are read as UTF-8 text.

Component mode or Full URL mode?

Use Component mode for a piece that goes inside a URL: one query value, one path segment, or a whole URL that you pass as a parameter to another URL. It encodes everything except letters, digits and - _ . ! ~ * ' ( ). This matches JavaScript's encodeURIComponent.

Use Full URL mode when you have a complete address with spaces or non-English characters and want it to stay a working link. It keeps : / ? & = # and similar characters, and it leaves existing %XX sequences alone so they are not encoded a second time. This is close to JavaScript's encodeURI.

  • Search term "red & blue" as a value: Component mode gives red%20%26%20blue.
  • Whole link https://example.com/a b?q=1 2: Full URL mode gives https://example.com/a%20b?q=1%202.
  • Link inside another link's redirect parameter: Component mode, so its / and ? are encoded too.

%20 or +: how spaces are encoded

In the path of a URL, a space is always %20. In a query string, HTML forms send spaces as +, and most servers read + as a space there. That is why the same space can appear as %20 in one link and + in another.

When you decode a query string that came from a form, turn on Treat + as space. When you decode a path or a value where + is a real plus sign, leave it off. In Full URL mode the option only applies to the query part, never the path.

Why use Mavros

Β MavrosTypical upload sites
Where your text goesStays in your browserOften sent to a server on each conversion
Broken % sequencesDecodes the rest and lists each problemShows an error and no result
Query parameter tableBuilt in, with copy buttonsRarely offered
Double-encoding checkDetects it and offers Decode againNot checked
Live resultsUpdates as you typeOften needs a button press

Tips

  • If a decoded link still shows %20 or %3A, press Decode again. The text was encoded twice.
  • Encode each parameter value on its own in Component mode, then join them with & and =. Encoding the finished query string would also encode the separators.
  • Use Strict RFC 3986 when an API signature (for example OAuth 1.0) must match exactly.
  • Paste a full URL in Decode mode to get the parameter table, then copy single values from it.
  • Use Swap to check that encoding and then decoding gives back exactly what you started with.

Questions

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are not allowed in a URL with % and two hex digits per UTF-8 byte. For example, a space becomes %20.

How do I decode a URL?

Choose Decode, paste the URL or text, and the readable version appears on the right. If the input is a full URL, the parameters are listed in a table below.

What is the difference between Component and Full URL mode?

Component mode (encodeURIComponent) also encodes characters like / ? & =, which is right for a single query value. Full URL mode (encodeURI) keeps those characters so the URL still works.

Why is a space sometimes %20 and sometimes +?

%20 is the standard encoding for a space anywhere in a URL. HTML forms send spaces in query strings as +. Use the + option to match the format you need.

Why do I get a "malformed URI" error elsewhere?

That error appears when text contains a % that is not followed by two hex digits, or bytes that are not valid UTF-8. This tool keeps those parts unchanged, decodes the rest, and shows where each problem is.

What does %2520 mean?

It is a double-encoded space. %25 is the code for the % sign, so %2520 decodes to %20, which decodes to a space. Press Decode again to remove the second layer.

Which characters are safe in a URL without encoding?

Letters A to Z and a to z, digits 0 to 9, and - . _ ~ are always safe. Other symbols either have a special meaning in URLs or must be encoded.

Does it support emoji and non-English text?

Yes. Text is encoded as UTF-8, which is what browsers and servers expect, so any language and any emoji round-trips correctly.

Is my data sent anywhere?

No. Encoding, decoding and the URL breakdown all run in your browser. Nothing you paste is uploaded.