Number base converter
Type a whole number in any base from 2 to 36 and the other bases update. Grouping spaces the digits, and a bit width reads the same value as a two’s-complement word.
- Bases 2 to 36
- Free, no sign-up
Runs in your browser. Nothing you type or open is uploaded. Free to use, no account. More code and data tools
How to use it
- Type in binary, octal, decimal, hex, or the custom base.
- Read the same number in the other boxes.
- Turn on a bit width when you want the 8, 16, 32 or 64-bit reading.
Whole numbers, both directions
Each box is an input and a result. A prefix 0b, 0o or 0x is read when the base matches, or when you are typing in the custom box at base 16, 2 or 8. Spaces, underscores and commas are spacing, so 1111 1111 in binary is 255. Digits run from 0 to 9 and then a to z, which is base 36.
Grouping writes binary in fours, octal in threes, and decimal and hex in twos or threes. A bit width wraps the value into that many bits and shows the unsigned and signed readings. This converter reads whole numbers. A decimal point sits outside the digits of these bases.
Private by design
Privacy
Everything runs in this page and stays on your device. Text you paste stays in this tab. Choices such as a format or a font size can be shared in the page link.
This page also shows Google ads, which can use cookies. Privacy and cookies explains how.
Questions
Which bases can I use?
Binary, octal, decimal and hexadecimal have their own boxes. The custom box is any base from 2 to 36.
Can I paste 0xFF or 0b1111?
Yes. A 0x, 0b or 0o prefix is read when it matches the base of that box.
What does the bit width show?
The value wrapped into 8, 16, 32 or 64 bits, as an unsigned number, a signed two’s-complement number, and hex.
What about fractions?
This converter reads whole numbers. A decimal point is outside the digits it accepts.