Text to URL encoded converter
Type or paste text and this tool shows it in URL-encoded form, which is safe to put in a web address or a query string.
Results
Enter your values to see the result.
About this tool
Spaces and special characters are replaced by percent signs and codes, so links work correctly.
- How it is calculated
- every character except letters, digits and - _ . ~ is replaced by % and the hexadecimal value of each of its UTF-8 bytes (a space becomes %20).
- Worked example
- With Text: hello world & more?, the result is: URL-encoded text: hello%20world%20%26%20more%3F.
- Good to know
- Every character except letters, digits and the symbols hyphen, underscore, full stop and tilde is replaced by a percent sign and the hexadecimal value of each of its UTF-8 bytes. A space becomes %20, not a plus sign.
Frequently asked questions
Why do web addresses need encoding?
Some characters, such as spaces, question marks and ampersands, have special meanings in an address. Encoding them makes sure they are read as ordinary text.
Why is a space shown as %20?
The percent sign marks a code, and 20 is the hexadecimal value of a space. Some forms use a plus sign instead, but %20 works everywhere.