URL Encoder / Decoder
How it works
Paste a URL or any text and click Encode to apply percent-encoding, or paste an already-encoded string and click Decode to get the original back. There are two modes. Encoding a whole URL keeps structural characters like :, /, ? and & intact so the link still works: https://example.com/search?q=caffè latte comes back as https://example.com/search?q=caff%C3%A8%20latte. Encoding a single URL component escapes everything, including those characters, so a value is safe to drop into a query string or a path segment. Percent-encoding is what lets spaces, accented letters and symbols travel through links, form submissions and API calls, which makes this a routine step when you build a query string, debug a redirect, or handle data that contains reserved characters. Everything runs in your browser: nothing you paste is sent anywhere.
Frequently Asked Questions
What is percent encoding?
- Percent encoding (URL encoding) replaces characters that would be ambiguous or unsafe inside a URL with a % followed by the character's two-digit hex code. A space becomes %20, a / becomes %2F, a + becomes %2B. It is the mechanism every browser, HTTP client and server uses to survive special characters in URLs.
What is the difference between URL and component encoding?
- URL encoding (encodeURI) preserves the structural characters :, /, ?, #, & and = so the overall URL remains valid. Component encoding (encodeURIComponent) percent-encodes everything except letters, digits and a handful of safe punctuation, which is what you want when putting a single value into a query string.
Why does my + turn into a space or vice versa?
- It is a historical quirk. Form-encoded request bodies (application/x-www-form-urlencoded) encode a space as + rather than %20, while plain URL encoding uses %20. If you round-trip through the wrong decoder, a literal + in the input can come back as a space. This tool sticks to standard RFC 3986 encoding.