Skip to content
EverydayInstantTools

URL Encoder / Decoder

Encode or decode text for safe use in a URL query string.

Result

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world

How it works

URLs can only contain a limited set of characters, so anything else is written as a percent sign followed by its byte value in hexadecimal — a space becomes %20, an ampersand becomes %26. This is called percent encoding, and it is what keeps a value containing “&” or “=” from being mistaken for the structure of the query string around it.

Example

hello world & more → hello%20world%20%26%20more

Non-ASCII characters are encoded as their UTF-8 bytes, so a single accented letter or emoji becomes several percent-escaped pairs.

Frequently asked questions

Why do spaces turn into %20?
URLs can't contain literal spaces, so they're percent-encoded as %20 (or sometimes +) to stay valid.
What characters get encoded?
Reserved and non-ASCII characters — spaces, ampersands, question marks, and similar — are converted to their percent-encoded form.