Number base converter

Use number base converter to convert exact integers across bases 2, 8, 10 and 16.

Assumptions & limits

Convert exact integers across bases 2, 8, 10 and 16. Use an optional leading + or minus, without 0x/0b prefixes, separators or fractions. Limit 1,024 digits plus optional sign. Negative output uses an ordinary leading minus, not a fixed-width two’s-complement encoding.

Unless stated otherwise, inputs are 0–1 billion; positive quantities are at least 10⁻⁹. Lists and integer tools have the limits above. Durations round to seconds; sub-second and extreme values retain a seconds value. All inputs and results stay on your device.

YOUR ANSWER

Decimal

255

Binary
11111111
Octal
377
Hexadecimal
FF
How it’s calculatedCalculated on your device

Read each digit in the selected base using exact integer arithmetic; repeatedly divide by the target base to format output.

Displayed values may be rounded. Calculations keep the underlying precision.

Convert exact integers across bases 2, 8, 10 and 16. Use an optional leading + or minus, without 0x/0b prefixes, separators or fractions. Limit 1,024 digits plus optional sign. Negative output uses an ordinary leading minus, not a fixed-width two’s-complement encoding.

The formula, made simple

Use number base converter to convert exact integers across bases 2, 8, 10 and 16.

Read each digit in the selected base using exact integer arithmetic; repeatedly divide by the target base to format output.

A worked example

Decimal 255 is binary 11111111, octal 377 and hexadecimal FF. Negative decimal −255 is represented as −FF in hexadecimal.

A few useful answers

How is this estimate calculated?

Read each digit in the selected base using exact integer arithmetic; repeatedly divide by the target base to format output.

What assumptions should I check?

Convert exact integers across bases 2, 8, 10 and 16. Use an optional leading + or minus, without 0x/0b prefixes, separators or fractions. Limit 1,024 digits plus optional sign. Negative output uses an ordinary leading minus, not a fixed-width two’s-complement encoding.

Back to calculator ↑