Utinzo

URL Encoder / Decoder

Encode special characters in URLs (percent-encoding) or decode percent-encoded URLs.

Did this tool work for you?

How to use this calculator

  1. 1

    Paste a URL or query string.

  2. 2

    Choose encode (to percent-encode special characters) or decode (to reverse).

  3. 3

    Use "Encode component" for individual query parameter values.

Frequently asked questions

Which mode should I use for a query-string value?

Encode component. It escapes characters that have meaning in a URL, such as & = ? # / and space, so a value like "a&b=c d/é" becomes a%26b%3Dc%20d%2F%C3%A9 and cannot break out of its parameter. Use the plain Encode mode only on a whole URL, where those characters must keep their roles.

Why did my %20 turn into %2520?

Encode treats the percent sign as an ordinary character and escapes it, so text that is already encoded gets encoded twice: "q=100%25" becomes "q=100%2525". Decode first, or do not run encoded text through the encoder again.

What is the difference between Decode and Decode component?

Decode leaves escapes for reserved characters alone, namely ; / ? : @ & = + $ , and #, because turning %26 into & would change the URL’s structure. Decode component decodes them all. For https://example.com/a%20b?q=caf%C3%A9&x=a%26b%2Fc, Decode gives x=a%26b%2Fc and Decode component gives x=a&b/c.

Does a + sign become a space?

No, in neither direction. This tool follows RFC 3986 percent-encoding, where a space is %20 and a plus is a literal plus. The plus-for-space convention belongs to HTML form data (application/x-www-form-urlencoded). Decoding "a+b%20c" gives "a+b c", so replace plus signs yourself when handling form data.

Why do I get "Cannot decode"?

Either a % is not followed by two hex digits (as in "100%"), or the escaped bytes are not valid UTF-8. Older systems often encode accented letters as single Latin-1 bytes, so caf%E9 fails here while the UTF-8 form caf%C3%A9 works. Fix the stray percent sign or re-encode the source in UTF-8.

How are non-English characters and emoji encoded?

As their UTF-8 bytes, each written as %XX. é becomes %C3%A9 and 😀 becomes %F0%9F%98%80, four bytes. A lone half of an emoji (an unpaired surrogate) cannot be encoded and gives an error.

Does encoding make a URL safe or valid?

It only escapes characters; it does not check the structure, the scheme or whether the address exists. Line breaks encode to %0A. Domain names with non-ASCII letters are handled with Punycode, not percent-encoding, so encoding a hostname will not make it work.

About url encoder / decoder

Percent-encoding: whole URLs versus components

Four modes, two jobs

URLs may contain only a limited set of ASCII characters. Anything else is written as a percent sign and two hex digits per UTF-8 byte, as described in RFC 3986. The tool calls the browser's built-in encodeURI and decodeURI for the whole-URL modes and encodeURIComponent and decodeURIComponent for the component modes. Pick the pair that matches whether your input is a whole address or one piece of it.

What each encoder leaves alone
ModeLeft unescapedUse for
EncodeLetters, digits, ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) #A complete URL
Encode componentLetters, digits, - _ . ! ~ * ' ( )One value or path segment
DecodeEscapes for reserved characters stay encodedA complete URL
Decode componentDecodes every valid escapeOne value

Characters that are always escaped

Testing every printable ASCII character shows that both encoders escape the space, double quote, percent sign, less-than, greater-than, backslash, caret, backtick and the brackets [ ], braces { } and vertical bar. Square brackets are escaped even in Encode mode, so an address with an IPv6 host in brackets should not be passed through it.

Worked examples

Encoding the URL https://example.com/path name?q=café&x=1 2#top gives https://example.com/path%20name?q=caf%C3%A9&x=1%202#top: spaces and the é change, while the structure stays intact. Encoding https://example.com/a b?q=100%25 gives a%20b?q=100%2525, showing the double-encoding trap. Encoding a value "a&b=c d/é" as a component gives a%26b%3Dc%20d%2F%C3%A9. Decoding "a+b%20c" returns "a+b c".

Worked example: non-Latin text and emoji

Encoding "日本 😀" as a component returns %E6%97%A5%E6%9C%AC%20%F0%9F%98%80. The five input characters become 33 characters of output: each Japanese character takes three bytes, the space one and the emoji four. The tool reports lengths in JavaScript characters, where the emoji counts as two.

Typical mistakes

Running a full URL through Encode component turns the colon and slashes into %3A and %2F and produces an address that no longer works. Running a query value through plain Encode leaves & and # in place, so a value like "R&D" cuts off the parameter, and "C#" starts a fragment.

Spaces, plus signs and forms

Spaces become %20 here. Web forms submitted the old way use a plus sign for a space instead, and a server that decodes form data expects it. If you decode a query string produced by a form, replace plus signs with spaces before decoding, otherwise a search for "red shoes" comes back as "red+shoes".

When decoding fails, and what the tool does not do

Input such as "100%", "%zz" or "caf%E9" returns an error message instead of output, because the percent sign needs two hex digits and the bytes must form valid UTF-8. The tool does not parse a URL into parts, check that a scheme or host exists, convert hostnames to Punycode or handle form encoding. Leading and trailing spaces are encoded rather than trimmed, and a line break becomes %0A.

Codes you will see most often

Learning a handful of escapes makes encoded URLs readable at a glance. Each is the UTF-8 byte of the character, written in hexadecimal.

Common percent-escapes
CharacterCodeCharacterCode
space%20&%26
#%23+%2B
%%25/%2F
=%3D?%3F
@%40é%C3%A9
URL Encoder / Decoder – Utinzo

Learn more from an authoritative source:

MDN Web Docs
Related tools

Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →