Number Base Converter
Convert a number between binary, octal, decimal, and hexadecimal. Type into any field and the other three update instantly. Runs in your browser.
A free number base converter that instantly converts a number between binary, octal, decimal, and hexadecimal. Type into any field and the other three update immediately. Useful for programming, computer science coursework, networking, and debugging low-level data. Everything runs in your browser, and nothing is stored.
How to use this tool
- 01Type a number into any fieldEnter a value in binary, octal, decimal, or hexadecimal — whichever base you already have.
- 02Read the converted valuesThe other three fields update automatically to show the same number in their base.
When is this useful?
- Programming and debuggingConvert a hex memory address, color code, or bitmask to decimal or binary to understand what it represents.
- Computer science courseworkCheck binary, octal, and hexadecimal conversions for homework or exam preparation without manual long division.
- Networking and low-level configurationConvert subnet masks, flags, or permission bits between binary and their decimal or hex shorthand.
Examples
- A byte value255 in decimal is 11111111 in binary, 377 in octal, and FF in hexadecimal — the maximum value of a single byte.
- A hex color-style value1A in hexadecimal is 26 in decimal, 11010 in binary, and 32 in octal.
- Zero in every base0 is 0 in binary, octal, decimal, and hexadecimal — the only value that looks the same everywhere.
How the conversion works
Every base represents the same underlying quantity using a different number of symbols: binary uses 2 (0–1), octal uses 8 (0–7), decimal uses 10 (0–9), and hexadecimal uses 16 (0–9 and A–F). The tool parses whichever field you typed into as a whole number in that base, then re-expresses that same value in each of the other three bases.
Inputs, outputs, and assumptions
Only digits valid for the base you are typing in are accepted — for example, binary only accepts 0 and 1, and octal only accepts 0 through 7. This tool converts non-negative whole numbers only; it does not currently support negative numbers, fractional values, or signed binary representations (like two's complement).
Precision for large numbers
Conversion is done with exact integer arithmetic rather than floating-point math, so even very large binary or hexadecimal values convert precisely, without the rounding errors that plain JavaScript numbers can introduce.
Privacy and local processing
The conversion runs entirely in your browser. The numbers you enter are never uploaded, stored, or shared, and closing the tab clears everything.
Frequently asked questions
What is the difference between binary, octal, decimal, and hexadecimal?
They are all ways of writing the same numeric value using a different number of digit symbols: binary (base 2) uses 0–1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9, and hexadecimal (base 16) uses 0–9 plus A–F.
Why is hexadecimal commonly used in programming?
Each hexadecimal digit represents exactly 4 binary digits (bits), so hex is a compact, human-readable shorthand for binary data — commonly seen in memory addresses, color codes, and byte values.
Does this support negative numbers?
Not currently. This tool converts non-negative whole numbers between the four bases.
Can I convert very large numbers accurately?
Yes. The conversion uses exact integer arithmetic, so large binary or hexadecimal values (well beyond what a standard 32-bit or 64-bit number could hold) still convert precisely.
Is my data saved?
No. Everything is calculated in your browser; nothing is sent to a server.
Related tools
- Roman Numeral ConverterConvert numbers to Roman numerals and Roman numerals back to numbers, from 1 to 3999. Type into either field. Runs in your browser.OpenOpen the tool
- Ratio CalculatorSimplify a ratio A:B to its lowest terms, and see it as a decimal and a percentage. Runs in your browser.OpenOpen the tool
- Random Number GeneratorGenerate random whole numbers in a range you choose. Pick a min and max, how many numbers, and whether repeats are allowed. Runs in your browser.OpenOpen the tool

