Number Base Converter
Runs in your browserConvert a number between binary, octal, decimal and hexadecimal — all four at once, in your browser.
- Binary (2)
0b11111111 - Octal (8)
0o377 - Decimal (10)
255 - Hexadecimal (16)
0xFF
About this tool
Different bases suit different jobs, which is why one value ends up written four ways. Hexadecimal compresses bytes into two readable characters, so it dominates colours, memory addresses and hashes. Binary makes bit-level flags and permission masks legible. Octal survives mainly in Unix file modes. Converting between them is mechanical, and doing it in your head is a reliable way to introduce an off-by-one.
How to use
- Type a value and tell the converter which base it is in.
- Prefixes like 0x, 0b and 0o are accepted and stripped automatically.
- Copy whichever representation you need.
When to use this tool
- Turning a hex colour channel into decimal.
- Reading a Unix permission mask in binary.
- Converting a hex memory address or opcode while debugging.
- Checking a bitmask value against its flags.
Tips
- Hex digits A–F are case-insensitive here; output is uppercase by convention.
- Underscores and spaces are ignored, so 1010_1010 works.
- For text rather than numbers, use Text to ASCII instead.
Limitations
- Limited to integers JavaScript can represent exactly (up to 2^53 - 1).
FAQ
- Is anything sent to a server?
- No. Conversion is arithmetic performed in your browser. Nothing is transmitted or stored.
- Why does a very large number fail?
- JavaScript represents integers exactly only up to 2^53 − 1. Beyond that, digits would silently become wrong, so the tool refuses rather than showing you a plausible but incorrect answer.
- Can it handle negative numbers or decimals?
- Negative integers work. Fractional values do not — base conversion of fractions has its own rounding rules and is a different problem.