URL Encoder & Decoder

Safely encode text for web transmission or decode messy URLs back to readable text instantly.

Characters
Malformed URI!

The text you entered contains an invalid URL encoded character (like a standalone '%' sign). Please check your input.

Why URLs Need Encoding

A URL can only contain a limited set of characters. Some characters have special jobs: ? starts the query string, & separates parameters, = links a name to a value and # marks a fragment. Others, such as spaces, quotes, Hindi letters or emojis, are not allowed at all. If you put them into a URL unchanged, the link may break or the server may read the wrong value.

URL encoding (percent-encoding) fixes this by replacing each problematic character with % plus its hexadecimal byte value. This tool encodes text so it is safe to place in a URL, and decodes messy encoded URLs back into readable text.

How to Use the URL Encoder / Decoder

  1. Select URL Encode or URL Decode.
  2. Type or paste your text (use Paste for quick input).
  3. The result appears instantly. Copy it with one click.
  4. If a string can’t be decoded, a clear error message explains why.

Examples

OriginalEncoded
hello world & more?hello%20world%20%26%20more%3F
chai & samosachai%20%26%20samosa
price=100/kgprice%3D100%2Fkg
क%E0%A4%95

Common Percent-Encoded Characters

CharacterEncodedCharacterEncoded
space%20&%26
/%2F=%3D
?%3F#%23
:%3A+%2B
@%40%%25

A Practical Example

Suppose you are building a search link and the user searches for chai & samosa. If you insert it directly:

https://example.com/search?q=chai & samosa

the server sees the parameter q=chai followed by a broken second parameter. Encoding the value first gives the correct link:

https://example.com/search?q=chai%20%26%20samosa

encodeURIComponent vs encodeURI

JavaScript offers two functions:

  • encodeURIComponent() encodes nearly everything, including / ? & = :. Use it for individual values such as query parameters. This tool uses it.
  • encodeURI() leaves URL structure characters alone. Use it when encoding a complete URL that only has a few unsafe characters, like spaces.

In PHP the equivalents are rawurlencode() (spaces as %20) and urlencode() (spaces as +).

Who Uses This Tool?

  • Developers building API requests, redirect URLs and OAuth callback links.
  • Digital marketers creating UTM-tagged campaign links.
  • SEO specialists reading encoded URLs from analytics and crawl reports.
  • Anyone trying to make sense of a long, unreadable link full of % signs.

Related Tools

Frequently Asked Questions

URL encoding, also called percent-encoding, replaces characters that are not allowed or have special meaning in a URL with a % sign followed by two hexadecimal digits. A space becomes %20 and an ampersand becomes %26.
HTML forms submitted with the application/x-www-form-urlencoded format use + for spaces in the query string. In the rest of a URL, and in this tool, a space is encoded as %20. Most servers understand both in query strings.
It uses JavaScript's encodeURIComponent, which encodes everything except letters, digits and the characters - _ . ! ~ * ' ( ). That makes it safe for individual query parameter values.
Usually not. Encoding a full URL turns the :// and / characters into %3A%2F%2F, which breaks the link. Encode only the parts you insert into a URL, such as a search term or a redirect address passed as a parameter.
They are first converted to UTF-8 bytes, and each byte is percent-encoded. For example, the Hindi letter "क" becomes %E0%A4%95.
The text contains a % sign that is not followed by two valid hexadecimal digits, or an incomplete multi-byte sequence. This often happens when a URL was cut off or when a literal % was never encoded as %25.