URL Encoder/Decoder

Percent-encode and decode URL strings.

Examples

InputResult
hello worldhello%20world
price=10&currency=EURprice%3D10%26currency%3DEUR
https://example.com/path?q=foo barhttps%3A%2F%2Fexample.com%2Fpath%3Fq%3Dfoo%20bar
name=John Doe&city=New Yorkname%3DJohn%20Doe%26city%3DNew%20York

About this tool

URL encoding (also called percent-encoding) replaces unsafe or reserved characters in a URL with a % sign followed by their hexadecimal byte values. This is required because URLs can only contain a limited set of ASCII characters, and characters like spaces, ampersands, and equals signs have special meaning in URL syntax.

In practice, you will mostly need URL encoding when building query strings by hand or when passing user input as part of a URL. Browsers handle this automatically for links and form submissions, but if you are constructing URLs in code or pasting values into API testing tools, you need to encode parameter values yourself. This tool applies encodeURIComponent-style encoding, which is the right choice for individual parameter values.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves characters like :, /, ?, and & intact because they have meaning in a full URL. encodeURIComponent encodes those characters too, which is what you want when encoding a query parameter value.

Why do spaces sometimes appear as %20 and sometimes as +?

The %20 encoding comes from RFC 3986 (URI standard). The + sign for spaces comes from the application/x-www-form-urlencoded format used by HTML forms. Both are valid in different contexts.

Do I need to URL-encode non-ASCII characters like accented letters?

Yes. Characters outside the ASCII range get encoded as their UTF-8 byte sequences in percent-encoded form. For example, the letter "e" with an accent becomes %C3%A9.

EchoBeaver — Free browser tools