Type the value, choose the base it is currently in and the base you want, and the result updates live; use Swap to reverse the direction.
Values with a leading 0x, 0b, or 0o prefix are recognized automatically for the matching base, so pasted values just work. If a character does not belong in the chosen base, the tool names exactly which character and position is wrong instead of failing silently. Copy the result to your clipboard with one click.
Number Base Converter (Binary/Hex/Octal/Decimal)
Convert a number between binary, octal, decimal, and hexadecimal (or any custom base 2-36), right in the browser.
Custom bases from 2 to 36 are supported for less common conversions beyond the four common presets.
Conversion uses exact digit-by-digit BigInt arithmetic, not the native Number type, so values beyond 2^53 - 1 stay accurate instead of silently losing precision.
Nothing here handles negative numbers in two's-complement representation for an arbitrary bit width - only JavaScript's own signed-integer semantics for a leading minus sign. Everything runs in this browser tab; the value you type is never uploaded or stored.
Frequently Asked Questions
What does Number Base Converter (Binary/Hex/Octal/Decimal) do?
Convert a number between binary, octal, decimal, and hexadecimal (or any custom base 2-36), right in the browser.
When should I reach for number base converter (binary/hex/octal/decimal)?
Custom bases from 2 to 36 are supported for less common conversions beyond the four common presets.
Does it handle negative numbers?
Only in JavaScript's signed-integer sense (a leading minus sign) - it does not represent negative numbers in two's-complement form for an arbitrary bit width.