Number Base Converter
Convert a number between binary, octal, decimal, and hexadecimal all at once. Pick the base you're entering and get the rest instantly.
How to use it
Type a number into the box and pick which base you are writing it in. All four forms — binary, octal, decimal, and hexadecimal — appear at once and update on every keystroke, so you can read across the row or copy whichever one you need. Everything runs in your browser, so nothing is uploaded. The tool works with the four bases programmers use most: binary uses only the digits 0 and 1, octal uses 0 through 7, decimal is the everyday 0 through 9, and hexadecimal adds the letters A through F to reach sixteen values per digit. Hexadecimal input accepts either upper or lower case, while the output is shown in uppercase so it lines up neatly with the notation used in code and colour codes. Conversion is done with big-integer math, so a value far larger than the usual safe limit of about 2^53 stays exact instead of quietly rounding the way an ordinary number would. You can prefix a value with a minus sign to convert negatives, but fractions and decimal points are not supported because base conversion here works on whole numbers. If you type a digit that is not valid for the chosen base — an 8 in binary, say — the tool shows a hint rather than a wrong answer. As a worked example, the decimal number 255 is 11111111 in binary, 377 in octal, and FF in hexadecimal, which is why FF appears so often in colours and byte values. The decimal 42 comes out as 101010 in binary, 52 in octal, and 2A in hexadecimal. Switching between bases is a routine part of programming, reading memory addresses and colour hex codes, setting file permissions in octal, and checking bitmasks. Because the whole conversion happens on your device it stays private, and the exact big-integer handling means even very long binary strings convert without losing a bit.
Frequently asked questions
- Which bases are supported?
- Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Hexadecimal output uses uppercase A–F.
- Does it handle very large numbers?
- Yes. Conversion uses big-integer math, so values far beyond 2⁵³ stay exact instead of losing precision like normal JavaScript numbers.
- Can I enter negative numbers?
- Yes, prefix the value with a minus sign. Fractions and decimal points aren't supported — whole numbers only.
- Is hexadecimal shown in uppercase or lowercase?
- The hexadecimal output is always uppercase (0–9 and A–F), which matches the convention in most code and colour codes. When you type hexadecimal in, either case is accepted, so ff and FF are read the same way.