Number Base Converter
Number Base Converter binary decimal hexadecimal conversion convert hex integer to decimal octal binary number converterConvert an integer exactly
Enter digits without a base prefix, select binary, octal, decimal, or hexadecimal, then choose Convert integer. Results appear in all four bases and use arbitrary-size browser integers rather than floating-point approximation.
Place value in different bases
Decimal uses ten digit symbols, binary uses two, octal uses eight, and hexadecimal uses sixteen by adding A through F. Each position represents a power of the selected base. Changing notation does not change the mathematical integer; it changes the symbols used to express it.
Worked example
Decimal 255 becomes binary 11111111, octal 377, and hexadecimal FF. Converting hexadecimal FF returns the same four representations. A leading minus sign is preserved as a mathematical negative value rather than being interpreted as a fixed-width machine encoding.
Input rules
Binary accepts only 0 and 1. Octal accepts 0 through 7. Decimal accepts 0 through 9. Hexadecimal accepts 0 through 9 and A through F in either case. Do not include prefixes such as 0b, 0o, or 0x, digit separators, fractions, exponent notation, or surrounding explanatory text.
Signed machine values need more context
This converter shows an optional sign followed by magnitude. It does not infer 8-bit, 16-bit, 32-bit, or 64-bit two's-complement representations. For example, hexadecimal FF can mean positive 255 or signed negative 1 depending on width and interpretation. Hardware registers, network protocols, and file formats must supply that context.
Privacy and limitations
Conversion occurs locally using arbitrary-size integer arithmetic. Fractions, floating-point bit layouts, character encodings, endianness, byte grouping, bitwise operations, and signed-width overflow are outside scope. Extremely long values can still use substantial memory. Verify required prefixes, padding, byte order, and word width before inserting a result into code or a binary format.
Number Base FAQ
Can I enter 0xFF?
No. Select hexadecimal and enter FF.
Are very large integers rounded?
No. The converter uses arbitrary-size integer arithmetic.
Does hexadecimal FF mean negative 1?
Only under a separately defined signed width such as 8-bit two's complement.