URL Encoder / Decoder

Percent-encode or decode text and URLs instantly. Everything runs in your browser — your text never leaves your device.

How to encode or decode a URL

  1. Paste your text or URL into the top box.
  2. Decide on the mode. Leave Full-URL mode unticked when you are encoding a single value, such as a search term or one query-string parameter. Tick it when you are pasting an entire address you want to keep working.
  3. Click Encode to percent-encode, or Decode to reverse it, then click Copy result.

What is URL encoding?

A URL may only contain a limited set of ASCII characters. Anything else — spaces, accented letters, emoji, or characters that already have a job in the address such as & and # — has to be written as one or more %XX sequences, where XX is the byte value in hexadecimal. This is called percent-encoding and is defined in RFC 3986. A space becomes %20; the letter é is two bytes in UTF-8, so it becomes %C3%A9; an emoji such as the grinning face is four bytes: %F0%9F%98%80.

Component mode or Full-URL mode?

This is the single most common source of broken links, so it is worth understanding. The tool uses the browser's own encodeURIComponent in the default mode and encodeURI in Full-URL mode.

  • Component mode leaves only letters, digits and - _ . ! ~ * ' ( ) alone. Everything else is escaped, including / ? : # & = +. Use it for one piece of a URL, such as the value of a parameter.
  • Full-URL mode additionally leaves the characters that give a URL its structure — ; , / ? : @ & = + $ # — so the address keeps its shape while spaces and non-ASCII characters are still escaped.

Example: the whole address https://example.com/my page?q=café encodes in Full-URL mode to https://example.com/my%20page?q=caf%C3%A9, which still works. In Component mode the same input becomes https%3A%2F%2Fexample.com%2Fmy%20page%3Fq%3Dcaf%C3%A9, which is correct only if you are embedding that whole address as a value inside another URL, for instance a redirect parameter.

Encoding a parameter value correctly

Suppose a user searches for R&D = 50% off. If you paste that unencoded into ?q=, the & starts a new parameter, the = confuses the parser and the % is read as the start of an escape. Component mode returns R%26D%20%3D%2050%25%20off, which every server decodes back to the original. Build the final URL by encoding each value separately and then joining them with real & and = characters — never encode the finished query string in Component mode, or the joiners are escaped too.

Details of how decoding behaves

  • In Component mode, Decode first turns every + into a space, because HTML forms and many query strings use + for spaces. If your text contains a genuine plus sign that was not encoded as %2B, it will come out as a space.
  • In Full-URL mode, Decode does not convert + and deliberately leaves escapes for reserved characters such as %2F, %3F and %23 as they are, so decoding cannot change the structure of an address.
  • Malformed input — a lone %, an escape that is not hexadecimal, or bytes that do not form valid UTF-8 — produces the message “Not valid encoded text” instead of garbled output.

Common mistakes

  • Double encoding. Encoding text that is already encoded turns %20 into %2520, because the percent sign itself is escaped to %25. If you see %25 in a link, decode once and check the result.
  • Encoding a whole URL in Component mode and then wondering why it no longer opens.
  • Assuming a space is always +. This tool writes %20, which is valid in every part of a URL; + means a space only inside form-style query strings.

Is it private and safe?

Yes. Encoding and decoding use functions built into your browser, so nothing is sent to a server. That matters because URLs often contain tokens, email addresses or tracking IDs you would not want to paste into a tool that logs its input.

Related guides: How to URL encode text for a step-by-step walkthrough, and JSON escape characters for a different kind of escaping. Related tools: HTML entity encoder, Base64 encode / decode and slug generator.

Frequently asked questions

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are not allowed or have a special meaning in a URL with a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and the letter e with an acute accent becomes %C3%A9.

What is the difference between Component mode and Full-URL mode?

Component mode (encodeURIComponent) escapes everything except letters, digits and a few marks, including slashes, question marks, colons and ampersands. Full-URL mode (encodeURI) leaves those structural characters alone so a complete address stays usable. Use Component mode for a single parameter value and Full-URL mode for a whole link.

Why did my link break after encoding?

Most likely you encoded a complete URL in Component mode, which also escapes the slashes, colon and question mark that make the address work. Tick Full-URL mode and encode again, or encode only the individual values and then assemble the URL.

Why does my decoded text show spaces where I expected plus signs?

In Component mode the decoder treats every + as a space, following the convention used by HTML forms. A literal plus sign should have been encoded as %2B. If your text came from a path rather than a query string, use Full-URL mode, which leaves + unchanged.

What does it mean when I see %2520 in a link?

It is a double-encoded space. The original %20 was encoded a second time, so its percent sign became %25. Decode the text once to get back to a normal %20, and make sure only one step in your pipeline performs the encoding.

How are emoji and non-English characters encoded?

Characters are first converted to UTF-8 bytes and each byte is written as a percent escape. A Latin letter with an accent takes two bytes, most Korean, Japanese and Chinese characters take three, and emoji take four, so a single character can produce up to twelve characters of output.

Is my text uploaded?

No. Encoding and decoding run entirely in your browser using built-in functions, so nothing is sent to a server or stored.

Is it free?

Yes. It is completely free with no sign-up.