URL
Developer Tool

URL Encoder / Decoder

Percent-encode and decode URLs and URI components. Parses and visualizes query string parameters. Supports full URL and component-only encoding modes.

⟶ Input
⟵ Result

What Is URL Encoding?

URL encoding (percent-encoding) converts characters that are not allowed in URLs into a safe representation: a % followed by two hexadecimal digits representing the byte value. For example, a space becomes %20, and & becomes %26. This ensures URLs remain valid across all browsers and servers.

encodeURIComponent vs encodeURI

encodeURIComponent encodes all special chars including / : @ ? &. Use it for individual parameter values. encodeURI preserves URL structure — use it for complete URLs.

+ vs %20 for Spaces

In query strings, spaces can be encoded as + (HTML form encoding) or %20 (RFC 3986). Modern APIs prefer %20. Always decode both when parsing input.

When You Need It

URL encode values before including them in query strings, form submissions, redirect URIs, or API calls. Special characters like # & = ? break URL parsing if unencoded.

Reserved Characters

RFC 3986 defines reserved chars: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. They have special meaning in URLs and must be percent-encoded when used as data values.