Number Base Converter
Converting between bases is straightforward and goes wrong at the edges: a leading zero, a digit outside the base accepted quietly, a number large enough to lose precision. All five bases are shown at once here, and the result is read back to confirm it gives the number that went in.
What this generator does
Reads the number in the base you name, checking every digit belongs to that base, then writes it out in all five bases at once.
How to use this tool
- Type the number and say which base it is in.
- Read it in all five bases at once.
- Spaces and underscores are ignored, so DEAD_BEEF works.
- A digit that does not belong to the base is refused rather than skipped.
Understanding the controls
- The number
- Digits appropriate to the base. Spaces and underscores are ignored, so a value written in groups still reads.
- Which base is it in
- Binary, octal, decimal, hexadecimal or base 36. Letters stand for the digits above nine, so F is fifteen and Z is thirty-five.
Common use cases
- Reading a hexadecimal value as decimal
- Checking a bit pattern written in binary
- Converting a colour or a byte value between notations
- Working with file permissions written in octal
- Shortening an identifier with base 36
How this generator works
The converted number is read back in each base and must give the number it started from. Every digit is also checked against the base it claims to be in — a 2 in a binary number is refused rather than treated as something else — and the result is confirmed to carry no leading zero.
Randomness and fairness
Nothing is random. The same number always converts the same way.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Whole numbers from zero upwards. Negatives and fractions are not converted.
- Numbers are limited to what can be held exactly, which is a little over nine thousand million million.
- Five bases. Arbitrary bases between two and thirty-six are possible in principle but are not offered.
- No two's-complement or byte-width interpretation — this is plain positional notation.
Privacy and your data
Every base is worked out in your browser. No number you enter is transmitted or stored.
Related generators
- Roman Numeral ConverterConverts numbers to Roman numerals and back, refusing forms like IIII that read correctly but are not how the number is written.
- Aspect Ratio CalculatorReduces a width and height to the ratio people recognise, and works out the matching dimension at any size.
- Unit ConverterConverts length, weight, volume, area, speed, time, data and temperature, with the exact defined factors and every unit shown at once.
- Hash Table Scenario GeneratorKeys distributed into buckets by modulo hashing, with collisions, chain lengths and empty buckets all recounted from the table.