HomeURL Encode/Decode

URL Encode/Decode

Supports Chinese and special character percent encoding, provides both encodeURI and encodeURIComponent methods



Documentation

URL encoding converts reserved or unsafe characters into %-prefixed hexadecimal bytes so URLs can be transmitted and parsed safely.

This tool provides both encodeURI and encodeURIComponent results, plus reverse decoding, which helps with debugging API requests and query parameters.

Difference Between encodeURI and encodeURIComponent

Method Best for Notes
encodeURI Entire URL Keeps structural characters such as :/?&=#
encodeURIComponent Single parameter value Encodes reserved characters like ?, &, =, /

For query parameters, use encodeURIComponent first to avoid broken key/value parsing.

Common Character Encodings

Character Encoded Description
Space %20 Space is not allowed directly in URLs
! %21 Exclamation mark
" %22 Double quote
# %23 Fragment marker
% %25 Percent sign itself
& %26 Parameter separator
+ %2B Plus sign
= %3D Key/value separator
? %3F Query starter

Typical Use Cases

  • Building query strings safely
  • Handling Chinese text or special symbols in URL paths
  • Fixing garbled or truncated request parameters
  • Troubleshooting redirect links with malformed params

References