This number base converter shows an integer in binary, octal, decimal, hexadecimal, base 32 and base 36 at the same time, plus any base from 2 to 36 you choose. Every row is editable: type a hex value into the hex field and the binary, decimal and the rest update. Prefixes like 0x and 0b, a minus sign, and spaces, commas or underscores between digits are all accepted, so you can paste straight from code or a datasheet. To convert many values at once, switch to the list mode, paste one number per line, and get a table in every base that you can copy or download as CSV.
Numbers are handled as arbitrary-precision integers, so a 64-bit ID, a 256-bit hash value or a 300-digit decimal converts exactly, where tools built on ordinary JavaScript numbers quietly round anything above 9,007,199,254,740,991. The two's complement table shows how the value is stored in 8, 16, 32 and 64-bit signed and unsigned integers, and flags overflow. Fractions are rejected with an explanation rather than converted approximately: many decimal fractions have no exact binary form.
How to use
- Type a number into the field for the base it is written in, for example 0xBEEF in Hexadecimal or 1011 in Binary.
- Read the other bases from the other fields; copy any of them with its button.
- For an unusual base, choose it in the Any base menu and type into that field.
- Check the two's complement table to see the bit pattern at a fixed width, or what a negative number looks like in hex.
- Turn off digit grouping if you need the plain string for code.
Frequently asked questions
Can I convert a list of numbers at once?
Yes. Choose "List of numbers (bulk)", paste up to 2,000 numbers one per line, and pick the input base (or leave it on Auto, which reads 0x, 0b and 0o prefixes). Each line is converted to decimal, binary, octal, hex, base 32, base 36 and one extra base of your choice; a line that does not parse shows its own error and the rest still convert. Copy the table or download it as CSV.
How do I convert binary to decimal?
Multiply each binary digit by 2 raised to its position, counting from 0 on the right, and add the results. For 1011: 1×8 + 0×4 + 1×2 + 1×1 = 11. Or type it into the Binary field above and read the Decimal field.
How do I convert hex to decimal?
Each hex digit is worth 16 times the digit to its right, and A–F stand for 10–15. For 0x2F: 2×16 + 15 = 47. Each hex digit also maps to exactly four binary digits (F = 1111), which is why hex is used as a compact way to write binary.
What is two's complement?
It is how computers store negative integers. In an n-bit integer, a negative number −x is stored as 2^n − x. So −1 in 8 bits is 11111111 (0xFF), and −128 is 10000000. The same bit pattern reads as 255 unsigned or −1 signed; the table shows both. The advantage is that addition and subtraction work the same way for signed and unsigned values.
Why does my converter give wrong results for large numbers?
Most converters use JavaScript numbers, which are 64-bit floating point and represent integers exactly only up to 2^53 − 1 (9,007,199,254,740,991). Above that, digits are silently rounded, so a 64-bit database ID or a Twitter/X snowflake ID converts wrongly. This converter uses BigInt, which has no size limit.
Can I convert fractions like 0.1 to binary?
Not here, deliberately. 0.1 in decimal is a repeating fraction in binary (0.000110011…), so any finite answer is an approximation, and that rounding is exactly why 0.1 + 0.2 is not 0.3 in most programming languages. This tool converts integers exactly; to work with fractions, scale them to integers first (for example, store cents instead of dollars).
Where each base shows up
• Binary (base 2): bit flags, network masks, hardware registers, permissions bitfields.
• Octal (base 8): Unix file permissions, where 755 means rwxr-xr-x because each octal digit is exactly three bits (owner, group, others).
• Hexadecimal (base 16): memory addresses, colour codes (#244B3F), byte dumps, hashes, MAC addresses and Unicode code points (U+1F332).
• Base 32 (0–9, A–V): compact identifiers. Note that the RFC 4648 Base32 used by TOTP secrets is a byte encoding with the alphabet A–Z, 2–7, not this number base.
• Base 36 (0–9, A–Z): the most compact case-insensitive alphanumeric representation, used for short IDs and URL shorteners; JavaScript's Number.prototype.toString(36) produces it.
Fixed-width integers and overflow
Programming languages store integers in fixed widths: int8/uint8 (one byte), int16, int32 and int64. A signed n-bit integer covers −2^(n−1) to 2^(n−1) − 1, so an int8 is −128 to 127 and an int32 is −2,147,483,648 to 2,147,483,647. The unsigned version covers 0 to 2^n − 1.
When a value does not fit, most languages keep only the low n bits. That is why 200 stored in an int8 reads back as −56, and why 2,147,483,647 + 1 in a 32-bit int becomes −2,147,483,648. The two's complement table here shows that truncated pattern and marks the row as overflowed, which makes it easy to predict what a cast in C, Java, Go or Rust will produce.
