Integer base converter

Convert signed integers between binary, octal, decimal and hexadecimal.

Numbers Stateless

Use up to 100 digits, with an optional sign and matching base prefix.

How it works and examples

Choose the input base: 2, 8, 10 or 16. Use at most 100 digits, with an optional sign and matching 0b, 0o or 0x prefix. Fractions and digit separators are rejected. Results use a minus sign for negative values, not two’s complement. Example: FF in base 16 is 255 in decimal.