⚡ Curated dev resources & dealsSponsored
DevToolBayFree Developer Tools

Number Base Converter

Convert integers between binary, octal, decimal, hexadecimal and any custom base 2–36 using BigInt — so arbitrarily large numbers stay exact. Invalid digits are pinpointed.

BigInt precision

Conversion uses BigInt, so even numbers with hundreds of digits convert exactly — no floating-point surprises. Optional 0x/0b/0o prefixes and underscores are stripped automatically. Only integer bases are supported here; for fractions use a dedicated big-decimal tool.

How to use Number Base Converter

Type a number — plain digits, 0x-prefix hex, 0b-prefix binary or 0o-prefix octal — and every base from 2 to 36 populates alongside it. Enter a value in any base on its row and the whole table re-resolves instantly, including fractional input shown in exact and rounded form.

Watch for precision: JavaScript floats are exact to 15 decimal digits, and the tool flags when binary and decimal start to disagree at the tail. Two's-complement interpretation is a toggle away, which is the detail that trips people up when reading binary logs or memory dumps.

Frequently asked questions

Which number bases are supported?

Binary, octal, decimal and hexadecimal are shown together, plus any custom base from 2 to 36 using digits and the letters A-Z case-insensitively.

How are negative numbers handled?

Integer mode converts negatives and values beyond the 64-bit float range using arbitrary precision, so large hashes and IDs never wrap around silently.

Why do 0x and 0b prefixes work?

JavaScript, C and Python all accept 0x for hex and 0b for binary literals. The tool accepts pasted literals with or without those prefixes and detects the base automatically.

How do I convert hex color values to decimal?

Paste the hex without the hash: ff6600 maps to decimal 255, 102, 0. Each pair of hex digits is one channel, which makes canvas and image math quick to verify.

Related tools