Number base converter
Convert between bases 2–36 with BigInt precision, quick binary/octal/decimal/hex input, digit grouping, bit length and byte length.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
ffff11111111377255ff81What this tool does
- Convert while reading hardware or protocol docs: what is 0xFF in decimal, or what is that bit mask as a number — pick the input and target base and you have it.
- Work with integers past the safe Number range: everything goes through BigInt, so values like 2^64 or 2^100 keep their low bits instead of being silently rounded.
- Get widths and sizes: the result reports bit length and byte length, which makes "how many bytes does this need" or "does it fit in a uint32" a one-glance answer.
- Cross-check a binary value: decimal, binary, octal and hex are listed together, with digit grouping (groups of 4 for binary and hex, 3 for octal) so you can eyeball the alignment.
Example
Input
Value: 4095 Input base: 10 Target base: 16
Output
Target base result (16): fff Grouped: fff Binary (2): 111111111111 Octal (8): 7777 Decimal (10): 4095 Hexadecimal (16): fff Bit length: 12 Byte length: 2
Spaces and underscores in the input are ignored (handy for long pasted strings), a negative sign is only allowed at the front, and outputs put it in front as well.
Frequently asked questions
How large a number can I convert?
Only BigInt is used for the arithmetic, so the limit is browser memory rather than 2^53. Values like 2^100, or even longer binary strings, convert exactly with no trailing-digit rounding.
Why does entering ff say it contains characters invalid for this base?
The input base is still 10, the default. ff is only valid in base 16, so switch Input base to 16. The error message lists the offending characters separately, so you can see exactly which one failed.
Are decimals or scientific notation supported?
No. This is an integer base converter, so a decimal point counts as an invalid character. Split a fractional value into its integer and fraction parts and convert them separately.
What base range is available?
2 to 36. The digit table is 0–9 followed by a–z, so base 36 uses every letter exactly once. The "uppercase letters" switch renders a–f (or later letters) in uppercase.
Is the converted value sent anywhere?
No. The digit table and the conversion logic live in the page and BigInt does the work locally, with no network requests at all, so it also works offline.
Keywords:base converterradixbinaryoctaldecimalhexadecimalbigintbit length进制转换进制转换器二进制八进制十进制十六进制大整数位长度字节长度