Binary / Hex Converter
Convert a value between binary, octal, decimal, and hexadecimal, with bit length and normalized output for each base.
Last updated: 2026-03-25
Binary / hex converter
Enter your values
Enter an integer in binary, octal, decimal, or hexadecimal and convert it across the four common bases.
Decimal Value
--
Enter a value and its source base to see the corresponding binary, octal, decimal, and hexadecimal forms.
Calculation History(0)
Example calculations
Tap an example to prefill the calculator with sample values.
Hex byte
Convert 7F into every major base
A quick dev-friendly example for checking byte-level values.
Result: The same value becomes 127 in decimal and 1111111 in binary.
Binary word
Convert a 16-bit binary number
Useful for students checking base conversions by hand.
Result: The converter shows the equivalent decimal, octal, and hex forms instantly.
How the base conversion works
The converter validates the input against the selected base, parses the integer value, then re-renders the same number in base 2, base 8, base 10, and base 16.
Because the value is treated as an integer, the result is most useful for CS coursework, bit manipulation, debugging, and digital-logic exercises.
Base conversion FAQs
A quick reference for prefixes, large integers, and when to use each base.
Can this converter handle large integers?
Yes. The tool uses BigInt-style integer parsing, so it can handle much larger whole numbers than a normal 32-bit or 53-bit JavaScript number representation.
Does it support prefixes like 0x or 0b?
Yes, as long as the prefix matches the base you selected. Prefixes are optional, and spaces or underscores are ignored.
Embed this calculator
Copy the code below to embed this calculator on your website or blog. It's free — no API key needed.
<iframe src="https://calc.mintloop.dev/embed/education/binary-hex-converter" width="100%" height="600" frameborder="0" title="Binary / Hex Converter" loading="lazy"> </iframe>
Optional: auto-resize script
<script>
var CALC_HUB_ORIGIN = 'https://calc.mintloop.dev';
window.addEventListener('message', function(e) {
if (e.origin !== CALC_HUB_ORIGIN) return;
if (!e.data || e.data.type !== 'calc-hub-resize') return;
var frames = document.querySelectorAll('iframe[src*="calc.mintloop.dev"]');
frames.forEach(function(f) {
if (f.contentWindow === e.source) {
f.style.height = String(Math.max(0, Number(e.data.height) || 0)) + 'px';
}
});
});
</script> Related tools
Stay in the same STEM workflow with nearby math and trig tools.
Get more STEM calculators
Join the Calc Hub newsletter for new calculators covering algebra, trig, coding, and classroom problem solving.
Join the Calc Hub newsletterWas this calculator helpful?
Your feedback helps us improve future calculators.