URL Encoder / Decoder
Percent-encode or decode URLs and URL components, or parse a URL into its individual parts.
encodeURIComponent — encodes all special chars including : / ? # @ =
Output will appear here...Related tools
About URL Encoding
URLs can only be sent over the internet using the ASCII character set. Characters outside ASCII — or characters that have special meaning in a URL (like &, =, spaces, and non-Latin characters) — must be percent-encoded. Percent encoding replaces each unsafe byte with a % followed by the two-digit hexadecimal value of the byte.
Component encoding vs. full URL encoding
Component mode (encodeURIComponent) encodes all characters that have special meaning in a URL, including : / ? # @ = &. Use this when encoding a query parameter value or any part of a URL that should be treated as a literal string.
Full URL mode (encodeURI) preserves URL structural characters and only encodes characters that are never valid anywhere in a URL. Use this when encoding a complete URL that already has valid structure.
Percent encoding online — practical examples
Percent encoding is most commonly needed when constructing query strings. For example, if a user types hello world & more into a search field, it must be encoded as hello%20world%20%26%20more before being appended to a URL. Spaces become %20, ampersands become %26, and so on. This tool handles the encoding and decoding instantly — paste a raw string to encode it for use in a URL, or paste a percent-encoded string to decode it back to readable text.
Common use cases
- Encoding user-provided values before appending them as query string parameters
- Decoding percent-encoded URLs from log files, network traces, or server errors
- Parsing a URL to inspect its components (protocol, host, path, query params)
- Debugging redirect loops or 400 errors caused by malformed URLs
- Encoding special characters in webhook URLs or OAuth redirect URIs
- Decoding URLs from emails or documents that have been double-encoded
Characters that must be percent-encoded
Reserved characters that carry structural meaning in a URL — ? # & = + : / @ [ ] — must be percent-encoded when used as data inside a URL component. Unreserved characters — letters, digits, hyphens, underscores, periods, and tildes — are always safe and do not need encoding. Non-ASCII characters (e.g. accented letters, emoji, CJK characters) must first be UTF-8 encoded, then each byte is percent-encoded.
Privacy
All encoding and decoding runs in your browser. Learn more about how Dev-Utilities handles privacy.