Number Base Converter
Binary, octal, decimal and hex in four linked fields — edit any one and the rest follow — plus custom conversion between any bases from 2 to 36.
How positional number bases work
Every base writes a number as digits times powers of the radix. Decimal 255 is 2×100 + 5×10 + 5×1; the same value in binary is 11111111 (eight ones — powers of 2), in octal 377, and in hex ff. Hexadecimal is popular with programmers precisely because each hex digit maps to exactly four binary bits, making it a compact, lossless shorthand for byte values — which is why you see it in memory addresses, color codes, MAC addresses and file dumps. Bases above 10 borrow letters for digits: a = 10 through z = 35, which is how base-36 encodes alphanumeric IDs like YouTube-style short links.
Exact conversion with BigInt
Most online converters silently corrupt large numbers because JavaScript's regular floating-point numbers lose integer precision above 253 − 1 (9,007,199,254,740,991). This tool parses and converts with BigInt arithmetic instead, so a 64-bit ID, a SHA-256 fragment or a hundred-digit decimal converts exactly — every digit preserved, no rounding. Invalid characters for the selected base (like an 8 in octal or a g in hex) are flagged inline instead of producing a wrong answer, and negative numbers are supported with a leading minus sign.
FAQ
Why does hex use the letters a–f?
Base 16 needs sixteen distinct digit symbols but decimal only provides ten (0–9), so the values ten through fifteen are written a–f. Case doesn't matter — FF and ff are the same number — and this tool accepts either on input.
What are the 0b, 0o and 0x prefixes?
They're how programming languages mark literals as binary, octal or hex: 0b11111111, 0o377 and 0xff all equal 255. Enter just the digits here (without the prefix) — the field itself declares the base.
Can I convert fractions or decimals points?
No — this tool converts integers only, which is the well-defined, exact case. Fractional values often have no finite representation in another base (0.1 in decimal is an infinite repeating fraction in binary), so any converter must round; for integers, BigInt lets us stay exact instead.
Free tools are just the start
Deploy your next app on bare-metal cloud with per-second billing — your first app is free, no credit card required.
More free tools
Placeholder paragraphs plus fake names, emails, phone numbers and addresses for testing UIs.
Convert JSON to spreadsheet-ready CSV or CSV back to JSON — nested objects flattened, both directions.
Test regular expressions against your text with live match highlighting and capture groups.
Compare two blocks of text or code line by line and see exactly what was added or removed.
Count words, characters, sentences and paragraphs with reading and speaking time estimates.
Convert text between camelCase, snake_case, kebab-case, PascalCase, Title Case and more.