Skip to content
UniKit

Integer base converter

Convert big integers between bases 2–36 with BigInt (no 2^53 precision limit). One input yields binary, octal, decimal, hex, base32/36 and a custom alphabet at once, with negative numbers, digit grouping, bit width and two’s complement, plus exact error positions for invalid characters.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Input

Prefixes 0x / 0b / 0o and separators (space, underscore, comma) are allowed.

Result

Binary → 11111111
Octal → 377
Decimal → 255
Hexadecimal → FF
Base 32 → 7V
Base 36 → 73
Binary11111111
Octal377
Decimal255
HexadecimalFF
Base 327V
Base 3673

What this tool does

  • Convert 0x1F or 0b11111 into decimal while reading assembly, protocol docs or packet captures — and back again when you need hex or binary output.
  • Work with bitmasks, permission bits, registers and colour channels: binary, hex and 8/16/32/64-bit two’s complement are shown side by side so you never do bit maths in your head.
  • Handle integers beyond 2^53 (snowflake IDs, hash prefixes, amounts stored in cents) without losing precision, because everything is computed with BigInt.
  • Encode non-standard bases: Base32/Base36 short links and order numbers that use a custom alphabet can be read and written with the same alphabet.

Example

Input

255

Output

Binary → 11111111
Octal → 377
Decimal → 255
Hexadecimal → FF
Base 32 → 7V
Base 36 → 73

This uses input base 10, the default 0–9A–Z alphabet, no grouping and no bit width; prefixes 0x / 0b / 0o and spaces, underscores or commas in the input are ignored.

Frequently asked questions

Why is decimal 255 written as 7V in base 32?

Base 32 takes the first 32 characters of the default 0–9A–Z alphabet, so digits run 0–9 and letters stop at V. Since 255 = 7 × 32 + 31 and 31 maps to V, the result is 7V. In base 36 letters go all the way to Z and 255 becomes 73.

Can it convert decimals or fractions?

No — integers only. A decimal point is not a valid digit in any base, so the tool reports the exact position of the offending character. The conversion is built on BigInt, which has no fractional part by design.

What do bit width and two’s complement do?

Pick 8-bit and the input 255 shows the bit pattern 11111111 with a signed value of -1, which is how -1 is actually stored. If the input does not fit the chosen width you get a warning and the pattern is shown modulo that width, which is exactly what happens when a value is truncated in real hardware.

How does the custom alphabet work?

The alphabet is used both to read the input and to produce the "custom alphabet" output row. It must be at least as long as the base and contain no duplicate characters, otherwise the tool errors out. If it matches the first N characters of 0–9A–Z, the default alphabet is used instead.

Is anything uploaded?

No. Every conversion runs locally in your browser with BigInt, no network request is made, and it works offline. The numbers you type are never recorded.

Keywords:进制转换base converterbinary十六进制hexbigint二进制八进制base36补码two’s complement

Related tools