255 (base 10) = FF (base 16)
| Base | Prefix | Value |
|---|---|---|
| Binary (2) | 0b | 11111111 |
| Octal (8) | 0o | 377 |
| Decimal (10) | — | 255 |
| Hexadecimal (16) | 0x | FF |
Bit length
8
Significant bits in the magnitude
Byte length
1
Bytes needed to store the value
Hex digits
2
Two hex digits per byte
Each group of four bits maps to exactly one hexadecimal digit.
1111 1111Hex alignment: F F
A Number Base Converter rewrites the same integer in a different positional notation. The value does not change — 255, 0xFF, 0o377, and 0b11111111 are four spellings of one quantity — only the radix used to write it down changes. This tool converts between any two bases from 2 to 36, with binary, octal, decimal, and hexadecimal treated as first-class citizens because those are the four you actually meet in code.
Conversion works digit by digit. Reading a number in base b means accumulating `value = value * b + digit` across the input; writing it back out in base c means repeatedly dividing by c and collecting remainders. This tool performs both halves in BigInt arithmetic, so a 64-bit hash, a 256-bit key, or a 500-digit decimal is converted exactly. Nothing is routed through a JavaScript number, which would silently lose precision above 2^53.
Alongside the conversion you get the measurements that usually prompt the question in the first place: how many significant bits the value occupies, how many bytes it needs, and the binary form grouped into nibbles so you can read it against a hex digit. Negative values are supported, common literal prefixes (0x, 0b, 0o) are accepted, and underscores or spaces can be used as digit separators. Everything runs in your browser.
Type or paste the value. Prefixes such as 0x1F, 0b1010, and 0o755 are accepted, and underscores or spaces can be used as separators — 1010_1111 works exactly like 10101111.
Tell the converter how the number should be read: base 2, 8, 10, 16, or anything else between 2 and 36. Any character that is not a legal digit for that base is flagged by name.
Pick the base you want out. The result updates as you type, and the all-bases panel simultaneously shows binary, octal, decimal, and hexadecimal so you rarely need a second conversion.
Check the bit length, byte length, and nibble-grouped binary, then copy either the bare result or the full expression such as "255 (base 10) = FF (base 16)".
Binary, octal, decimal, and hexadecimal get dedicated buttons, but every radix from 2 to 36 is selectable — including base 32 and base 36, which use the full 0-9 A-Z digit alphabet.
Values are parsed digit by digit into a BigInt, never through parseInt or Number. A 256-bit key or a 500-digit decimal converts with zero precision loss, where most converters break above 2^53.
One input, four outputs. Binary, octal, decimal, and hexadecimal are all shown live, plus your chosen custom base, so you can cross-check a value without running the conversion four times.
See how many significant bits the value occupies, how many bytes it needs, and the binary form padded and grouped in fours so each nibble lines up with one hexadecimal digit.
Translate text to binary and binary to text, plus hexadecimal, decimal, and octal, with full UTF-8 support
Convert length, weight, temperature, area, volume, speed, time, data, pressure, energy, and angle units instantly with exact conversion factors
Encode and decode text to/from Base64 format
0 comments
No comments yet. Be the first to share your thoughts!