URL Encode/Decode

Input
Encode
Result

URL Encode/Decode Tool: Handle URLs & Special Characters with Ease

The URL Encode/Decode Tool helps you quickly convert between URL-encoded strings and plain text. When transmitting Chinese characters, spaces, or special symbols in URLs, they must be percent-encoded. This tool automatically detects whether to encode or decode — just paste your text and click once.

Features & Usage Tips

Paste any text and the tool automatically encodes or decodes it, with swap, paste, and clear helpers for chaining operations.

URL Encoding Essentials

What is URL Encoding (Percent-encoding)? URL encoding (also known as percent-encoding) is a mechanism that converts unsafe characters in URLs into a %XX format, where XX is the hexadecimal representation of the character's ASCII code. It is a fundamental web standard defined in RFC 3986.
  • encodeURI vs encodeURIComponent: The most commonly confused concept. encodeURI preserves ?, #, / — good for encoding a whole URL (e.g. https://example.com/path?query=value). encodeURIComponent encodes ALL non-alphanumeric characters — use it for query parameter values (e.g. name=%E5%BC%A0%E4%B8%89). This tool uses encodeURIComponent/decodeURIComponent for the broadest coverage.
  • Reserved Characters: :, /, ?, #, &, = have special meanings in URLs. When they appear as data in parameters, they must be encoded or they'll be misinterpreted as URL structure.
  • Safe Characters: Letters (A-Z, a-z), digits (0-9), and -, _, ., ~ never need encoding — their meaning in URLs is unambiguous.
  • Unicode & Emoji: Chinese characters typically encode to three %XX sequences (e.g. 张 → %E5%BC%A0), emoji encode to more (e.g. 🚀 → %F0%9F%9A%80).

Use Cases

🔗 API Debugging: When building GET requests in Postman or code, parameters with Chinese or special characters need encoding. Decode a URL here to see what parameters are actually being sent — great for troubleshooting API issues.

📧 Email Link Generation: HTML email links with Chinese parameters (e.g. utm_source=promotion) must be encoded to work correctly. Encode first, then embed in your email template.

🔍 URL Parameter Analysis: Analytics tools and ad platforms return encoded URLs. Paste them here to decode and instantly see readable parameter names and values.

🛠️ OAuth/SSO Debugging: OAuth callback URLs often contain encoded state and code parameters. Decode them to verify correct parameter passing when troubleshooting authentication flows.

Privacy & Security

This tool runs entirely in your browser. All encoding and decoding operations are processed locally on your device. Your input is never sent to any server — even URLs containing sensitive tokens or session IDs are safe to process here.