Number Base Converter
100% PrivateDeveloper ToolsConvert integers between binary, octal, decimal and hexadecimal in one step.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Type the number, a leading minus is allowed for negatives.
- 2Tell the tool which base the input is in.
- 3Read all four representations and copy the one you need, or copy all at once.
Decimal 255 converts to binary 11111111, octal 377 and hexadecimal FF. And exactness matters: 18446744073709551615 (2^64 - 1) converts to hexadecimal FFFFFFFFFFFFFFFF precisely, a value a normal floating-point number cannot even represent.
- Integers only: fractional values like 10.5 are not accepted in any base.
- Digits are validated against the chosen base, so 102 is rejected as binary with a clear message rather than converted wrongly.
- Hexadecimal output uses upper-case letters for readability; input accepts either case.
JavaScript numbers are exact for integers only up to 2^53. Past that, digits silently round. This converter parses digit by digit with BigInt, so a 64-bit value converts exactly.
About this tool
The Number Base Converter translates integers between binary, octal, decimal and hexadecimal in one step, using BigInt arithmetic so conversions stay exact far beyond the 2^53 limit where ordinary JavaScript numbers start losing precision. Programmers use it for permissions, bitwise flags, memory addresses and color values.
Related tools
Part of Ovatly's free tools in Developer Tools.