Number Base Converter
Convert numbers between binary, octal, decimal, and hex — and see all four at once.
Enter a value above to see it in binary, octal, decimal, and hex at the same time.
What is Number Base Converter?
A number base (or radix) is the count of distinct digits a numeral system uses to write values. Decimal uses ten digits (0–9), binary uses two (0–1), octal uses eight (0–7), and hexadecimal uses sixteen (0–9 plus A–F). Every integer has the same magnitude no matter which base it is written in — the base only changes the notation. Programmers move between these bases constantly: binary for bit masks and flags, octal for Unix file permissions, decimal for figures meant for humans, and hex for memory addresses, colour values, and byte dumps. This converter parses your input in the base you choose and renders it in all four at once, so you can cross-check a value across notations without running a separate calculation for each one. It is built on BigInt, so it handles values far beyond JavaScript's 53-bit safe integer range — including 64-bit identifiers and 256-bit hashes — without any floating-point rounding.
How to Use Number Base Converter
- Type or paste the number you want to convert into the Value field.
- Pick the base that matches your input (binary, octal, decimal, or hex) — the parser reads your value from that base.
- Read the equivalent value in all four bases in the list below; each row has its own copy button.
- You may include an optional 0b, 0o, or 0x prefix on your input — it is stripped automatically before parsing.
Examples
Decimal 255
Input: 255 (from: decimal)
Output: binary 11111111 · octal 377 · decimal 255 · hex FF
Hex DEADBEEF
Input: DEADBEEF (from: hex)
Output: binary 11011110101011011011111011101111 · decimal 3735928559
Binary mask
Input: 10101010 (from: binary)
Output: decimal 170 · octal 252 · hex AA
Common Mistakes
- Forgetting to switch the From base before pasting — pasting FF while the base is set to Decimal will report invalid digits, because F is not a decimal digit.
- Treating a leading zero as meaning octal the way some C code does: this converter only changes base when you pick a different From base, not because the input happens to start with 0.
- Confusing magnitude with notation — 10 in binary, 10 in decimal, and 10 in hex are three different values (2, 10, and 16) even though they look identical.
- Expecting fractional results: this tool converts whole numbers only, so 3.14 is not a valid input in any base here.
Why Use This Tool
- Shows all four bases at once, so you can verify a conversion without running it four separate times.
- Built on BigInt, so 64-bit IDs and 256-bit hashes convert exactly with no precision loss.
- Accepts optional 0b / 0o / 0x prefixes and either letter case, matching how the value would appear in source code.
- One-click copy per base, handy for pasting straight into code, configs, or documentation.