Binary / Hex / Decimal Converter
Convert a number between binary, octal, decimal and hexadecimal — or any base from 2 to 36 — with exact big-integer math, no precision loss.
About number bases
Binary (base 2) uses digits 0–1, octal (base 8) 0–7, decimal (base 10) 0–9 and hexadecimal (base 16) 0–9 plus a–f. One hex digit equals exactly four binary bits, which is why hex is the standard shorthand for binary data, memory addresses and colors. This converter uses arbitrary-precision integers, so 64-bit values and beyond convert exactly — unlike converters built on JavaScript's floating-point numbers, which silently corrupt anything above 2⁵³.
Frequently asked questions
Are prefixes like 0x, 0b and 0o accepted?
Yes — 0xff, 0b1010 and 0o17 are recognized and override the selected base. Spaces and underscores used as digit separators are ignored.
Does it handle negative numbers?
Yes, with a leading minus sign. It shows the mathematical negative (e.g. −255 → −ff), not a two's-complement bit pattern.
What about fractions?
Integers only. Fractional values don't have exact finite representations across bases (0.1 in decimal is infinite in binary), so a converter that pretends otherwise is lying to you.
Last updated: 2026-07-12