Convert integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). See all four representations at once, with conversion handled in the browser.
—
—
—
—
Debugging color codes: Convert CSS hex color values to decimal RGB components. For example, enter FF in hexadecimal mode to get 255 — the maximum value for a single color channel in CSS. Use this when writing JavaScript that manipulates canvas pixels or when matching colors between design tools and code.
Working with file permissions: Unix file permissions are commonly shown in octal (e.g. 755). Enter 755 in octal mode to see it as binary 111101101, where each triplet shows the read/write/execute bits for owner, group, and others. Common values: 777 (full access), 644 (read-only for group/others), 700 (owner only).
Reading memory addresses: Memory addresses and debug logs frequently use hexadecimal notation. Convert hex values like 7FFF to decimal (32,767) or binary to inspect the numeric range or bit layout during low-level debugging.
Learning number systems: Computer science students can enter any decimal number and see its binary, octal, and hexadecimal equivalents. Start with small values like 10, 42, or 255 to build intuition, then work up to larger numbers. The All Bases grid makes it easy to compare representations side by side.
Parsing network addresses: MAC addresses (00:1A:2B:3C:4D:5E) and IPv6 addresses use hexadecimal notation. Each hex pair in a MAC address represents one byte — convert 1A to decimal 26 or binary 00011010 to understand the device identifier structure.
Enter your binary number (using only 0s and 1s), select "Binary (2)" as the From Base and "Decimal (10)" as the To Base. The result appears as you type. You can also see the decimal value in the "All Bases at a Glance" grid without changing any settings.
This tool supports four number systems: binary (base 2, digits 0–1), octal (base 8, digits 0–7), decimal (base 10, digits 0–9), and hexadecimal (base 16, digits 0–9 and A–F). Each representation appears in the "All Bases at a Glance" grid.
Yes. Type a minus sign before your number and the converter will display the signed result across all four bases. For example, entering -255 in decimal shows -11111111 in binary, -377 in octal, and -FF in hexadecimal.
Remove the # prefix and convert each two-character pair separately. For #FF6600, convert FF to decimal (255) for the red channel, 66 to decimal (102) for green, and 00 to decimal (0) for blue. This tool handles one value at a time, so enter each pair individually.
The maximum supported value is 2^53 - 1 (9,007,199,254,740,991 in decimal). Numbers beyond this limit may lose precision because JavaScript uses 64-bit floating-point representation for all numbers.
Convert integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Enter a value in one number system and see the equivalent value in the other three in the All Bases at a Glance grid. Results update as you type.
The converter supports negative integers and handles values up to 2^53 - 1 (9,007,199,254,740,991 in decimal). A one-click swap button reverses the source and target bases and uses the current result as the next input. Calculations use JavaScript number conversion on the current page.
Use it for debugging hex color codes, parsing Unix file permissions, learning number systems, or reading MAC and IPv6 addresses.
| Base | Name | Valid Characters | Common Use |
|---|---|---|---|
| 2 | Binary | 0, 1 | Digital logic, bit flags |
| 8 | Octal | 0–7 | Unix file permissions |
| 10 | Decimal | 0–9 | Everyday arithmetic |
| 16 | Hexadecimal | 0–9, A–F | Color codes, memory addresses |
| Decimal | Binary | Octal | Hex | Description |
|---|---|---|---|---|
| 2 | 10 | 2 | 2 | Binary base unit |
| 8 | 1000 | 10 | 8 | Octal base unit |
| 10 | 1010 | 12 | A | Decimal base |
| 16 | 10000 | 20 | 10 | Hexadecimal base unit |
| 32 | 100000 | 40 | 20 | 5-bit maximum + 1 |
| 64 | 1000000 | 100 | 40 | 6-bit maximum + 1 |
| 128 | 10000000 | 200 | 80 | 7-bit maximum + 1 |
| 255 | 11111111 | 377 | FF | 8-bit maximum (1 byte) |
| 256 | 100000000 | 400 | 100 | 2^8 |
| 1024 | 10000000000 | 2000 | 400 | 1 KB |
| 65535 | 1111111111111111 | 177777 | FFFF | 16-bit maximum |
| 493 | 111101101 | 755 | 1ED | Unix permission: rwxr-xr-x |