Number Base Converter
Convert a number from any base between 2 and 36 to binary, octal, decimal, hexadecimal and a custom target base at once — results update live as you type, and invalid digits are rejected with a clear error.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
How to use
- Type or paste your number and pick the base it is written in, including any custom base from 2 to 36.
- Watch the value appear live in bases 2, 8, 10 and 16, plus the custom target base you choose.
- Fix the input if you see an error — the tool rejects digits that do not belong to the source base.
Frequently asked questions
Which characters are valid in each base?
Base 2 accepts only 0 and 1; base 8 accepts 0 to 7; base 10 accepts 0 to 9; base 16 adds A to F, upper or lower case. Custom bases from 2 to 36 extend the alphabet with letters up to Z, where Z equals 35. Anything outside the selected alphabet is reported as an error.
How does the tool validate my input?
It parses your text in the selected base, then converts the value back to a string in that base and compares it with your input after normalizing case. Only an exact match counts, so stray characters, wrong digits or misplaced signs are caught immediately instead of being silently cut off, as can happen with naive parsing.
Why does hexadecimal matter in programming?
Hex maps neatly onto binary: each hexadecimal digit represents exactly four bits, so two digits describe one byte. Memory addresses, color codes, hashes and byte-level file formats are all written in hex because it stays compact while remaining directly readable against the underlying bits. Base 64 is different — it is an encoding, not a numeral system.
Can I convert negative numbers or fractions?
This tool handles negative integers: write a leading minus sign and the sign is carried through every result. Fractions and exponents are not supported, because numeral bases beyond decimal have no universal way to write a radix point — keep the input a plain integer for reliable, unambiguous conversions in every base.
Is everything computed locally?
Yes. Conversions use JavaScript number parsing and toString inside your browser, so nothing is uploaded and the results appear as you type. You can safely convert sensitive values such as internal IDs, color values or checksums without the data ever leaving your device.