Encodes or decodes URLs and query strings safely.
Input
hello world? (encode)
Output
hello%20world%3F
Input
hello%20world%3F (decode)
Output
hello world?
URL encoding also called percent-encoding turns characters that are not safe inside a URL into a percent sign followed by their hexadecimal code. Spaces and question marks and ampersands and plenty of other characters carry special meaning in a URL's structure. So they need encoding whenever they show up as part of a value such as a search query or a path segment or a form field rather than as part of the URL's own syntax.
This comes up constantly when building links or debugging query strings or working with APIs. A search query like 'coffee & tea' needs to become 'coffee%20%26%20tea' before it is safe to append to a URL since a raw ampersand would otherwise read as a separator between query parameters instead of part of the search text. Decoding reverses that process turning a percent-encoded string copied from a browser's address bar or a server log back into readable text.
This tool uses the same scheme as JavaScript's built-in `encodeURIComponent` and `decodeURIComponent` functions, which is the right choice for encoding individual values, like a single query parameter, rather than an entire URL, since it also encodes characters such as '/' and '&' that matter inside a full URL's structure but not inside one value.
As with the rest of the tools here, encoding and decoding happen instantly and entirely in your browser. There's no server round-trip, and nothing you type gets transmitted anywhere. I still double-check tricky query strings by eye before shipping them, even with a tool doing the encoding. Old habits.
More Developer Tools