Life Calculator
MAKE THE FORMULA CLEAR

Base converter

Convert one non-negative integer exactly between binary, octal, decimal and hexadecimal.

Start with your own numbers

Editable example

An example is filled in. Replace it with your own data to calculate.

Choose the source base first, then enter only digits valid for that base; hexadecimal may use A through F.

Loading calculator…

Use digits valid for the selected source base. Do not add a sign, prefix, decimal point or separator.
Choose the base used by the entered value.
Choose the base for the main result.

Results update when inputs are complete. A plan is kept only when you save it. Inputs and results are not uploaded.

Saved plans →

Saved in this browser. Before changing devices, export a backup from My tools.

Example result

Base 2 result

101101111010001

The four results are different representations of the same integer. Signed complements, fractions and character encodings are outside scope.

Binary101101111010001
Octal55721
Decimal23505
Hexadecimal5BD1

Worked steps

  1. First expand the source digits by place value into decimal.
  2. Then express the same integer digit by digit in the target base.

Only non-negative integers up to 64 characters are accepted. Do not use a sign, decimal point, prefix such as 0b, 0o or 0x, comma, underscore or internal space. Hexadecimal may use 0–9 and A–F; output uses uppercase letters. Exact integer arithmetic avoids JavaScript Number precision loss. This converts numeral representations; it does not handle signed complements, fractions, character encodings or floating-point formats.

Method and scope

Only non-negative integers up to 64 characters are accepted. Do not use a sign, decimal point, prefix such as 0x, comma, underscore or internal space. Hexadecimal may use 0–9 and A–F; output uses uppercase letters.

Exact integer arithmetic avoids JavaScript Number precision loss. This converts numeral representations; it does not handle signed complements, fractions, character encodings or floating-point formats.

References:Ministry of Education Encyclopedia: converting decimal to binary、Fengshan Senior High School: numeral systems and base conversion

Purpose

Convert the same non-negative integer between base 2, 8, 10 and 16 without losing precision.

Inputs

Enter a value using only digits valid for the selected source base, then choose the target base.

Formula

Parse each source digit by place value to obtain one exact integer, then repeatedly divide by the target base to produce target digits.

Example

Hexadecimal 5BD1 equals decimal 23505, octal 55721 and binary 101101111010001.

Understanding the result

All four representations describe the same integer. Leading zeroes are removed and hexadecimal letters are uppercase.

Limits

Non-negative integers only, up to 64 input characters. Signed complements, fractions, encodings and floating-point formats are outside scope.

Keep it handy for next time

Add Base converter to your home screen

This icon opens this tool. Confirm installation in your browser.

  1. iPhone: Open in Safari, tap Share → Add to Home Screen, then confirm.
  2. Android: Open in Chrome and choose Install app or Add to Home screen from the menu.
  3. In an in-app browser such as LINE or Facebook, use its menu to open the page in Safari or Chrome first.

Browser options vary. A shortcut does not provide cross-device synchronization, and an installed app may have separate storage. Export a backup from My tools first. The first load requires a connection.

Checking offline data.