πŸ”’ Number Base Converter

Convert between binary, octal, decimal, hex, and any base up to 36.

Conversions

How to Use This Calculator

Enter the number you want to convert in the input field, then select its current base from the dropdown. The calculator instantly shows the same number in binary, octal, decimal, and hexadecimal. For decimal inputs, it also shows the step-by-step division process for the binary conversion.

1

Type your number in the input field. For hex, you can use uppercase letters A-F (e.g., type 1A3F).

2

Select the base the number is currently in: Binary (2), Octal (8), Decimal (10), or Hexadecimal (16). There is also a "Custom" option for any base from 2 to 36.

3

All four standard base conversions appear instantly in the results. Each result has a Copy button.

4

For decimal input, scroll down to see the division steps showing exactly how the binary conversion was reached.

Number Base Conversion Rules

Decimal to Base N: divide by N repeatedly, read remainders bottom to top Base N to Decimal: sum each digit Γ— N^(position from right, starting 0) Hex: 0-9 then A=10, B=11, C=12, D=13, E=14, F=15 255 decimal = 1111 1111 binary = FF hex = 377 octal

To convert 13 decimal to binary: 13 Γ· 2 = 6 remainder 1, 6 Γ· 2 = 3 remainder 0, 3 Γ· 2 = 1 remainder 1, 1 Γ· 2 = 0 remainder 1. Reading remainders from bottom to top: 1101. To check: 1Γ—8 + 1Γ—4 + 0Γ—2 + 1Γ—1 = 13. Correct.

Worked Examples

255 decimalBinary: 11111111, Hex: FF, Octal: 377
1010 binaryDecimal: 10, Hex: A, Octal: 12
FF hexDecimal: 255, Binary: 11111111, Octal: 377
777 octal (Unix full permissions)Decimal: 511, Binary: 111 111 111

Where This Comes Up in Real Life

Hexadecimal is the standard notation for colour codes in web design. The colour #3A7FBD means R = 0x3A = 58, G = 0x7F = 127, B = 0xBD = 189 in decimal. This gives a mid-blue. Designers switch between hex and RGB decimal constantly. Each pair of hex digits represents one byte (8 bits), which is why 24-bit colour uses exactly 6 hex digits.

Unix and Linux file permissions use octal notation. The permission code 755 means owner has 7 (= 4+2+1 = read+write+execute), group has 5 (= 4+0+1 = read+execute), and others have 5 as well. The binary equivalents are 111, 101, 101. Binary representation is also the foundation of all integer arithmetic inside a processor, and understanding base conversion helps when reading CPU registers, debugging network packets, or working with cryptographic hash values.

Frequently Asked Questions

How do I convert decimal to binary?

Divide the number by 2 repeatedly, recording remainders. Read remainders bottom-to-top. Example: 13 β†’ 13Γ·2=6 r1 β†’ 6Γ·2=3 r0 β†’ 3Γ·2=1 r1 β†’ 1Γ·2=0 r1 β†’ binary: 1101.

How do I convert binary to decimal?

Multiply each bit by its positional power of 2 and sum. Example: 1101 = 1Γ—8 + 1Γ—4 + 0Γ—2 + 1Γ—1 = 8+4+0+1 = 13.

What is hexadecimal used for?

Hex (base 16) is used in computing to represent binary data compactly. Each hex digit represents 4 bits. Colors in CSS (#FF6600), memory addresses, and byte values are expressed in hex.

How do I convert hex to binary?

Convert each hex digit to a 4-bit binary group. Example: A3 β†’ A=1010, 3=0011 β†’ binary: 10100011.

What is octal (base 8) used for?

Octal is used in Unix/Linux file permissions (e.g., chmod 755). Each octal digit represents 3 bits. 7 in octal = 111 in binary = read+write+execute.