Binary ยท Octal ยท Decimal ยท Hex Converter ยท Byte/KB/MB/GB Calculator ยท Simple Calculator
Base conversion is one of the most fundamental operations in computer science and daily development. The online base converter & byte calculator from ng.cc is completely free, requires no installation, and supports real-time conversion between binary, octal, decimal, and hexadecimal. It also includes byte/KB/MB/GB conversion and a simple calculator. All calculations happen locally in your browser โ no data is sent to any server, ensuring your privacy.
Enter a decimal number and instantly see binary (0b), octal (0), and hexadecimal (0x) results. Supports large integers (within JavaScript safe integer range).
Automatically converts numbers to B, KB, MB, GB. Example: 1024 โ 1 KB, 1048576 โ 1 MB.
Basic arithmetic (+, -, *, /). The result is automatically fed into the converter for seamless "calculate + convert" workflow.
Convert from binary, octal, or hexadecimal directly to decimal, accommodating different input preferences.
Base conversion is indispensable in many scenarios:
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
These are common programming notations: 0b1010 means binary 10, 0755 means octal 755, 0x1A3F means hexadecimal 1A3F. This tool uses these standard formats so you can directly copy results into your code.
This version focuses on integer conversion, the most common developer need. For fractional conversions, we recommend a scientific calculator.
1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB. This tool uses binary prefixes (KiB, MiB displayed as decimal but values are binary-based).
Each binary digit represents only 0 or 1, so expressing the same value requires about 3.3 times more digits than decimal. For example, decimal 1024 is binary 10000000000 (11 bits). This is normal.
Due to JavaScript's Number type limitations, this tool supports integers up to 9007199254740991 (2^53-1). Values beyond this may lose precision.
This tool is part of the ng.cc developer toolkit. You might also need:
โก All tools run locally in your browser, no data storage. Safe for production use.