Number Base Converter — Binary, Octal, Decimal & Hex
Convert non-negative integers without rounding large values
SimplyUtils converts whole numbers between binary, octal, decimal and hexadecimal. Edit any one field and the other three update from the same integer. The implementation uses integer arithmetic rather than a floating-point parse, preserving numbers larger than the usual safe floating-point integer range.
Worked examples
| Binary | Octal | Decimal | Hexadecimal |
|---|---|---|---|
| 1010 | 12 | 10 | A |
| 11111111 | 377 | 255 | FF |
| 100000000000000000000000000000000000000000000000000001 | 400000000000000001 | 9007199254740993 | 20000000000001 |
The last example is deliberately larger than 9,007,199,254,740,991. A floating-point conversion can silently round it to a neighboring integer. Here the final binary digit remains 1 and the exact decimal output is preserved.
Prefixes, leading zeros and valid digits
Matching prefixes are optional: 0b1010 in Binary, 0o12 in Octal or 0xA in Hexadecimal each represents decimal 10. Hexadecimal letters are case-insensitive and output uses uppercase. Decimal does not accept a prefix. Leading zeros are allowed; converted fields show the canonical value without leading zeros.
Enter at most 1,000 source digits, excluding a matching prefix. Surrounding whitespace is ignored. Negative signs, decimal fractions, commas, internal spaces, scientific notation and digits outside the selected base are rejected. When a value is invalid, the other fields and information panel clear and copy actions are removed. Clear the active field to clear all four.
Interpret the information panel
Bits needed is the length of the positive integer's binary representation. This page defines zero as requiring zero bits; that is a mathematical display convention, not a file format or storage allocation. A value is a power of two only if it is positive and its binary representation has a single 1. Thus decimal 256 is a power of two, while 255 is not. Zero is even but is not a power of two.
For decimal 18,446,744,073,709,551,616, which equals 2 to the power 64, the panel shows 65 bits, even and a power of two. These checks use the complete integer rather than truncating it to a 32-bit value.
Limits and processing
The converter does not interpret signed two's-complement words, floating-point bit patterns, byte order or a fixed output width. A leading zero here is padding, not a separate value or a promise of eight-bit storage. Copy sends the visible field to your clipboard. Calculations run in this browser without an API request or saved conversion history; general analytics and cookies are described in the Privacy Policy.
The digit-sum calculator answers a different question about decimal digit patterns.