๐Ÿ› ๏ธ Developer & Web

URL Encoder & Decoder

Percent-encode text for URLs, decode messy links and inspect query parameters.

  • 2Encode modes
  • %XXUTF-8 bytes in hex
  • + โ†’ spaceHandled when decoding
  • LiveURL parts table

PartValue

How to use the URL Encode / Decode

  1. 1

    Paste text or a URL

    Put a link, a query value or encoded text in the box.

  2. 2

    Choose an action

    Encode component for a single value, Encode full URL for a whole link, or Decode.

  3. 3

    Read the parts table

    If the box holds a valid URL, its protocol, host, port, path, hash and query parameters appear below.

  4. 4

    Copy

    The box is updated in place; use Copy to take the result.

Features

Component encoding

Uses encodeURIComponent, escaping / ? & = # and every other reserved character.

Full-URL encoding

Uses encodeURI, keeping the URLโ€™s structure while fixing spaces and non-ASCII text.

Forgiving decode

Turns + into a space and decodes every %XX sequence, including multi-byte UTF-8.

Parameter table

Each query parameter is listed separately, already decoded.

Unicode-ready

Hindi, emoji and accented text are encoded as UTF-8 bytes, as browsers and servers expect.

Clear errors

A % not followed by two hex digits is reported instead of producing garbage.

Who uses it โ€” and for what

Marketers

Build and check UTM links with campaign names that contain spaces or symbols.

Developers

Encode a redirect URL or search term before adding it to a query string.

Support teams

Decode long, unreadable links from logs or customer reports.

SEO specialists

Read encoded non-English URLs and check their parameters.

Component vs full URL encoding

Encode component (encodeURIComponent) escapes every reserved character including / ? & =. Use it for a single value you are putting into a query string, such as a search term or a redirect URL.

Encode full URL (encodeURI) leaves the URL structure intact and only escapes spaces and characters that are not allowed, which is right for cleaning up a complete link that contains spaces or non-English text.

Reading the parts of a URL

Whenever the input is a valid URL, the table shows the protocol, host, port, path, hash and each decoded query parameter. This is handy for checking UTM tags on marketing links, debugging redirect URLs or reading tracking parameters. A space can appear as %20 or + in query strings; decoding handles both.

How percent-encoding works

A URL may only contain a limited set of ASCII characters. Everything else โ€” spaces, Hindi or Tamil letters, emoji, and reserved characters used as data โ€” is written as UTF-8 bytes, each shown as % plus two hex digits. A space is one byte (%20), โ‚น is three (%E2%82%B9), and many emoji are four.

Characters fall into three groups:

GroupExamplesencodeURIencodeURIComponent
UnreservedAโ€“Z aโ€“z 0โ€“9 - _ . ~KeptKept
Reserved (structure): / ? # @ ! $ & ' ( ) * + , ; =KeptEscaped, except ! ' ( ) *
Everything elsespace, %, <, >, ", non-ASCIIEscapedEscaped

The + sign has a history: in HTML form submissions (application/x-www-form-urlencoded) a space is sent as +, so decoders for query strings treat + as a space. In a path, + is just a plus. That is why a literal plus in a value should always be sent as %2B.

Worked examples

Component vs full URL

Input: https://shop.example.com/search?q=steel bottle & cup&city=เคจเคˆ เคฆเคฟเคฒเฅเคฒเฅ€

Encode full URL:

https://shop.example.com/search?q=steel%20bottle%20&%20cup&city=%E0%A4%A8%E0%A4%88%20%E0%A4%A6%E0%A4%BF%E0%A4%B2%E0%A5%8D%E0%A4%B2%E0%A5%80

Spaces and Hindi letters are encoded, but the & inside โ€œbottle & cupโ€ is not โ€” so a server would read q as โ€œsteel bottle โ€ and see a stray parameter. Encode full URL cannot know which & is data. The correct approach is to encode each value as a component and build the URL from the pieces: steel bottle & cup as a component is steel%20bottle%20%26%20cup.

Encode component on the whole link escapes everything, including https%3A%2F%2F โ€” right only when the entire URL is itself a parameter value, such as ?redirect=โ€ฆ.

Decoding pitfalls

  • %E0%A4%A8%E0%A4%88 decodes to เคจเคˆ โ€” each Hindi letter takes three bytes.
  • C%2B%2B decodes to C++, but plain C++ decodes to C followed by two spaces, because the decoder treats + as an encoded space.
  • 100% on its own cannot be decoded (a bare %); encoded as a component it is 100%25.

Pro tips

  • If decoding fails with โ€œMalformed percent-encodingโ€, look for a lone % (for example โ€œ50% offโ€) and replace it with %25 first.
  • Encode a redirect or callback URL with Encode component before putting it inside another URLโ€™s query string.
  • The parts table updates as you type, so you can paste a link and read its parameters without pressing any button.

Glossary

Percent-encoding
Writing a byte as % followed by two hexadecimal digits, for example %20 for a space.
Reserved character
A character with a structural meaning in URLs, such as ?, & or /.
Query string
The part of a URL after ?, made of name=value pairs separated by &.
UTM parameters
Standard query parameters such as utm_source and utm_campaign used to track marketing links.

Frequently asked questions

What does %20 mean in a URL?

It is an encoded space. Characters that are not allowed in URLs are replaced with % followed by their hex byte value.

Should I use encodeURI or encodeURIComponent?

Use encodeURIComponent for individual parameter values and encodeURI for a complete URL.

Why is + turned into a space?

In query strings, + traditionally means a space, so the decoder treats it that way.

Why does my encoded Hindi URL look so long?

Each Devanagari letter is three UTF-8 bytes, and each byte becomes three characters (%XX), so one letter takes nine characters. Browsers usually display the readable version in the address bar.

Is %20 or + correct for spaces?

Both are understood in query strings. %20 is correct everywhere, including paths, so it is the safer choice; this toolโ€™s encoders always produce %20.

Does encoding make a URL secure?

No. Encoding only makes characters valid in a URL; anyone can decode it. Never put passwords or secrets in URLs.

Found it useful? Share the URL Encode / Decode:

Last updated 2026-11-28 ยท Built by Vinayak Agarwal ยท Part of Developer & Web (77 tools)