URL Encoder / Decoder

Encode or decode URLs and query strings using encodeURIComponent or encodeURI.

Processed in your browser. No data is sent to our servers.

How to Encode and Decode URLs

Choose Encode or Decode mode with the toggle, then paste your text. In Encode mode, special characters are percent-encoded so they can safely appear in URLs and query strings. In Decode mode, percent-encoded sequences are converted back to readable characters. You can also switch between encodeURIComponent (encodes everything except unreserved characters) and encodeURI (preserves URL structure characters like /, ?, and #). The output updates as you type, and the copy button lets you grab the result instantly.

When to URL Encode

URL encoding is required whenever you include user-generated or dynamic values in URLs. Query parameters with spaces, ampersands, or non-ASCII characters must be encoded to avoid breaking the URL structure or causing server-side parsing errors. APIs that accept form data use application/x-www-form-urlencoded, which is essentially URL encoding. This tool helps you debug encoded URLs, construct API requests, and verify that your backend is decoding parameters correctly. All processing runs locally in your browser.

Frequently Asked Questions

encodeURI preserves characters that are part of URL structure (://?#[]@!$&'()*+,;=). encodeURIComponent encodes those too, making it suitable for query parameter values.

Yes. Non-ASCII characters are encoded as UTF-8 byte sequences, each byte represented as %XX.

No. URL encoding uses percent signs (%20 for space), while HTML encoding uses entities (& for &). They serve different purposes.