How to use the binary & hex converter
- Type into any of the four fields — decimal, binary, hex or octal.
- The other three update live. Prefixes like
0x,0band0oare accepted, and spaces/underscores are ignored. - Use the Copy buttons to grab a value for your code or homework.
Number bases in 60 seconds
Everyday numbers are base 10 (digits 0–9). Computers work in binary, base 2 (just 0 and 1), because circuits are on or off. Hexadecimal, base 16 (0–9 plus A–F), is a compact human-friendly way to write binary — one hex digit is exactly four bits, which is why memory addresses and colors (#FF6600) use it. Octal, base 8, appears in Unix file permissions like 755. The same quantity just looks different in each base: 2026 = 11111101010₂ = 7EA₁₆ = 3752₈.
Benefits
- Type in any of the four fields — decimal, binary, hex or octal — and the rest update instantly.
- Arbitrary-precision math, so numbers far beyond 64-bit convert correctly.
- Accepts common prefixes like 0x, 0b and 0o, and ignores spaces and underscores.
- Copy buttons on every base for quick use in code.
Limitations to know
- It converts whole numbers only — no fractional or floating-point conversion.
- Negative numbers show as mathematical negatives, not two's-complement bit patterns.
- It does not convert text to binary — it works with numbers.
Common mistakes to avoid
- Confusing a two's-complement representation from a programming context with the plain negative shown here.
- Typing digits that do not exist in the chosen base, like 8 in octal or 2 in binary.
- Reading a hex value without noticing the 0x prefix convention in code.
Alternatives
For hex color codes specifically, the Color Converter is purpose-built; to encode text rather than numbers, use the Base64 Encoder.
Last updated: August 2026 · Reviewed by the AI Toolbox editorial team.
Frequently asked questions
How big a number can it handle?
Effectively unlimited — the converter uses arbitrary-precision integers, so numbers far beyond 64-bit work fine.
Does it support negative numbers?
Yes — a leading minus sign converts in all bases. (It shows the mathematical negative, not two's-complement bit patterns.)
Does it convert fractions or decimals points?
No — it converts whole numbers (integers), which is what base conversion almost always means in practice.
Why is hex used for colors?
A screen color has three 0–255 channels; each fits exactly in two hex digits, so #RRGGBB encodes the whole color in six characters.