Number Base Converter
Type a number in any field and see it in binary, octal, decimal, hexadecimal and a custom base of your choice, updating live. Calculations use BigInt, so very large integers convert without losing precision.
Runs in your browser. Your files are never uploaded.
Loading Number Base Converter…
How to use Number Base Converter
- Type a number into any of the fields.
- Watch the other fields update immediately.
- Choose a custom base from 2 to 36 if you need something unusual.
- Use the copy buttons to take any representation.
What number bases are
A base, or radix, is the number of distinct digits a positional system uses. We normally count in base 10, with ten digits. Computers work with two states, so binary uses only 0 and 1. Octal uses eight digits, and hexadecimal uses sixteen: 0 to 9 followed by A to F, where A means ten and F means fifteen.
Each position in a number is worth the base raised to a power. The binary number 1011 is one eight, no four, one two and one one, which equals eleven in decimal.
Where each base is used
Hexadecimal is compact for binary data because one hex digit stands for exactly four bits. That is why colours (#FF8800), memory addresses, hashes and byte dumps are written in hex. Octal groups three bits per digit and is best known today for Unix file permissions such as 755. Binary is used when you care about individual bits, for example flags and masks. Base 36 appears in short ID schemes and URL shorteners, since it packs numbers into letters and digits.
- Two hex digits describe one byte, from 00 to FF.
- Each binary digit doubles the range, so 8 bits give 256 values.
- Prefixes 0x, 0b and 0o mark hex, binary and octal in many programming languages.
Precision and limits
JavaScript's ordinary number type loses accuracy above 9,007,199,254,740,991. This tool avoids that by working with BigInt values and parsing digits itself, so a 200-digit input is handled exactly.
Only integers are supported. Letters are case-insensitive on input, and hex output is shown in uppercase. If a character is not a valid digit for the base you are editing, the tool names it so you can correct it. Nothing is transmitted; all conversion happens locally.
Why use this number base converter tool
- Two-way live fields. Edit any field and all the others follow, with no convert button.
- Arbitrary precision. BigInt arithmetic means numbers far beyond 2 to the power of 53 stay exact.
- Custom bases. Any base from 2 to 36 using digits 0-9 and letters a-z.
- Friendly input. Accepts 0x, 0b and 0o prefixes, minus signs, spaces and underscores, and explains exactly which digit is invalid.
Frequently asked questions
Can it convert fractions?
No. This converter handles whole numbers only, positive or negative. Fractional values do not convert cleanly between bases, because a finite decimal fraction such as 0.1 repeats forever in binary.
How are negative numbers shown?
With a minus sign in front, as a signed magnitude, for example -255 is -FF. They are not shown in two's complement, whose result depends on a chosen bit width such as 8, 16 or 32 bits.
Why does base 36 use letters?
You need a single symbol for each digit value. After the ten decimal digits, the letters a to z provide twenty-six more, giving thirty-six symbols in total, which is why 36 is the highest base supported.
More free tools
PX to REM Converter
Convert pixels to rem and em, and back, with a custom root font size. Includes a table of common sizes from 8px to 64px and a copy-ready CSS declaration.
Open toolBase64 Encode & Decode
Encode text to Base64 or decode Base64 back to text. Supports UTF-8 and URL-safe Base64. Free, instant and runs in your browser.
Open toolURL Encode & Decode
Encode or decode URLs and query strings with percent-encoding. Choose component or full-URL mode. Free, instant and private.
Open tool