URL Encode/Decode

Encode
Input
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

  • Smart Auto-detection: The tool automatically detects if your input should be encoded or decoded — if it contains %XX patterns it switches to decode, otherwise encode. No manual mode switching, just click the button.
  • Swap for Multi-step Operations: After encoding or decoding, click the Swap button to move the result back to the input. Useful for chaining operations — encode once, swap, then encode again to see double-encoding, or test with examples and swap to modify.
  • Paste & Clear: The Paste button reads text directly from your clipboard (keyboard shortcut friendly). Clear resets everything. Tip: Copy a URL from your browser address bar, paste it here — the tool will automatically detect if it needs decoding.
  • Character Statistics: Shows character length for both input and result. Notice how a single Chinese character becomes 9 characters when encoded (e.g., %E5%BC%A0) — a clear indicator of encoding overhead.

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.