Number base converter
Type a number in any base from 2 to 36 and see it converted to binary, octal, decimal, hex — or a custom base of your choice. Large integers keep full precision.
How to use
- Enter a number, pick which base it is written in, and press Convert.
- The
0x/0b/0oprefixes are stripped automatically, so0xFFandFFgive the same result. - A leading
-works too — the sign is kept across every base.
Why BigInt instead of plain JavaScript numbers
A JavaScript Number is a 64-bit float, which quietly breaks past 2^53 - 1: 9007199254740993 comes back as …992. That is a famous source of bugs when handling IDs from databases or snowflake-style timestamps. This tool does its arithmetic with BigInt, so values of hundreds of digits convert exactly.
Common bases at a glance
- Base 2 (binary): what the hardware actually uses; each digit is one bit.
- Base 8 (octal): Unix file permissions like
755. - Base 16 (hex): colors, memory addresses, byte dumps — one digit per 4 bits.
- Base 36: the widest alphabet that digits plus letters allow; handy for short IDs.
FAQ
Why does my input show as invalid?
Each base only accepts its own digits: base 2 accepts 0-1, base 16 accepts 0-9 and A-F, and so on up to base 36 which also allows A-Z. Letters are case-insensitive, spaces and underscores are ignored.
Does it support fractional numbers like 3.14?
No — only integers. Fractional conversion gets ambiguous in other bases (most fractions do not terminate), and pretending otherwise produces wrong-looking digits. Convert the integer part and the fractional part separately if you need an approximation.
Is anything uploaded?
No. The conversion happens in your browser and no request leaves the page.