Mode:
Real-time encoding
Input
0 chars
Output
Copied!
0 chars
encodeURIComponent encodes all special chars including :/?#[]@!$&'()*+,;= β€” use for encoding individual query parameter values.
encodeURI preserves URL structure chars β€” use for encoding a full URL while keeping it valid.

Parse a URL into its components

Enter a URL above to see its components

Query String Builder

Generated URL / Query String
β€”
Copied!

Bulk Encode / Decode

Enter one URL or string per line. All lines will be processed together.

Mode:
Input (one per line)
Output
Copied!
0 lines

What Is URL Encoding?

URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe format. Each unsafe character is replaced with a % followed by two hexadecimal digits representing the character’s UTF-8 byte value.

For example:

  • Space becomes %20
  • & becomes %26
  • = becomes %3D

This is essential when passing data through query strings, form submissions, or API requests.

encodeURIComponent vs encodeURI

FunctionPreservesBest For
encodeURIComponentLetters, digits, -_.!~*'()Encoding individual query parameter values
encodeURIURL structure chars (:/?#[]@!$&'()*+,;=)Encoding a full URL while keeping it navigable

Common Use Cases

  • API requests β€” Encode query parameter values before appending to a URL
  • Form data β€” Encode user input before sending via GET requests
  • Sharing URLs β€” Ensure URLs with special characters work across all systems
  • Debugging β€” Decode percent-encoded URLs to make them human-readable