正在加载,请稍候…

Encode/decode URL-formatted strings

Encode text to URL-encoded format (percent-encoding) or decode it back. Supports full URL and URI component modes, ideal for API development and web debugging.

How to Use

  1. Step 1: Select "Encode" or "Decode" mode.
  2. Step 2: Paste your URL or text into the input box.
  3. Step 3: The encoded/decoded result appears instantly.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts characters that are not allowed in URLs (like spaces, Chinese characters, or symbols) into a %XX format. For example, a space becomes %20.

When do I need to URL-encode a string?

When passing user input as query parameters, constructing URLs programmatically, or handling form data submissions.

What is the difference between URL encoding and Base64?

URL encoding (percent-encoding) converts special characters to %XX format for safe transmission in URLs. Base64 encodes binary data as ASCII text for transmission in text-based protocols. Use URL encoding for query parameters and form data; use Base64 for encoding binary content like files or images.

What is the difference between URL percent-encoding and Base64?

URL encoding (%XX) is specifically for escaping unsafe characters in URLs, converting bytes to % followed by hex digits to keep the URL syntactically valid (e.g., space -> %20, Chinese characters -> %E4%B8%AD). Base64 encodes arbitrary binary data to 64 printable characters for transport over text protocols, increasing size by ~33%. URL encoding is for URL parameters; Base64 is used for data URIs, API authentication, and email attachments.