Developer tool

URL Encoder & Decoder

Paste a URL or a piece of text, choose a direction and copy the result.

Runs in your browser. No upload.

Use encode for text that must travel safely inside a URL.

About this tool

URL Encoder & Decoder made simple.

The conversion happens instantly in your browser with the native URL standard.

Guide

Using URL Encoder & Decoder

This page turns plain text into percent-encoded text, and back again. Percent encoding replaces characters that are not safe inside a link, such as spaces, ampersands and accented letters, with a percent sign and two hex digits. Paste your text, choose Encode or Decode, and press Convert. It encodes the whole input as one piece of text, so it is meant for values like a search term. It does not check or fix full web addresses.

How to use it

  1. Paste or type your text into the box. Use the whole text you want to convert.
  2. Choose Encode URL text to make it safe for a link, or Decode URL text to turn percent codes back into normal characters.
  3. Press Convert. The answer appears in the Result box and a green message says the conversion is complete.
  4. Press Copy result to copy it. Press Clear to empty both boxes and start again.

Worked examples

Encode a phrase with a space

You enter
Mode
encode
Text
hello world
You get
Result
hello%20world

A space becomes %20. The tool does not use a plus sign for spaces.

Run through the tool’s own code.

Encode a full address

You enter
Mode
encode
Text
https://example.com/search?q=cats & dogs
You get
Result
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcats%20%26%20dogs

Colons, slashes, question marks, equals signs and ampersands are all encoded too. The result is no longer a clickable address, which is right when the whole thing is a value inside another link.

Run through the tool’s own code.

Letters outside plain English

You enter
Mode
encode
Text
café 日本
You get
Result
caf%C3%A9%20%E6%97%A5%E6%9C%AC

Each character is turned into UTF-8 bytes, and each byte is written as a percent code. The accent in é uses two bytes.

Run through the tool’s own code.

Decode, and an error case

You enter
Mode
decode
Text
caf%C3%A9
You get
Result
café
Bad input
100% gives the error: This text has an invalid URL escape sequence.

Valid codes turn back into letters. A lone percent sign that is not followed by two hex digits cannot be decoded, so the tool clears the result and shows an error.

Run through the tool’s own code.

When it helps

  • Prepare a search phrase or a name before you add it to a link as a query value.
  • Read a long link full of %20 and %2F codes by decoding it.
  • Check what a tracking or redirect parameter really contains.
  • Build a mailto or share link whose subject line has spaces and symbols.
  • Test how text with accents or non-Latin letters will look in a link.
  • Fix a link that broke because an ampersand or hash sign was inside a value.

Limits to keep in mind

  • It encodes everything except letters, digits and the symbols - _ . ! ~ * ' ( ). That includes slashes, colons and question marks, so do not feed it a complete address and expect a working link back.
  • Decoding does not turn a plus sign into a space. Text such as a+b stays as a+b.
  • Decoding a text that has been encoded twice only removes one layer. %252F becomes %2F, and you must press Decode again to get a slash.
  • Invalid codes such as a lone percent sign or %zz stop the conversion and show an error instead of a partial result.
  • It converts one piece of text. It does not split an address into parts, validate it or open it.

Tips

  • Encode each value on its own, such as the search term, and then place it after the equals sign yourself.
  • If a result still shows %25 in it, the text was probably encoded twice. Decode once more.
  • A new line is encoded as %0A, so you can paste several lines, but check that the link you build can carry them.
  • Do not paste secrets such as passwords. Encoding hides nothing, because anyone can decode it.

Sources

Common questions

About URL Encoder & Decoder.

What does URL encoding do?

It replaces characters that could confuse a link, such as spaces, ampersands and non-English letters, with a percent sign and two hex digits. The result can travel inside a link without being cut or misread by a browser or server.

Why does a space turn into %20?

The space character has the byte value 20 in hexadecimal, and percent encoding writes that as %20. Some form data uses a plus sign for spaces instead, but this tool always writes %20.

Should I paste a whole URL or only part of it?

Paste only the part that is a value, like a search term or a name. If you paste a whole address, the slashes and colons are encoded too and the link will not open. Use a URL parser to read an address instead.

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves characters that structure a link, such as slashes and question marks, alone. encodeURIComponent encodes them. This tool follows the encodeURIComponent style, so it is meant for single values.

Why do I get an invalid URL escape sequence error?

The text has a percent sign that is not followed by two valid hex digits, or the codes form bytes that are not valid UTF-8. Fix or remove the broken part, for example change a bare 100% into 100%25, and try again.

How do I decode a plus sign as a space?

This tool does not do it. Replace each plus sign with a space yourself before you decode, but only if the text really came from form data. In normal paths and in most other places a plus sign means a plus sign.

Does it handle emoji and other languages?

Yes. Characters are converted to UTF-8 bytes first, so an emoji such as a smiling face becomes %F0%9F%98%80 and Japanese letters become groups of three codes each.

Is the text I paste uploaded anywhere?

No. The conversion happens in your browser with built-in functions, and nothing is sent to a server. Even so, avoid pasting passwords or private keys into any web page.

Is URL encoding a form of security or encryption?

No. It only changes how characters are written, and anyone can reverse it with one click. Never use it to hide private data.

When should I URL encode text?

Encode text when it contains spaces or special characters that need to be represented safely inside a URL.

What does URL decoding do?

Decoding turns percent-encoded characters, such as %20, back into readable text.