2026topopentools

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Type into any field and the other three update instantly — with arbitrary precision, right in your browser.

Type a number into any field below. The other three update instantly. Whole numbers only — an optional leading minus sign is allowed, but fractions and decimal points are not.

Digits 0–1
Digits 0–7
Digits 0–9
Digits 0–9, a–f

Everything runs locally in your browser — your numbers are never uploaded. Arbitrary precision is supported via JavaScript BigInt, so very large values convert exactly.

Understanding the Number Base Converter

The Number Base Converter instantly translates whole numbers between the four bases programmers use most: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type into any of the four fields and the other three update in real time. It is built for developers, students, and anyone working with bit masks, color codes, file permissions, or low-level data. Because it relies on JavaScript BigInt, it converts arbitrarily large integers without rounding or overflow. Everything runs entirely in your browser — your numbers are never uploaded to a server — so it is fast, private, and works offline once the page has loaded.

How it works

When you edit a field, the tool reads each character and checks it against that base's allowed digits — only 0–1 for binary, 0–7 for octal, 0–9 for decimal, and 0–9 plus a–f for hexadecimal. An optional leading minus sign is permitted. It then builds the value digit by digit using BigInt: starting at zero, it multiplies the running total by the base and adds each digit's value, so precision is never lost no matter how long the number is. That single BigInt value is then re-rendered into all four bases with value.toString(base), giving lowercase hex. If a character is invalid, an inline error appears under that field and the other fields are left untouched.

Worked example

Type the hexadecimal value ff into the Hex field. The tool validates that both characters are legal base-16 digits, then computes the value as (15 x 16) + 15 = 255. It immediately fills Decimal with 255, Octal with 377, and Binary with 11111111. Edit the Decimal field to 256 and every field updates again: Binary becomes 100000000, Octal becomes 400, and Hex becomes 100. Each result has its own Copy button so you can grab exactly the representation you need.

Tips & common mistakes

  • Hexadecimal is case-insensitive on input (FF and ff both work), but results are always shown in lowercase to match common code style.
  • This tool handles whole numbers only — there is no support for decimal points or fractions like 3.14 or 0xA.8.
  • Do not include base prefixes such as 0x, 0b, or 0o in the fields; enter just the digits (use a, not 0xa).
  • A leading minus sign is allowed for negative integers, but plus signs and spaces inside the number are not.
  • For very large values the BigInt engine stays exact — unlike a calculator that switches to scientific notation and loses digits.
  • If a field turns red, only that field is wrong; fix the highlighted character and the others stay as they were.

Related tools

Frequently Asked Questions

How big a number can it convert?

There is no fixed limit. The tool uses JavaScript BigInt, so it converts arbitrarily large whole numbers exactly — no rounding or overflow like you would get with regular floating-point numbers.

Which bases are supported?

The four most common programming bases: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Edit any field and the other three update automatically.

Does it handle decimals or fractions?

No. It converts whole numbers (integers) only. A leading minus sign is allowed, but decimal points and fractional values are not supported.