UtilityBase logoUtilityBase

Developer Tools

Number Base Converter

Convert between binary, hex, decimal, and octal — with the hand method shown.

Updated July 9, 2026

How to use the number base converter

  1. 1Pick the base you're typing in.
  2. 2Enter the number — 0x/0b/0o prefixes and spaces are fine.
  3. 3Read all four bases at once; copy any with its prefix.
  4. 4For decimal input, follow the divide-by-2 steps shown below.

Common uses

  • Converting hex color or address values while debugging
  • Showing divide-by-2 remainder work on CS homework
  • Reading binary flags and bitmasks as hex
  • Double-checking values when writing bit-manipulation code

Frequently asked questions

Why do programmers use hexadecimal at all?

Because hex is compressed binary: each hex digit is exactly one nibble (4 bits), so a byte is always two hex digits and the translation is mechanical — 0xFD is 1111 1101, readable at a glance once you know 16 patterns. Writing 0xFF3A21 beats writing 24 binary digits, and unlike decimal, the bit structure stays visible. That's why colors, memory addresses, and byte dumps are hex.

How does the divide-by-2 method work?

Repeatedly divide the decimal number by 2, keeping each remainder: the remainders, read bottom-to-top, are the binary digits. It works because each division peels off the lowest bit (the remainder is whether the number is odd). The tool prints every division so you can copy the work onto homework — and the same method converts to any base by dividing by that base instead.

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

They're the prefixes programming languages use to mark a literal's base: 0x for hex, 0b for binary, 0o for octal (all from C-family conventions, now in Python, JavaScript, Rust, and most modern languages). 0x10 is sixteen, not ten. The converter accepts them on input and includes them in copies so pasted values mean the same thing in code.

Where does octal still show up?

Almost exclusively Unix file permissions: chmod 755 is octal, where each digit packs three permission bits (read/write/execute) for owner, group, and others — a place where base-8 genuinely fits the data. Beyond that, octal is mostly historical. The chmod calculator decodes those permission digits specifically.

About this tool

The number base converter translates values between decimal, binary, hexadecimal, and octal simultaneously — type in any base and read all four, with programmer conventions built in: 0x/0b/0o prefixes accepted and shown, binary grouped in nibbles (because each 4-bit group is exactly one hex digit), and copy buttons that include the prefix code expects. Exact big-integer math handles values up to 64 digits without floating-point drift. For students, decimal-to-binary shows the classic divide-by-2 remainder method step by step — the work teachers want on paper. Character-code values also display their character and byte size.

Like most tools on UtilityBase, the number base converter runs entirely in your browser — nothing you enter is uploaded or stored on a server. It's free to use with no account required. Browse more developer tools here.

Was this tool helpful?

Related tools