Text to encode

Output Format:

Hexadecimal

What is Hexadecimal Encoding?

Hexadecimal (or "hex") encoding is the process of converting text or binary data into a base-16 representation. In hexadecimal, each byte of data is represented by two hexadecimal digits (0-9, A-F), with each digit representing 4 bits.

Key characteristics of hexadecimal encoding:

  • It uses 16 different symbols: 0-9 and A-F (or a-f, case-insensitive)
  • Each character in the original text is represented by its ASCII/Unicode value in hexadecimal
  • It's a reversible encoding - you can decode the hexadecimal back to the original text
  • It's commonly used in computing to represent binary data in a human-readable format

Example

Original text

Hello World 123!

Hexadecimal (standard)

48656c6c6f20576f726c642031323321

Hexadecimal Output Formats

FormatExampleDescription
Standard48656c6c6fContinuous string of hex digits
Spaced48 65 6c 6c 6fHex digits separated by spaces
Prefixed0x48 0x65 0x6c 0x6c 0x6fHex digits with 0x prefix (common in programming)
Escaped\x48\x65\x6c\x6c\x6fHex digits with \x prefix (common in string literals)

Common uses of Hexadecimal Encoding

  • Representing binary data in a human-readable format
  • Debugging and analyzing binary files
  • Representing colors in web development (e.g., #FF0000 for red)
  • Memory addresses and machine code in programming
  • Network protocols and data formats
  • Representing MAC addresses and other hardware identifiers

Hexadecimal in Different Contexts

ContextExampleDescription
HTML/CSS#FF5733Color representation (RGB)
Programming0xFF, 0x1A3Hexadecimal literals in code
Networking00:1A:2B:3C:4D:5EMAC address format
File formatsFF D8 FFFile signatures/magic numbers

Note:

Hexadecimal encoding is a straightforward way to represent binary data in a text format. Unlike Base64, it doesn't compress the data - in fact, it expands it (each byte becomes two hex digits). However, it's very readable and widely supported across different systems and programming languages.

Parameters

  • Input text: Any text you want to encode to hexadecimal format
  • Output Format: The format in which the hexadecimal output will be displayed:
    • Standard: Continuous string of hex digits (e.g., 48656c6c6f)
    • Spaced: Hex digits separated by spaces (e.g., 48 65 6c 6c 6f)
    • Prefixed: Hex digits with 0x prefix (e.g., 0x48 0x65 0x6c 0x6c 0x6f)
    • Escaped: Hex digits with \x prefix (e.g., \x48\x65\x6c\x6c\x6f)

Related Tools

All Tools

See all available tools