gettoolz.app

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal.

Part of developer tools.

Base

Binary

101010

Octal

52

Decimal

42

Hexadecimal

2A

Four bases, one quantity

Binary, octal, decimal and hexadecimal all describe the same number — they just group its digits differently. Binary uses base 2 because that maps directly onto a transistor being on or off; hexadecimal uses base 16 because each digit packs exactly four bits, so a byte fits in two characters instead of eight. Converting between them changes nothing about the value, only how it is written.

Why this stays exact for huge numbers

Ordinary JavaScript numbers lose precision past 253, so a naive converter quietly rounds large values. This tool parses and converts using BigInt end to end, so a 64-bit integer or larger still round-trips exactly across all four bases.

Prefixes this tool understands

0x marks hexadecimal, 0b marks binary and 0o marks octal — the same conventions used in JavaScript, Python, C and most other languages. Type a number with one of these prefixes and the base selector switches to match automatically; pick a base by hand at any point to override it.

One page per conversion

Each opens this converter on the right base, with the method worked through step by step and a table of common values: