Number Base Converter
Type a number in the base you have — binary, octal, decimal or hex — and read it out in all the others at once, live on every keystroke. Any base from 2 to 36, grouped digits, strict validation, and nothing leaves the page.
1101 1110 1010 1101 1011 1110 1110 1111
32 bits
33653337357
11 digits
3735928559
32 bits of the 53 that are exact
dead beef
8 digits
Any base from 2 to 36
3farfnf7 digits in base 32
Copy buttons copy the ungrouped digits — grouping is display only. Values are accepted up to 9,007,199,254,740,991 (2^53 − 1), the largest integer JavaScript holds exactly.
How it works
- 1
Pick the base you are typing in
Four tabs under the input set which alphabet your digits use: binary, octal, decimal or hexadecimal. The choice applies to the input only — every output base is shown at once, all the time.
- 2
Type the number
The conversion runs on every keystroke. Validation is strict and explains itself: a digit outside the chosen base is named, and the tool states exactly which characters that base accepts. Nothing is stripped — spaces, signs and separators are digits this tool does not read, and it says so rather than guessing.
- 3
Read all four bases at once
Binary, octal, decimal and hexadecimal cards update together, each with its own copy button, and the card matching the base you typed in is marked as the input. The decimal card reports how many of the 53 exactly-representable bits the value uses, so you can see the 2^53 − 1 ceiling approaching rather than hitting it.
- 4
Add a custom base or group the digits
The stepper under the grid picks any base from 2 to 36 and renders its own card for it — base 32 and base 36 identifiers included. The grouping toggle chunks binary and hex in fours so long values can be read in bites instead of one unbroken string.
Positional notation: what a base is
Every number system you have ever used rests on one idea: a digit's worth depends on where it sits. Write 10 and you have not written 'one and zero' but 'one ten and no units' — the 1 borrows its weight from its position. The base names the exchange rate between neighbouring positions. Base 2 pays out in powers of two, base 8 in powers of eight, base 10 in powers of ten, base 16 in powers of sixteen. Bases above 10 need more digits than the alphabet of arithmetic provides, so letters join in: in hexadecimal a is ten, and by base 36 the letter z stands for thirty-five.
Reading a value out of its base is therefore just multiplication and addition, one term per digit. Take 1010 in binary — the same digits that mean 'ten' in decimal:
| Digit | Position | Position worth | Contributes |
|---|---|---|---|
| 1 | 3rd from the right | 2^3 = 8 | 8 |
| 0 | 2nd from the right | 2^2 = 4 | 0 |
| 1 | 1st from the right | 2^1 = 2 | 2 |
| 0 | 0th from the right | 2^0 = 1 | 0 |
Eight plus two is ten, so 1010 in base 2 and 10 in base 10 are the same value in two costumes. The reverse direction — producing the digits in the first place — is the same table read backwards: divide by the base, keep the remainder as the next digit, and continue with the quotient until it runs out. That loop is all any base converter does, in either direction, and it is why the four cards on this page can all update from one keystroke.
Worked example: dead beef → 3735928559
Dead beef is the classic hex constant — a deliberately friendly-looking value that has padded debug screens and test suites for decades — and it makes a tidy demonstration because it exercises letters and digits at once. Grouped display writes it dead beef: two bytes per group. To read it as a decimal number, put each digit on its position and multiply, exactly as the binary example did, with sixteen as the base:
| Hex digit | Value | Position | Contributes |
|---|---|---|---|
| d | 13 | 16^7 = 268435456 | 3489660928 |
| e | 14 | 16^6 = 16777216 | 234881024 |
| a | 10 | 16^5 = 1048576 | 10485760 |
| d | 13 | 16^4 = 65536 | 851968 |
| b | 11 | 16^3 = 4096 | 45056 |
| e | 14 | 16^2 = 256 | 3584 |
| e | 14 | 16^1 = 16 | 224 |
| f | 15 | 16^0 = 1 | 15 |
The eight contributions sum to 3735928559 — that is the decimal card's answer, and it is the number the RGB dot-chaser of every 1990s demo scene was secretly writing. The conversion is lossless in both directions: feed 3735928559 back in on the decimal tab and the hexadecimal card returns dead beef again. Notice also what the table shows about length: four bytes of information, eight hex digits, and ten decimal digits. Hex stays close to the machine's own grouping, which is precisely why engineers write values this way and why the grouped toggle exists.
Why hexadecimal is the programmer's base
Computers store bits, humans chunk, and hexadecimal is the compromise both can keep. The binding constraint on the machine side is the byte: memory, files and network traffic are all addressed in units of 8 bits. The binding constraint on the human side is that a row of fifty binary digits cannot be read, compared or dictated over a call. Hex resolves the tension because its digits split the byte exactly — one hex digit carries 4 bits, so a byte is always two hex digits and nothing is ever left over. Decimal has no such alignment: 255 needs three digits where ff needs two, and the decimal digits of a large value say nothing about where its bytes begin and end.
| Hex digit | Decimal | 4 bits |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| a | 10 | 1010 |
| b | 11 | 1011 |
| c | 12 | 1100 |
| d | 13 | 1101 |
| e | 14 | 1110 |
| f | 15 | 1111 |
That table is the entire translation layer between binary and hex, and it is small enough to memorise — sixteen rows, and only the last six are anything new. Once it is internalised, hex stops being a foreign notation and becomes binary with the redundancy removed: #ff0000 is eight switched-on bits followed by sixteen switched-off ones, 0x80 is a byte with only its top bit set, and a v4 UUID's 4 at position fourteen is four known bits, not a mystery character. Every hex value on this page can be checked against this table by eye, which is a quiet part of why the notation has outlived octal as the programmer's default.
The 2^53 − 1 ceiling
Every number on this page is a JavaScript number, and JavaScript numbers are IEEE-754 doubles: 64 bits split into a sign, an exponent and a 53-bit fraction. When the value is an integer, those 53 fraction bits are the entire precision budget, which sets a hard frontier at 2^53 − 1 — 9007199254740991, given its own name, Number.MAX_SAFE_INTEGER. It is called safe because every integer up to it has a unique representation; past it, consecutive integers begin to share one.
The failure is worth seeing once, because it is silent. Ask a console for 9007199254740992 === 9007199254740993 and it answers true: the last binary digit of the larger value simply never got stored, and both constants collapsed into the same double. A converter that accepted such input would then print digits with total confidence — the leading digits correct, the tail invented — and nothing in the output would warn you. In hex the frontier sits at 1fffffffffffff, fourteen digits; in binary, fifty-three ones.
| Input (decimal) | Verdict |
|---|---|
| 9007199254740990 | converted — below the ceiling |
| 9007199254740991 | converted — this is 2^53 − 1 itself, the exact frontier |
| 9007199254740992 | rejected — one past it, and 9007199254740993 would read back the same |
The guard is applied per digit rather than to the finished value, because the finished value is exactly where precision would already be lost: the tool checks the running total against the remaining digits before every multiply-and-add step, so an oversized input is caught at the first digit that would push it past the ceiling. For anything larger, JavaScript's BigInt type removes the ceiling entirely at the cost of leaving ordinary number arithmetic — a different tool with different rules, and the honest boundary of this one.
Frequently asked questions
What does the base actually change about a number?
Why is hexadecimal everywhere in programming?
Why do the grouped digits come in fours?
Why does the converter refuse numbers above 9,007,199,254,740,991?
What are the unusual bases, like 32 and 36, actually for?
Does anything I type leave my browser?
Related tools
Last updated: October 9, 2026