What Is the Number Base Converter?
Convert whole numbers between binary, octal, decimal and hexadecimal. Type in any of the four fields and the other three update at once; each result has a copy button.
Why Use This Tool?
Working with different number bases is common in programming — hex for colors and memory addresses, binary for bitwise operations, octal for file permissions. This tool converts between all four major bases instantly.
How to Use This Number Base Converter
- Enter your number — Type or paste the number you want to convert into the input field.
- Or type in another base — Each of the four fields (binary, octal, decimal, hexadecimal) accepts input, so there is no base to select.
- Read the conversions — All other base representations update instantly. Copy any result with one click.
- Mind the limits — Whole, non-negative numbers up to 9,007,199,254,740,991 convert exactly; fractions are dropped and negative numbers are not converted (see the worked example).
Worked example: exact at any size, and honest about what it refuses
Until October 13, 2026 the converter used JavaScript numbers (IEEE 754 doubles), so values above Number.MAX_SAFE_INTEGER, 2⁵³ − 1 = 9,007,199,254,740,991, came out rounded, fractions and exponents were cut silently and negatives were left blank. It now does all arithmetic with BigInt, which has no size limit. We typed the inputs below into the tool in Chromium and compared every field with Python's int(): all matched (test script: _ops/checks/number-base/).
| You type (decimal unless noted) | Old hex output | Now |
|---|---|---|
| 255 | FF | FF |
| 0x1F (in the hex field) | 1F | 1F (prefixes 0x, 0b, 0o and separators _ are read) |
| 12.75 | C (fraction dropped silently) | Refused with a message: whole numbers only |
| 1e3 | 1 | Refused with a message: type 1000 |
| −255 | (blank) | -FF, or FF / FFFF… as 8- to 64-bit two's complement |
| 9007199254740993 (2⁵³ + 1) | 20000000000000 (off by one) | 20000000000001 |
| 18446744073709551615 (2⁶⁴ − 1) | 10000000000000000 | FFFFFFFFFFFFFFFF |
| 123456789012345678901234567890 | (rounded) | exact, 97 bits |
| "102" typed in binary | ignored | "2" is not a binary digit |
- Negative numbers. There is no single "negative binary": programs store negative integers in two's complement, which depends on the width. Leave the setting on "minus sign" for -FF, or choose 8, 16, 32 or 64 bits to see the stored bit pattern: −1 is FFFFFFFFFFFFFFFF in 64 bits and −128 is 10000000 in 8 bits; a value that does not fit (−129 in 8 bits) is flagged.
- Whole numbers only. Fractions often have no finite form in another base (0.1 decimal repeats forever in binary), so the tool refuses them instead of dropping the part after the point.
- Every field is editable. Type in any base; the other three update, and a digit that does not belong to that base is named in a message under the field.
Sources
Checked on .
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools