download.fan

URL Encode and Decode

Percent-encode text for URLs and query strings, or decode %20-style URLs back to readable text. Also breaks a URL into its parts. Free.

URL parts
protocolhttps:
hostexample.com
path/search
?qcafé
? crème
?page2

Percent encoding explained

URLs can only contain a limited set of characters, so spaces, accents, emoji and symbols like & and = are written as a % followed by their UTF-8 bytes in hex: a space becomes %20 and é becomes %C3%A9. Encode a single value (the default) when you're building a query string, so & and = inside it don't break the URL. Tick Encode a whole URL to keep the URL's own separators. Decoding also turns + into spaces, as HTML forms send them. The parts table shows the host, path and every query parameter.

How to use it

  1. 1

    Choose encode or decode

    Encode a value or URL, or decode an encoded one.

  2. 2

    Paste the text or URL

    The result updates as you type.

  3. 3

    Check the parts

    For a full URL, see the host, path and query parameters.

Frequently asked questions

What is %20 in a URL?

An encoded space. %2F is a slash, %3D an equals sign and %26 an ampersand.

What's the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), for single values. encodeURI leaves URL separators like : / ? & = # alone.

Why do some URLs use + for spaces?

HTML forms encode spaces as + in query strings. Both + and %20 decode to a space here.

Is anything sent to a server?

No. Encoding and decoding happen in your browser.

Developer tools

Related tools