User Rating 0.0
Total Usage 0 times
0x
Quick presets:
Is this tool helpful?

Your feedback helps us improve.

About

Hexadecimal notation compresses binary data by a factor of 4:1. A single misread nibble in a memory dump, register value, or color code propagates errors silently - wrong pixel colors, corrupted checksums, or misinterpreted signed integers via two's complement. This tool parses any hex string and extracts its full numeric identity: decimal (d), binary (b), octal (o), ASCII text, IEEE 754 floating-point, bit-level properties (popcount, MSB, LSB, palindrome), byte-order reversal, and XOR/sum checksums. It auto-detects CSS color values and decodes RGBA with HSL and WCAG relative luminance L.

The analyzer handles arbitrary-precision integers via BigInt, so it will not silently truncate values beyond 253 1. For 8-digit and 16-digit inputs, IEEE 754 single and double precision floats are decoded using typed arrays. Limitation: ASCII decoding assumes each byte pair maps to a printable character; non-printable bytes are shown as dot placeholders. Two's complement is computed for standard widths (8, 16, 32, 64 bits) only.

hex analyzer hexadecimal converter hex to decimal hex to binary hex color IEEE 754 bit analysis number system

Formulas

Hexadecimal to decimal conversion expands each digit by its positional weight in base 16:

d = n1i=0 hi 16i

where hi is the integer value of the i-th hex digit (from the right, zero-indexed) and n is the total number of digits.

Binary conversion uses a nibble lookup. Each hex digit maps to exactly 4 binary bits:

bin(H) = concat(nibble(hn1), …, nibble(h0))

Popcount (number of set bits) uses Kernighan's algorithm, which clears the lowest set bit per iteration:

x x (x 1), count += 1 per iteration

WCAG relative luminance for detected hex colors:

L = 0.2126 Rlin + 0.7152 Glin + 0.0722 Blin

where each linearized channel Clin = {

Csrgb12.92 if Csrgb 0.04045(Csrgb + 0.0551.055)2.4 otherwise

IEEE 754 single-precision (32-bit) float decoding: sign bit s (bit 31), exponent e (bits 30-23), mantissa m (bits 22-0):

value = (1)s 2e 127 (1 + m223)

Two's complement for an n-bit signed integer where the MSB is 1:

signed = unsigned 2n

Reference Data

Hex DigitDecimalBinaryOctalBCDASCII (if +0x30)
000000000000 (0x30)
110001100011 (0x31)
220010200102 (0x32)
330011300113 (0x33)
440100401004 (0x34)
550101501015 (0x35)
660110601106 (0x36)
770111701117 (0x37)
8810001010008 (0x38)
9910011110019 (0x39)
A10101012 - : (0x3A)
B11101113 - ; (0x3B)
C12110014 - < (0x3C)
D13110115 - = (0x3D)
E14111016 - > (0x3E)
F15111117 - ? (0x3F)
Common Hex Patterns
FF25511111111377 - Max unsigned byte
7F12701111111177 - Max signed byte
8012810000000200 - Min signed byte (−128)
FFFF6553516 ones177777 - Max uint16
DEAD570051101111010101101136655 - Debug marker
BEEF488791011111011101111137357 - Debug marker
CAFE519661100101011111110145376 - Java class magic
FFFFFFFF429496729532 ones - - Max uint32
7FFFFFFF21474836470 + 31 ones - - Max int32
3F8000001065353216 - - - IEEE 754 float: 1.0
40490FDB1078530011 - - - IEEE 754 float: π
7F8000002139095040 - - - IEEE 754 float: +

Frequently Asked Questions

The tool uses BigInt for all conversions when the parsed value exceeds 253 1 (9007199254740991). BigInt provides arbitrary-precision integer arithmetic natively in modern browsers. Binary and octal representations are computed via BigInt's toString(2) and toString(8) methods, so no precision is lost regardless of input length.
Color detection activates when the cleaned hex string is exactly 3, 4, 6, or 8 digits long. A 3-digit value expands to 6 digits (e.g., F0C becomes FF00CC). 4-digit values expand to 8 digits (RGBA). 8-digit values are decoded as RGBA where the last two digits represent alpha. The numeric analysis always runs in parallel regardless of color detection.
One's complement simply inverts all bits: every 0 becomes 1 and vice versa. Two's complement adds 1 to the one's complement result and is the standard representation for signed integers in virtually all modern CPUs. For a negative number in an n-bit system, the two's complement value equals the unsigned value minus 2n. The tool shows both for standard bit widths (8, 16, 32, 64).
IEEE 754 decoding triggers for exactly 8-digit hex (single precision, 32-bit) and 16-digit hex (double precision, 64-bit). The tool writes the integer bytes into an ArrayBuffer via DataView, then reads them back as a Float32 or Float64. This produces the exact floating-point value the hardware would interpret, including special values like ±, NaN, and denormalized numbers. For example, 3F800000 decodes to 1.0 and 40490FDB decodes to approximately π.
The XOR checksum takes each byte (pair of hex digits) and applies the exclusive-or operator sequentially: checksum = byte0 byte1 byten. This is commonly used in serial protocols (NMEA, Modbus) and firmware to verify data integrity. The sum checksum computes the arithmetic sum of all bytes modulo 256, another common integrity check.
If the hex string has an odd number of digits, the tool left-pads it with a zero to form complete bytes before reversing. For example, 1A2B3 becomes 01A2B3 and its byte-swapped form is B3A201. This mirrors what happens in real hardware when converting between big-endian and little-endian byte order. The tool always displays both the original and swapped representations.