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.
Developer tool
Paste a URL or a piece of text, choose a direction and copy the result.
Use encode for text that must travel safely inside a URL.
About this tool
The conversion happens instantly in your browser with the native URL standard.
Guide
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.
A space becomes %20. The tool does not use a plus sign for spaces.
Run through the tool’s own code.
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.
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.
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.
Common questions
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.
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.
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.
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.
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.
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.
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.
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.
No. It only changes how characters are written, and anyone can reverse it with one click. Never use it to hide private data.
Encode text when it contains spaces or special characters that need to be represented safely inside a URL.
Decoding turns percent-encoded characters, such as %20, back into readable text.