Convert numbers between decimal (DEC), binary (BIN), octal (OCT) and hexadecimal (HEX). Type a number in any base and get all four representations instantly.
Convert from decimal
Convert numbers between decimal (DEC), binary (BIN), octal (OCT) and hexadecimal (HEX). Type a number in any base and get all four representations instantly.
Picking decimal changes the number, not just the label above it. The input system tells the calculator how to read the characters you typed, and the same string means something different in each. This page opens the calculator with decimal already selected, so only the remaining fields are left to fill in. The remaining fields are yours to fill in, and the result follows once you press calculate.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
Number System Converter - before you calculate
Without converter
- Manual division by 2/8/16 - easy to make mistakes
- Mix up remainder order in BIN conversion
- Forget hex digit values A-F
- Waste time on CS assignments
With converter
- Type a number, pick a system - done
- DEC, BIN, OCT, HEX all at once
- Verify manual calculations
- Result in a fraction of a second
How does the conversion work?
BIN (binary) - digits 0-1, base 2
OCT (octal) - digits 0-7, base 8
HEX (hexadecimal) - digits 0-9 + A-F, base 16
Conversion table - common values
| DEC | BIN | OCT | HEX | IT context |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | NULL, false |
| 10 | 1010 | 12 | A | - |
| 127 | 1111111 | 177 | 7F | Max signed byte (int8) |
| 255 | 11111111 | 377 | FF | Max unsigned byte, RGB color channel |
| 1024 | 10000000000 | 2000 | 400 | 1 KB (kibibyte) |
| 65535 | 1111111111111111 | 177777 | FFFF | Max uint16, TCP port range |
Practical examples
Each hex pair converts to a 0-255 decimal value
Each octal digit maps to exactly 3 permission bits
Understanding subnet masks requires binary thinking
Memory addresses are almost always displayed in hex
ASCII table values appear in all four number systems
HEX in CSS colors
| Color | HEX | RGB (DEC) | BIN (R channel) |
|---|---|---|---|
| Red | #FF0000 | 255, 0, 0 | 11111111 |
| Green | #00FF00 | 0, 255, 0 | 00000000 |
| White | #FFFFFF | 255, 255, 255 | 11111111 |
| Teal | #14B8A6 | 20, 184, 166 | 00010100 |
FAQ - Frequently Asked Questions
Related tools
Powers & Roots Calculator
Powers of 2 are the foundation of number systems - Open calculator
Logarithm Calculator
Log2 tells you how many bits are needed to represent a number - Open calculator
Percentage Calculator
Calculate percentages, increases, decreases and ratios - Open calculator
GCD & LCM Calculator
Greatest common divisor and least common multiple - Open calculator
Average Calculator
Arithmetic, geometric, harmonic and weighted mean - Open calculator
See also
Calculator verified by the LiczGrupa.pl team
Content, formulas and results have been reviewed for accuracy and relevance by our team of specialists.

Reviewed by: Natalia Skrzek