ToolsYard

Number Base Converter

Type a number into any field — the other three update automatically.

What this tool does

This tool converts a whole number between the four number bases programmers use most often: binary (base 2, using digits 0–1), octal (base 8, digits 0–7), decimal (base 10, the everyday number system), and hexadecimal (base 16, digits 0–9 and A–F). Type into any one field and the other three recalculate immediately — there's no separate "convert" step, and no direction to pick. All conversion happens locally in your browser.

Example use case

Hexadecimal shows up constantly in programming: memory addresses, color codes, byte values in a hex dump, and bitwise flags. Binary is the natural way to reason about individual bits in a flags field or a network subnet mask. Instead of doing the arithmetic by hand or in a calculator app, pasting a value here gives you all four representations side by side.

Note on invalid input

Each field only accepts digits valid for its base — for example, typing an "8" into the octal field or a "G" into the hexadecimal field isn't a valid digit in that base. If you enter something invalid, the tool flags it and leaves the other fields showing the last valid result.