Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal

What is it and how does it work?

A number base converter rewrites a number between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). The value never changes — only how it is written. Decimal is what humans count in, binary is the on/off language computers actually run on, and hexadecimal is a compact human-readable shorthand for binary where each hex digit stands for exactly four bits. Converting between them is everyday work in programming, electronics and debugging, where the same quantity appears in whichever base is most convenient for the context.

Hexadecimal earns its place because it lines up neatly with how computers group bits: a single byte is two hex digits, so 255 is FF and a 32-bit colour or memory address stays short and legible. This tool converts an input in any of the four bases to all the others at once, so you can read a hex colour like FF as 255, see a permission value such as 0o755 in binary, or check that the decimal you expect matches the bit pattern you see — without doing the arithmetic by hand.

Common use cases

Frequently asked questions

Why is hexadecimal used so much in computing?

Because it maps cleanly onto binary: each hex digit is exactly four bits, so one byte is always two hex digits. That makes hex a compact, readable stand-in for long binary strings, which is why colours, memory addresses and byte values are written in it.

What do the prefixes 0x, 0b and 0o mean?

They signal the base of a literal in code: 0x for hexadecimal (0xFF), 0b for binary (0b1010) and 0o for octal (0o755). They are not part of the number itself — just a marker so the reader and the compiler know which base to interpret.

Can it convert numbers with a fractional part?

Base conversion is most commonly used for whole numbers, which convert exactly. Fractions can be represented in other bases too, but some decimal fractions become repeating digits in binary, so for fractional values expect rounding rather than an exact match.

What are the digits above 9 in hexadecimal?

Hex needs sixteen digits, so after 0–9 it uses the letters A–F for the values ten to fifteen. A is 10, B is 11 and so on up to F, which is 15. Case does not matter: FF and ff are the same value.

Developer

UUID Generator · Timestamp Converter · Base64 Encoder · Base64 Decoder · Hash Generator · Color Converter