How do I convert between number bases?
Type a number, choose the base it is written in (binary, octal, decimal or hexadecimal), and the other three representations appear instantly. For example, decimal 255 is binary 11111111, octal 377 and hexadecimal FF. Binary 1010 is decimal 10, octal 12 and hex A. The converter validates your input for the chosen base, so typing “12” as binary or “8” as octal gives a clear error instead of a wrong answer. Negative numbers are supported with a leading minus sign, and very large integers are handled exactly: 18446744073709551615 (2^64 - 1) converts to hex FFFFFFFFFFFFFFFF without rounding. Click Copy all to copy the four results together.
What are binary, octal, decimal and hexadecimal?
A number base (or radix) is how many distinct digits a counting system uses. Decimal, base 10, uses 0-9 and is the system of everyday life. Binary, base 2, uses only 0 and 1, matching the on/off states of computer hardware. Octal, base 8, uses 0-7 and appears in Unix file permissions. Hexadecimal, base 16, uses 0-9 plus A-F (A=10 up to F=15) and is used for memory addresses, colour codes like #FF5733, and byte values, because one hex digit represents exactly 4 binary digits and two hex digits make a byte. The same value can be written in any base: 255 in decimal is 11111111 in binary (eight 1 bits, one full byte), 377 in octal and FF in hex.
How does base conversion work?
Every digit in a number has a place value that is a power of the base. In decimal 255, the digits mean 2 x 100 + 5 x 10 + 5 x 1. In binary 11111111, the digits mean 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1=255. To convert from any base to decimal, multiply each digit by its place value and add them up. To convert from decimal to another base, divide repeatedly by the new base and read the remainders in reverse. Binary to hex is even simpler: group the bits in fours from the right and turn each group into one hex digit, so 1111 1111 becomes FF. This calculator does the arithmetic exactly with big-integer maths, so long values never lose precision.
Why do programmers use hex and binary?
Computers store everything in binary, but long strings of 0s and 1s are hard for humans to read. Hexadecimal compresses them: each hex digit is 4 bits, so a 32-bit value that takes 32 binary digits takes only 8 hex digits. That is why memory addresses, hash values, MAC addresses, UUIDs and colour codes are written in hex. Binary itself shows up in bit masks, permission flags, network subnetting and low-level debugging, where seeing the individual bits matters. Octal survives mainly in Unix/Linux file permissions (chmod 755) and older systems. Converting fluently between bases is a core skill in computer science courses, embedded programming and digital electronics, which is why base conversion is a standard exam topic.
What are the common conversion mistakes?
The most common is using a digit that does not exist in the base: binary has no 2-9, octal has no 8 or 9, and hex letters stop at F. This converter rejects those inputs with a message naming the base. Another is mixing up hex letters: A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15, so hex 1A is 26 in decimal, not 110. A third is forgetting that leading zeros do not change a value: binary 001010 is still 10. Finally, very long decimal numbers converted with ordinary calculators can lose precision beyond about 16 digits; this tool uses exact big-integer arithmetic, so a 20-digit value converts digit-perfectly in every base.
Is it free and private?
Yes. The number base converter is free, with no signup, no account and no limits. Conversion runs in your browser, so the numbers you enter are never sent to a server, stored or logged, and they disappear when you clear the form or close the tab. That matters when you are converting values from your own code, coursework or systems. For quick conversions between binary, octal, decimal and hexadecimal while studying, programming or debugging, this page shows all four forms at once with validation and exact big-integer handling.