Number base converter
Convert signed or unsigned integer text between binary, octal, decimal and hexadecimal without 32-bit or 53-bit truncation.
Convert signed or unsigned integer text between binary, octal, decimal and hexadecimal without 32-bit or 53-bit truncation.
Changing the base changes how a number is written, not how much it is: 255 in decimal is FF in hexadecimal.
FluffyBench's Number base converter rewrites one whole number between those four bases and keeps every digit, even in very long numbers.
Convert between binary (2), octal (8), decimal (10) and hexadecimal (16).
Every digit is kept; nothing gets rounded.
The conversion runs in your browser, so your number isn't sent anywhere.
Limits One whole number at a time.
Picture a number as a row of boxes, each worth more than the box to its right: 10 times more in decimal, 16 times in hex, 2 times in binary. The amount stays 255; only the digits in the boxes change.
Octal, the fourth base FluffyBench offers, works the same way with boxes worth 8 times the next, so 255 is 377.
Here's the whole job, turning 255 into hex: choose both bases, type the number, then copy or save the result.
Three quick tries show what Input accepts: a hex number with a sign and prefix, a negative number, and a fraction.
Yes. Long values, like 64-bit IDs, need every digit to come through. Ordinary JavaScript numbers are exact only up to 2 to the 53rd power (about 9 quadrillion); past that, they can round the last digits. FluffyBench uses BigInt, JavaScript's type for exact whole numbers, so nothing gets rounded.
You can check this yourself with the converter's Example button, which fills in a 20-digit number well past that limit.
There's no fixed length limit. A very long number just takes more of your device's memory and time.
This converter works on the value of one number. Bytes written as hex or Base64 are a different job, because a leading 00 matters there (as a number, 00FF is just 255); FluffyBench's Base encoder keeps every byte. Storage sizes such as GB and GiB belong in FluffyBench's Data size converter.