Number Base Converter
Convert between binary, octal, decimal, and hexadecimal. Supports very large integers with full precision.
Enter a number to see conversions.
A number base (or radix) determines how many digits are used to represent values. Binary uses 0 and 1, octal 0-7, decimal 0-9, and hexadecimal 0-9 plus A-F. Each digit's position carries a weight equal to the base raised to that position, so the same symbol string means different values in different bases.
Computers store everything as binary, but hexadecimal is a compact shorthand: each hex digit represents exactly four bits, so one byte is always two hex digits. That is why memory addresses and color codes use hex.
The converter uses BigInt, so values above 2^53 keep full precision instead of being silently rounded as a JavaScript Number would.
Common uses
- Translating a memory address or a bitmask from hexadecimal into decimal to understand its actual value.
- Reading a machine's status flags encoded as binary and converting them into hex for a ticket or report.
Frequently asked questions
- Why is 0x used for hex?
- The 0x prefix comes from C and is a convention to mark the following digits as hexadecimal. Similarly 0b marks binary and 0o marks octal in many languages.
- Can this handle very large numbers?
- Yes. The converter uses BigInt, so values above 2^53 keep full precision instead of being silently rounded as a JavaScript Number would.
- How do I convert a fraction?
- This tool converts integers only. For fractions, multiply by the target base repeatedly and read the integer parts; that is a separate algorithm.