About the Number Base Converter
This tool converts integers between decimal, hexadecimal, binary and octal. Type in any of the four fields and the others update immediately. It uses arbitrary-precision integers (BigInt), so 64-bit and larger values convert exactly, without floating-point rounding.
Input is forgiving: prefixes like 0x, 0b and 0o are accepted in their fields, and spaces, underscores and commas used as digit separators are ignored, so 1111_0000 or 4,294,967,295 work. Negative numbers are written with a leading minus sign. The Details card shows the bit length, the number of bits set (population count), the minimum byte count, how the value reads as a signed and unsigned 32-bit integer, and the binary form grouped into 4-bit nibbles.
How to use it
- Type a number into any of the four fields.
- Read the converted values in the others, and the Details card.
- Use the copy button next to any field.
Examples
- Convert 255: gives
ff,11111111and377, a single byte with all 8 bits set. - Inspect the largest 32-bit value: it is
ffffffffin hex and reads as-1when treated as a signed 32-bit integer. - Convert a negative number: the signed 32-bit view is
-1and the unsigned view is4294967295, the two's complement bit pattern.
Common questions
How do I convert hex to decimal by hand?
Multiply each digit by 16 raised to its position, counting from zero on the right, and add the results: 0x1f is 1 × 16 + 15 = 31.
Why are negative numbers shown with a minus sign?
The main fields show the mathematical value. The 32-bit values in Details show the two's complement interpretation.
Does it support fractions?
No. It converts whole numbers only; a decimal point is rejected as an invalid digit.
Related tools
- HEX to RGB Color Converter: convert hex color codes to RGB channels.
- Unix Timestamp Converter: turn an integer timestamp into a date.
- SHA-256 & HMAC Hash Generator: produce hex digests to inspect.