Number Base Converter
Convert numbers between binary, octal, decimal, hex, and any base 2-36.
Convert a number between binary, octal, decimal, hexadecimal, or any base from 2 to 36. Big integers are handled exactly, so 64-bit hex values and long bit masks won't lose precision.
About Number Base Converter
Type a number and see it in binary, octal, decimal, and hexadecimal at once, plus any custom base from 2 to 36. It accepts base prefixes like 0x, 0b, and 0o, ignores underscore and space grouping, and handles negative values. Big integers convert exactly using BigInt, so 64-bit hex masks and long bit strings keep every digit. Everything runs in your browser.
Why bases matter
Computers think in binary, but humans rarely do. Hexadecimal packs four bits into one digit, which is why colors, memory addresses, and byte values show up as hex. Octal still turns up in Unix file permissions. Decimal is what the rest of the world counts in. Moving a value between these views is a constant small task when you're debugging, and getting it wrong by a digit is easy to do by hand.
What this handles
Pick the base your input is written in, and the binary, octal, decimal, and hex versions update as you type. Binary is grouped into nibbles and hex into bytes so long values stay readable. You can paste values with 0x, 0b, or 0o prefixes and they'll be understood. For anything unusual, the custom base field covers every radix from 2 to 36, which is handy for base-32 or base-36 encodings.
When this helps
- Reading a hex memory address or color value as plain decimal
- Building or checking a bit mask in binary
- Decoding Unix permission bits in octal
- Converting an ID stored in base 36 back to a number
- Sanity-checking a conversion your code does, without trusting your own mental math