ToolkitBook

Base Converter - Convert Between Binary, Octal, Decimal & Hexadecimal

Enter a number and choose source and target bases to see the result instantly. Supports binary (2), octal (8), decimal (10), and hexadecimal (16) with live output. Shows all representations side by side. Handles negative integers and checks that input characters match the chosen base.

Binary
Octal
Decimal
Hexadecimal

FAQ

How do I convert between bases?

Type a number in the Value field, set its base with the From Base dropdown, and pick the target base from the To Base dropdown. The result updates on every keystroke. Click the swap button to reverse the direction.

What number formats are accepted?

For decimal, use digits 0–9 with an optional leading minus. For binary, use 0 and 1. For octal, use 0–7. For hexadecimal, use 0–9 and A–F (case-insensitive). Do not add prefixes like 0b, 0o, or 0x — the dropdown sets the base.

Can I convert negative numbers?

Yes. Prefix the value with a minus sign. The converter treats the number as a signed integer and displays the absolute value in each base with a leading minus.

What is the "All Bases at a Glance" section?

Below the converter, a card grid shows the same value in all four bases at once so you can compare representations without running separate conversions.

Does this tool handle fractional numbers?

No. This converter works with integers only. Fractional values often produce repeating digits across bases, so output is limited to whole numbers for accuracy.

Is there a limit on the number size?

The converter handles values up to 2⁵³ − 1 (9,007,199,254,740,991 in decimal), the safe integer limit in JavaScript. Larger values may lose precision.

More Tools