FastDevTool

URL Encode / Decode

Encode or decode URL components using percent-encoding.

Frequently Asked Questions

What is URL encoding?

+

URL encoding (also called percent-encoding) converts characters that are not safe to use in URLs into a format that can be transmitted over the internet. Reserved characters like spaces, ampersands, and equal signs are replaced with a percent sign followed by their two-digit hexadecimal code — for example, a space becomes %20.

Which characters need to be URL-encoded?

+

Characters that must be encoded include spaces, and any character that has a special meaning in URLs: & (ampersand), = (equals), ? (question mark), # (hash), % (percent), + (plus), and non-ASCII characters like accented letters or emoji. Letters, digits, hyphens, underscores, dots, and tildes are safe and do not need encoding.

What is the difference between encodeURI and encodeURIComponent?

+

encodeURI encodes a complete URL, leaving structural characters like /, ?, &, and # intact because they are part of the URL structure. encodeURIComponent encodes a single parameter value and also encodes those structural characters. This tool uses encodeURIComponent, which is the correct choice when encoding individual query string values.

Why does a space sometimes appear as + instead of %20?

+

The + notation for spaces comes from the older application/x-www-form-urlencoded format used in HTML form submissions. The modern percent-encoding standard uses %20 for spaces. Both are commonly encountered, but %20 is the correct representation in RFC 3986 URI syntax. This tool uses the %20 convention.

Can I URL-encode an entire URL?

+

You can, but it usually produces an unusable result because the slashes, colons, and dots that give the URL its structure also get encoded. URL encoding is intended for the individual components of a URL — most commonly the values of query string parameters. Encode each parameter value separately, then assemble the full URL.