URL encoder / decoder
Encode special characters for use in URLs, or decode a URL-encoded string back to plain text. Runs in your browser.
Common encodings
What is URL encoding?
URLs can only contain a limited set of characters. Spaces, ampersands, equals signs, and other special characters must be "percent-encoded" β replaced with a % followed by their hexadecimal ASCII code. For example, a space becomes %20 and & becomes %26.
This is essential when passing user-submitted data in query strings, building API requests, or constructing redirect URLs. Without encoding, the browser or server may misinterpret the special characters as part of the URL structure.
The RFC 3986 standard defines which characters are "reserved" in URLs (like ?, &, #) and must be encoded when used as data, and which are "unreserved" (letters, digits, -, _, ., ~) and can appear unencoded anywhere.
Frequently Asked Questions
What's the difference between %20 and + for spaces?
Both represent spaces in URLs, but in different contexts. %20 is the standard percent-encoding for a space and works everywhere. The + character is a shorthand for space in the application/x-www-form-urlencoded format (HTML form submissions) but not in the path segment of a URL. When in doubt, use %20.
Why are some characters encoded differently in the path vs the query string?
URL paths and query strings have slightly different reserved character sets. For example, / is a structural separator in the path but can appear unencoded in a query value. This is why you sometimes see URLs where some characters look encoded in one part but not another β it's technically correct.
When do I need to URL-encode data?
Whenever you're programmatically constructing a URL that contains user input or dynamic data β especially in query parameters. In JavaScript, encodeURIComponent() encodes a value for use in a query string, while encodeURI() encodes a full URL while preserving structural characters. Use this tool to quickly check what encoded form a string takes.
Related tools