C
All Tools
🔗

URL Encoder / Decoder

Percent-encode URLs for safe transmission and decode them back. Handles Unicode and special characters.

URLs can only contain a safe subset of ASCII characters. Special characters like spaces, ampersands, question marks, and non-ASCII characters (like Unicode letters or emoji) must be percent-encoded before they can safely appear in a URL. Percent-encoding replaces unsafe characters with a % sign followed by two hexadecimal digits representing the UTF-8 byte value. This tool encodes and decodes URLs using the encodeURIComponent / decodeURIComponent standard, which handles Unicode correctly.

📋 How to Use This Calculator

Choose Encode or Decode with the toggle, paste your input, and click the button. For encoding: paste a raw URL, query parameter value, or any text containing special characters — it will be converted to a safe percent-encoded format. For decoding: paste a percent-encoded URL or query string — it will be restored to the original human-readable form. Common use cases: encoding user search queries before appending to URLs, decoding URL parameters from server logs, and encoding file paths for use in URLs.

💡 Key Facts & Information

There are two URL encoding functions in JavaScript: encodeURI() preserves URL structure characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) and only encodes characters that are invalid in URIs. encodeURIComponent() is more aggressive — it encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — making it suitable for encoding individual query parameter values or path segments. This tool uses encodeURIComponent which is the correct choice for encoding values (not full URLs). Spaces become %20 (not + — that is an older form used only in application/x-www-form-urlencoded, not in modern URLs).

Frequently Asked Questions

Disclaimer: The results provided by this calculator are for informational and educational purposes only. They do not constitute financial, medical, or legal advice. Always consult a qualified professional before making financial or health decisions. Actual results may vary based on individual circumstances.

⚙️ More Developer Tools Tools

View all Developer Tools tools →