Tools

Number base converter

Convert a number between binary, octal, decimal, and hexadecimal, plus any arbitrary base from 2 to 36. Values are converted with BigInt, so even huge hashes and keys stay exact with no floating-point rounding. Illegal digits for the chosen base are caught before they can produce a wrong answer. Everything runs in your browser; nothing is uploaded.

Convert a number

Type a value, pick the base it's written in, and read it in every base below. Everything runs in your browser. Nothing is sent over the network.

Enter a number above to see it in binary, octal, decimal, and hexadecimal.

Enter a valid number above to convert it to base 36.

Why base conversion matters when you're debugging

Real bugs live at the boundaries between number bases. A color arrives as #ff8800 but your code compares it as decimal. A permission bitmask reads 0b101101 in one log line and 45 in another. A file mode is octal, a memory offset is hex, and a feature flag is a single bit buried in a 64-bit integer. Being able to see the same value in every base at once turns those mismatches from guesswork into something you can read off directly.

Where naive converters fall down is precision. Anything that routes through a normal JavaScript number silently rounds once you pass 2^53, so a 64-bit identifier or a cryptographic value comes back subtly wrong. This tool converts with BigInt end to end, which means arbitrarily large integers convert exactly. It also validates every digit against the base you picked, so a stray character produces a clear inline error instead of a plausible-looking but incorrect result.

How to use it

  1. Type or paste your number into the input field.
  2. Choose the base it is written in: binary, octal, decimal, or hexadecimal. Prefixes like 0x and digit separators are handled for you.
  3. Read the value in binary, octal, decimal, and hex, and use the arbitrary-base field for anything from base 2 to base 36.
  4. Copy any result with its copy button.

Frequently asked questions

Which bases can I convert between?
Enter a value in binary (base 2), octal (base 8), decimal (base 10), or hexadecimal (base 16), and read it instantly in all four. The arbitrary-base field converts the same value to any base from 2 to 36, using 0-9 and a-z as digits.
Does it handle very large numbers?
Yes. Conversion is built on JavaScript BigInt, so 64-bit hashes, 256-bit keys, and other values far beyond Number.MAX_SAFE_INTEGER convert exactly, with no floating-point rounding or loss of precision.
What happens if I type an illegal digit?
Every character is validated against the base you selected. If you paste, say, a "g" while the input base is hexadecimal, you get an inline message naming the offending character and the legal digit range. No wrong answer, no crash.
Can I paste values with a 0x, 0b, or 0o prefix?
Yes. When the matching base is selected, a leading 0x (hex), 0o (octal), or 0b (binary) prefix is stripped automatically. Underscores, spaces, and commas used as digit separators are ignored too, so grouped literals like 1_000 or FF FF work.
Are negative numbers supported?
A leading minus sign is preserved through the conversion, so -255 in decimal shows as -11111111 in binary and -FF in hex. The tool converts sign-and-magnitude values rather than fixed-width two’s-complement representations.
Is any data sent to a server?
No. The entire converter runs in your browser with the Web platform’s built-in BigInt. Nothing you type is uploaded, logged, or stored anywhere.