跳到主要内容

URL Encode Decode Online

💡 Tip:The core of URL encoding is to first convert characters to UTF-8 bytes, then perform percent encoding.

Quick String Examples

Click the examples below to quickly experience different types of string encoding

💡 Tip: Click any example to quickly fill in, supports Chinese, Unicode, Emoji and other character types

URL Encoding and Best Practices

This URL encode decode online tool applies percent-encoding to query strings and path segments per RFC 3986. URL encoding (also known as percent encoding) uses % followed by two hexadecimal digits. See Percent Encoding.

Unreserved Characters and Encoding Rules

Unreserved characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~. Other characters should be converted to UTF-8 first and then percent-encoded byte by byte.

Encoding rules: 1. Unreserved characters remain unchanged 2. Other characters are first converted to UTF-8 3. Each byte of UTF-8 encoding is converted to percent encoding.

Related Tools

Best Practices

  1. Always encode user input
  2. Use the correct encoding function (e.g. encodeURIComponent vs encodeURI in JavaScript)
  3. Pay attention to encoding scope
  4. Avoid double encoding
  5. Consider internationalization
  6. Test edge cases
  7. Follow RFC 3986