URL Encode / Decode

Encode or decode URL components. All in your browser.

Try it with this example

Type "hello world!" and click Encode to get hello+world%21. Paste the result and Decode to reverse.

What is this tool?

URLs can only contain a limited set of characters: letters, digits, and a few symbols like hyphen and underscore. Spaces, slashes, ampersands, and other special characters have special meanings in URLs or simply aren't allowed. URL encoding (also called percent-encoding) replaces such characters with a percent sign followed by their hex value. A space becomes %20, an ampersand becomes %26. This encoding is what makes it safe to put arbitrary text into query strings, path segments, and form data.

This tool encodes text for use in URLs. Type "hello world!" and encode it: you get hello%20world%21. Paste that back and decode to reverse. When building links or API requests programmatically, you often need to encode parameter values. A search query like "coffee & tea" must become "coffee%20%26%20tea" in a URL. Forgetting to encode causes broken links, security issues, or incorrect parsing. This tool lets you test encoding and decoding without writing code.

Different parts of a URL have different encoding rules. Query parameters typically encode spaces as + or %20; other characters use %XX. Path segments encode slashes as %2F. The tool uses standard percent-encoding suitable for query strings and form data. If you're building a full URL, encode each component separately: the path, then the query string. Many programming languages have built-in functions (encodeURIComponent in JavaScript, urlencode in PHP), but when debugging or manually constructing a URL, this tool is quicker.

Decoding is equally important. When you receive a URL-encoded string—from a form submission, a redirect, or an API—decoding shows the original value. Logs and debug output often show encoded values; decoding them here makes them readable. APIs sometimes return encoded JSON or strings in query parameters; decode first, then parse. The tool handles both directions with a single click.

All processing runs in your browser. No data is sent to a server. That matters when encoding sensitive values or tokens. Use it for quick conversions, testing edge cases, or verifying how your code should encode a tricky string. It's a staple utility for web developers and anyone working with URLs or APIs.