URL Encoder/Decoder
Encode or decode URLs and query strings in real-time, both directions.
Common Use Cases
About URL Encoder/Decoder
URL encoding (also called percent-encoding) converts characters that are not safe to use in a URL into a format that can be transmitted over the internet. Every unsafe character is replaced with a percent sign followed by its two-digit hexadecimal ASCII code. A space becomes `%20`, an at-sign becomes `%40`, a forward slash becomes `%2F`, and so on.
This matters because URLs can only contain a limited set of characters as defined by RFC 3986: letters (A-Z, a-z), digits (0-9), and the special characters `-_.~`. Everything else must be percent-encoded. When you include a query parameter containing special characters — like a search term with spaces or an email address with an @ symbol — those characters must be encoded. Many bugs in web applications stem from improperly encoded or doubly-encoded URL parameters.
There's an important distinction between `encodeURIComponent` and `encodeURI` in JavaScript. `encodeURIComponent` encodes everything except letters, digits, and `-_.!~*'()`, making it suitable for encoding individual query parameter values. `encodeURI` leaves characters that are valid as part of a complete URL structure (like `/`, `?`, `=`, `&`) un-encoded — it's for encoding full URLs. This tool uses encodeURIComponent semantics for encoding query string values, which is the correct choice for most developer use cases.
Double-encoding is a common mistake: encoding an already-encoded string converts the `%` sign into `%25`, turning `%20` into `%2520`. This tool shows you the decoded result in real time so you can spot double-encoding immediately.
Frequently Asked Questions
Related Tools
View all Developer ToolsBase64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to plain text in real-time.
JSON Formatter
Paste JSON to auto-format, validate, and spot errors with inline highlighting.
Regex Tester
Test and debug regular expressions with live match highlighting, flag controls, and a quick-reference cheat sheet.