Number Base Converter
Convert whole numbers of any size between binary, octal, decimal, hexadecimal and any base from 2 to 36, with two’s complement views.
This guide is not yet available in your language and is shown in English.
Tool guide
What this tool does
Number Base Converter translates integers between bases 2 to 36 using exact big-integer arithmetic, so even 128-bit values convert without rounding. It shows binary, octal, decimal and hex at once, signed two’s complement patterns for 8 to 128 bits, and converts whole lists with CSV export.
Programmers move between number bases constantly: hexadecimal for memory addresses and colours, binary for flags and bit masks, octal for Unix permissions, decimal for everything else. A positional base simply means each digit is worth a power of the base, so hex 2F is 2 × 16 + 15 = 47. Standard calculators and JavaScript’s Number type lose precision above 2^53 (9,007,199,254,740,992), which makes them unreliable for 64-bit identifiers, hashes and cryptographic values.
This converter parses your number with arbitrary-precision BigInt arithmetic and writes it in binary, octal, decimal, hexadecimal and one extra base of your choice from 2 to 36, using digits 0-9 then A-Z. It accepts 0x, 0b and 0o prefixes and ignores underscores, commas and spaces. A two’s complement table shows how the value is stored as a signed or unsigned 8, 16, 32, 64 and 128-bit integer, so -1 appears as FF, FFFF and so on. Enter several numbers, one per line, to convert a list and download it as CSV. All calculations run in your browser.
How to use Number Base Converter
- Type a number in the Number box, or several numbers on separate lines.
- Choose the Input base; select “Other base (2-36)” for anything unusual.
- Read the decimal, hexadecimal, binary and octal results and copy any of them.
- Set “Extra output base” to see the value in another base, such as 36 for short IDs.
- Check the two’s complement table for fixed-width signed and unsigned values.
- For lists, review the batch table and click Download CSV.
Tips for better results
- Each hex digit is exactly four binary digits, so group binary by four to read it as hex.
- Each octal digit is three bits, which is why Unix permissions such as 755 map to rwxr-xr-x.
- Base 36 uses every digit and letter, making it handy for compact, case-insensitive identifiers.
- To read a negative number from a hex dump, find the matching width in the two’s complement table and read the “As signed” column.
Common use cases
- Converting a hex colour channel or memory address to decimal.
- Building bit masks and checking flag values in binary.
- Turning a 64-bit database ID or snowflake ID into hex without rounding errors.
- Teaching positional notation and two’s complement in a computing class.
Common mistakes to avoid
- Entering a digit that does not exist in the chosen base, such as 8 in octal or G in hex; the tool names the invalid digit.
- Confusing a negative decimal with its two’s complement form: -1 and FF are the same only at a fixed 8-bit width.
- Using spreadsheet or JavaScript conversions for values above 2^53, which silently change the last digits.
Frequently asked questions
How large can the numbers be?
There is no fixed limit. Values are handled with BigInt, so a 300-digit decimal number converts exactly. Very long inputs may take a moment to display.
Does it convert fractions?
No. Only whole numbers are supported, because most fractions cannot be represented exactly in other bases. Remove the decimal part before converting.
What is two’s complement?
It is how computers store signed integers. A negative number -n at width w is stored as 2^w − n, so -1 in 8 bits is 256 − 1 = 255, or FF.
Which letters are used for digits above 9?
A = 10, B = 11 and so on up to Z = 35, which is why the highest supported base is 36. Input letters can be upper or lower case.
Feedback & suggestions
Help us improve Number Base Converter. We read every message.