URL Encoder/Decoder Online | Percent Encoding Tool

Online URL encoding and decoding tool. Convert text to URL-safe format using percent-encoding (encodeURIComponent/encodeURI). Support UTF-8 and multiple formats.

URL Encoding/Decoding

Encoding Mode

Instructions

  • Encode: Convert special characters to percent-encoded format (%XX)
  • Decode: Convert percent-encoded format back to original characters
  • encodeURIComponent: Encodes all special characters including : / ? # @ etc.
  • encodeURI: Preserves URL structure characters, only encodes special characters in values

URL Encoding Knowledge:

What is URL Encoding?

URL encoding (also called percent-encoding) is a mechanism for encoding special characters in URLs. It converts non-ASCII characters and reserved characters into a format that can be safely transmitted in URLs.

Encoding Principle

Each character is first converted to UTF-8 byte sequence, then each byte is represented as %XX where XX is the hexadecimal value. For example, space becomes %20, Chinese character '中' becomes %E4%B8%AD.

encodeURIComponent vs encodeURI

encodeURIComponent encodes all special characters and is suitable for encoding parameter values. encodeURI preserves URL structure characters (: / ? # @ etc.) and is suitable for encoding complete URLs.

Common Encoded Characters

Space→%20, !→%21, #→%23, $→%24, &→%26, '→%27, (→%28, )→%29, *→%2A, +→%2B, ,→%2C, /→%2F, :→%3A, ;→%3B, =→%3D, ?→%3F, @→%40

Key Features:

  • Ensures URLs only contain valid ASCII characters
  • Preserves special characters that have special meaning in URLs
  • Supports encoding of any Unicode character
  • Encoded results can be safely transmitted between different systems

Common Applications:

  • Encoding URL query parameters
  • Processing form data submission
  • Building RESTful API requests
  • Handling file names with special characters
  • Encoding internationalized domain names (IDN)
URL Encoder/Decoder Online | Percent Encoding Tool