About Encoding/Decoding

This tool helps you convert data between different encoding formats used in web development and data transmission:

Base64 Encoding

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation.

Use cases:

  • Encoding binary data in emails (MIME)
  • Storing complex data in JSON
  • Embedding image data directly in HTML/CSS
  • Transmitting binary data over text-only protocols
Original: Hello World
Base64: SGVsbG8gV29ybGQ=

URL Encoding

URL encoding converts characters into a format that can be transmitted over the Internet. It replaces unsafe ASCII characters with a "%" followed by hexadecimal digits.

Use cases:

  • Encoding query parameters in URLs
  • Handling special characters in form submissions
  • Ensuring data integrity in HTTP requests
Original: Hello World!
URL Encoded: Hello%20World%21

HTML Encoding

HTML encoding converts characters to their corresponding HTML entities to prevent browsers from interpreting them as HTML markup.

Use cases:

  • Preventing XSS (Cross-Site Scripting) attacks
  • Displaying HTML code as text
  • Ensuring correct rendering of special characters
Original: <script>alert('XSS')</script>
HTML Encoded: &lt;script&gt;alert('XSS')&lt;/script&gt;

Hex Encoding

Hexadecimal encoding represents binary data as a sequence of hexadecimal (base 16) digits.

Use cases:

  • Representing binary data in a human-readable format
  • Encoding color values in CSS
  • Working with low-level binary protocols
Original: Hello
Hex: 48656c6c6f