Base Converter
Binary, octal, decimal and hex, all at once.
Every base
Examples
Questions
How does it know which base my input is in?
From the prefix, as in most programming languages: 0x for hex, 0o for octal, 0b for binary. No prefix means decimal, so "10" is ten. Write 0b10 or 0o10 if you mean something else.
Is there a size limit?
No. Numbers are converted with BigInt, so a 100-digit number converts exactly. Normal JavaScript numbers lose precision above 2^53.
How are negative numbers shown?
As a minus sign and the digits, like a calculator. Tick "Two's complement" to also see how an 8, 16, 32 or 64-bit integer stores it, where -1 is all ones.
Can I use underscores, like 1_000_000?
Yes. Underscores are removed before converting, the same grouping JavaScript allows in number literals.
Related tools
- JSON Formatter & ValidatorFormat, minify, check and repair JSON, with errors shown by line and column.
- UUID GeneratorGenerate UUID v4 and v7, one or a thousand at a time.
- Chmod CalculatorUnix permissions as octal (755) and letters (rwxr-xr-x), with what each one allows.
- IEEE 754 Float InspectorThe bits and exact value of any float or double, such as 0.1 + 0.2.
- Timestamp ConverterUnix timestamp to date, and back, in UTC and your local time.