Number Base Converter
Convert between binary, octal, decimal and hexadecimal — instantly, at any size.
Every number your computer touches lives in binary, gets printed for humans in decimal, and is very often written by programmers in hexadecimal — file permissions in octal, memory addresses and colour-adjacent values in hex, bit flags in binary. Converting between the four by hand is where mistakes creep in: one wrong digit in a long binary string and the value is off by a power of two.
How to use
- Type or paste a number in the Value box.
- Pick the base it is written in, and the base you want it in.
- The conversion updates as you type, and the table underneath shows the number in all four bases at once.
- Use Swap to flip the two bases when you want to convert back.
About this tool
This converter handles the four everyday bases in every direction and uses arbitrary-precision arithmetic (BigInt), so it stays exact far beyond the 2⁵³ limit where ordinary calculators start silently rounding. Negative numbers keep their sign, and the familiar 0b, 0o and 0x prefixes are accepted on input. The bit-length line tells you how many binary digits the value needs — handy when you are checking whether something fits in a byte, a word or a register.
Everything runs in this page. Nothing you type is sent anywhere or stored.
How it works
The converter first reads your input as an exact integer in the source base (each digit multiplied by successive powers of that base), then writes the same integer out in the target base. Because both steps are exact, converting A → B → A always returns the original number, no matter how long it is.
Frequently asked questions
Why does hexadecimal use the letters A–F?
Base 16 needs sixteen digit symbols, but Arabic numerals only provide ten. The letters A–F stand in for the values 10–15, so FF is 15×16 + 15 = 255.
How large a number can this convert?
Far larger than a normal calculator: the conversion uses arbitrary-precision integers, so hundred-digit numbers convert exactly. The practical limit is how long a number you can paste, not the arithmetic.
Can I enter the 0x or 0b prefixes?
Yes. Hexadecimal input may start with 0x, binary with 0b and octal with 0o — the prefix is recognised and stripped automatically when it matches the base you selected.
What about fractions like 10.5?
This tool converts integers, which is what file permissions, addresses, bit masks and colour codes are made of. A decimal point in the input is reported as an invalid digit rather than silently dropped.
Is my input stored?
No. The conversion happens in your browser; nothing is uploaded, saved or shared.
First time embedding? Read the step-by-step guide →
More free tools
Base64 Encode / Decode
Encode text to Base64 or decode it back.
Color Converter (HEX ↔ RGB)
Convert HEX to RGB and back, with live preview.
Unit Converter
Convert length, weight and temperature instantly.
Currency Converter
Daily ECB reference rates for 26 currencies — updated once per business day.
World Clock & Time Converter
Current time in major cities, plus converter.
Meeting Time Planner
Find overlap hours across time zones.