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

MethodBest forNotes
encodeURIEntire URLKeeps structural characters such as :/?&=#
encodeURIComponentSingle parameter valueEncodes reserved characters like ?, &, =, /

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

Common Character Encodings

CharacterEncodedDescription
Space%20Space is not allowed directly in URLs
!%21Exclamation mark
"%22Double quote
#%23Fragment marker
%%25Percent sign itself
&%26Parameter separator
+%2BPlus sign
=%3DKey/value separator
?%3FQuery 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