What is Number Base Converter?

Convert numbers between any bases — binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and custom bases up to 36. See all representations simultaneously as you type, with grouped digits for readability.

Type in any base and all conversions update live: binary with optional 4-bit digit grouping, octal, decimal, hex with case preserved, plus a custom base from 2 to 36. The bit-view panel shows every bit position, so you can click one to flip it or shift the whole value left and right, handy when debugging bitmasks, permission flags, or color channels. Prefix shortcuts (0b, 0o, 0x) auto-detect the input base.

How to use

  1. Enter a number in any supported base — select the input base from the dropdown or type a prefix (0b, 0o, 0x).
  2. View instant conversions to all common bases displayed side by side, with digit grouping for long numbers.
  3. Edit any base field directly and the rest follow live, copy a result, click bits in the Bit View to flip them or shift the value, follow the step-by-step division, or switch to Text mode to read a string's ASCII codes.

When to use

  • Decoding a hex color code into RGB or matching it to a 24-bit binary representation.
  • Reading low-level docs where the same value is shown in hex and decimal.
  • Setting bitmask flags in C/Rust/Verilog and verifying each bit is on or off.

Result

Enter decimal 255: binary = 1111 1111, octal = 377, hex = FF. Or enter hex 'FF00FF' to see its decimal equivalent 16711935.

FAQ

Why does decimal 255 show as FF in hex and 11111111 in binary?
255 is the largest unsigned 8-bit number, so every bit is set. Hex compresses each 4-bit nibble into one digit (1111 = F), giving FF. This is exactly why hex is so common for bytes — it's the most compact human-readable form.
Does the tool handle negative numbers?
It accepts a leading minus sign in decimal input and propagates the sign across the other bases. For two's-complement representation (the form actually stored in memory), enable the bit-view panel and choose the bit width you care about.
What's the highest base I can convert to?
Base 36 — the standard alphanumeric ceiling, using 0–9 and A–Z. Anything higher would need extra symbols. Base 36 shows up in short-URL services and hash truncation, so the custom base field tops out there.
Are leading zeros preserved when I copy a binary value?
Yes if you keep digit grouping enabled. The display pads to byte boundaries (multiples of 8) so the copied string lines up with what a debugger or hex editor expects.
Can I paste a value with a 0x or 0b prefix?
Yes. The parser recognises 0x for hex, 0o for octal, 0b for binary, and falls back to whichever input base you've selected. The prefix is stripped automatically before conversion.

Related Tools