Hex Converter
One value. Every base. Zero guesswork.
Input value
Matching 0x, 0b, 0o prefixes and underscores between digits are supported.
Converted values
EXACT BIGINT ARITHMETICHexadecimal BASE 16
Decimal BASE 10
Binary BASE 2
Octal BASE 8
C integer literal
Unsigned bit pattern. Include <stdint.h> to use UINTn_C macros; independent of signed display mode.
Under the bits
MSB first. Click a numbered bit to toggle it; every result updates. Choose 4-bit or 8-bit groups above.
From a register to a readable value.
- Enter an integer and choose its input base.
- Select the width of your register: 8, 16, 32, or 64 bits.
- Enable signed mode to interpret the high bit as a sign bit.
- Copy any result. Binary, hex, and octal copies include their prefix.
Precision, without surprises.
Every calculation uses BigInt, preserving all 64 bits, including values beyond JavaScript’s safe Number range. Overflow is rejected rather than wrapped.
In signed mode, 8-bit 0xFF is −1, and −128 to 127 is the decimal range. Hex, binary, and octal show the underlying bit pattern: −42 in 16 bits is 0xFFD6. Leading zeros change presentation, never the value.
A few useful answers
Can I convert a 64-bit address without losing precision?
Yes. Select 64 bits and unsigned mode. The maximum value is 18446744073709551615 (0xFFFFFFFFFFFFFFFF).
Are my values sent to a server?
No. Conversion and validation run entirely in your browser. Input values are not stored.
Why does a negative decimal become a positive hex pattern?
Non-decimal outputs show the selected register’s two’s-complement bit pattern. For example, −1 in 8 bits uses all ones: 0xFF.
Continue in another tool
Transfers the current unsigned value and width to a new same-origin tab through memory only. SPI sends the first TX frame, zero-extended to 8/16/32 bits, and accepts up to 32 bits. No values are added to URLs or saved.