🔟 Number Base Converter
255 = 0xff = 0o377 = 0b11111111 — convert any number between bases 2, 8, 10 and 16, at any size, exactly.
parsed as base-10 · exact (BigInt, no precision loss)
How the number base converter works
The input parses digit-by-digit into a BigInt — JavaScript’s arbitrary-precision integer — then re-renders in all four bases. BigInt is the point: ordinary JS numbers lose precision past 2⁵³, so a 64-bit value like a database ID or bitmask converts wrongly in naive tools. Prefixes (0x, 0b, 0o), spaces and _ separators in the input are accepted and ignored.
The sample decodes to a classic: 3735928559 = 0xDEADBEEF. Everyday uses: reading hex color/memory values, building permission bitmasks, converting Unix file modes (octal), and checking what a flag register means in binary.
Frequently asked questions
Why do other converters corrupt large numbers?
They use floating-point numbers, exact only to 2⁵³ (about 9×10¹⁵). Beyond that, trailing digits silently change. This tool uses BigInt — exact at any length.
What are the 0x, 0o and 0b prefixes?
Standard literal markers: 0x = hex, 0o = octal, 0b = binary — the same notation JS, Python and C-family languages use. The converter accepts and outputs them.
How do I read a binary number quickly?
Group bits in fours from the right — each group is exactly one hex digit (1101 = D). That is why programmers think in hex: it is compressed binary.
Does it handle negative numbers?
It converts magnitudes; interpretation of negatives (two's complement width) depends on your context — an 8-bit -1 and a 64-bit -1 differ. Convert the unsigned pattern and apply your width's convention.
Octal still exists?
Unix file permissions keep it alive: chmod 755 is octal for rwxr-xr-x. Otherwise you'll mostly meet hex and binary.