Free Number Base Converter Online
Convert numbers between decimal, binary, octal, and hexadecimal. Enter a value in any base and see the equivalent in all others instantly.
Computers represent all data in binary (base 2), but humans typically read numbers in decimal (base 10). Programmers frequently work with hexadecimal (base 16) for memory addresses, color codes, and binary data, and sometimes octal (base 8) for Unix file permissions. Converting between these by hand requires arithmetic most people have not practiced since school. This tool converts a number entered in any base — decimal, binary, octal, or hexadecimal — into all four representations at once so you can see the relationships and copy the value you need.
Number Base Converter
Edit any field — the others update instantly.
How to use this number base converter
- Enter a number in the decimal, binary, octal, or hexadecimal field.
- The other three fields update immediately to show the equivalent value in each base.
- Hex input accepts both uppercase and lowercase letters (A–F or a–f).
- Binary input accepts only 0 and 1.
- Click Copy next to any field to copy that representation.
Common use cases
- Looking up a memory address in a debugger and converting it from hex to decimal
- Setting Unix file permissions using octal values (chmod 755 means binary 111 101 101)
- Understanding a hex color code by seeing its decimal RGB components
- Confirming that a binary value matches an expected decimal or hex constant
- Converting a decimal number to binary for low-level bit manipulation work
Frequently asked questions
Why is hexadecimal so common in programming?
One hex digit represents exactly four binary bits (a nibble), so two hex digits represent one byte. That makes hex compact and directly mappable to binary — 0xFF is 11111111 in binary, 255 in decimal. Memory addresses, byte values, color codes, and binary protocols are all easier to read in hex.
What is the largest value this converter handles?
The converter uses JavaScript's native number type, which handles integers exactly up to 2^53 - 1. Numbers above that may lose precision. For very large integers, use a dedicated big-integer library.
What is octal used for?
Octal (base 8) is mainly used for Unix and Linux file permission bits. A permission string like 0755 means the owner has read/write/execute (7 = 111 in binary), and the group and others have read/execute (5 = 101 in binary).
How do I recognize which base a number is in?
Programming languages use prefixes: 0b for binary, 0o or a leading 0 for octal, and 0x for hexadecimal. Without a prefix, a number is decimal by convention. In HTML and CSS, # introduces a hex color code.