Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal
How to Use the Number Base Converter
- Select the source base (binary, octal, decimal, hex).
- Enter the number and click Convert.
Supports arbitrarily large numbers via BigInt. Outputs in all four bases simultaneously.
What is Number Base Conversion?
The Number Base Converter enables seamless radix conversions between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and arbitrary bases from base 2 to base 36. It performs high-precision mathematical transformations, displaying bit representations, two's complement, and byte breakdowns for computer science and low-level software engineering.
Common Uses
- Translating memory addresses, offsets, and machine registers between hex and decimal
- Converting file permissions between symbolic, octal (e.g. 755), and binary representations
- Analyzing low-level bit patterns and network mask numbers (CIDR prefixes)
- Solving academic computer architecture and discrete mathematics assignments
Frequently Asked Questions
What is a number base (radix)?
A number base or radix is the number of unique digits (including zero) used to represent numbers in a positional numeral system. For example, decimal has 10 digits (0-9), while hexadecimal has 16 digits (0-F).
Does this converter handle large 64-bit integers without precision loss?
Yes. The conversion engine uses JavaScript BigInt arithmetic, preventing the floating-point rounding errors typical of standard 53-bit JavaScript numbers.
How are bases above 10 represented?
For bases from 11 to 36, Latin letters A through Z are used to represent values from 10 to 35. For example, in hexadecimal, A=10, B=11, ..., F=15.
Notes from this implementation
One converter for every base
Decimal-to-hex and hex-to-decimal were separate URLs that only pre-selected this dropdown. They now redirect here with ?from=10 or ?from=16. The script prints binary, octal, decimal, and hex for the same integer, using BigInt, so a 64-bit id does not pass through a JavaScript number and get rounded.
Prefix habits
Hex input is the digits only, unless you included 0x and the parser strips it. 10 in hex is sixteen in decimal. 10 in decimal is two in binary. The base dropdown is part of the input. A leading zero does not mean octal on this page. If you came from a language where it does, type the base explicitly.