Toollet
Search by task or app nameSearchContact us
Pricing

Number base converter

Enter an integer to view its representations in bases 2, 8, 10, and 16 together. Large integers are converted without losing digits, and prefixes 0b, 0o, and 0x take priority over the selected base. You can copy the values in each base and the bit and byte counts representing the absolute value together, or save them as TXT.

If 0b, 0o, or 0x is present, the prefix takes priority.

Conversion results

Convert an integer to view its values in 4 bases and the bit and byte counts of its absolute value.

What you can do

Check four number bases at once

Specify the input base and integer to see its binary, octal, decimal, and hexadecimal values together. Hexadecimal output uses uppercase A–F.

Preserve the digits of large integers

Convert integers without rounding. The 0b, 0o, and 0x prefixes are also supported, and the bit and byte counts are calculated from the digits of the absolute value.

How to use

  1. Choose the input base

    Choose binary, octal, decimal, or hexadecimal. If a prefix is present, the base specified by that prefix takes priority.

  2. Enter an integer and convert

    Enter digits valid for the selected base and press “Convert”. You can enter negative numbers with a minus sign at the beginning.

  3. Check and copy results

    Check the value in each base and the bit and byte counts needed to represent the absolute value. You can copy all results or save them as TXT.

When to use it

Read values in logs or settings in another base

Use this when you want consistent representations of integers in documents or logs, for example to check a hexadecimal value in decimal.

Learn number bases or check answers

Compare the same integer in multiple bases to check the value of each digit and how A–F are used.

Number bases and integer representations

The base determines each digit's weight

In decimal, each position to the left has 10 times the weight; in binary, it has 2 times the weight. The same value is represented using digits in a different base.

Hexadecimal A–F represent 10–15

In addition to 0–9, hexadecimal uses A–F to represent 10–15. Both uppercase and lowercase letters are accepted in the input.

Negative numbers and the meaning of bit counts

Negative numbers are displayed with a minus sign. The bit and byte counts are the number of digits needed to represent the absolute value, not a fixed-width two's-complement representation or the size in memory.

Frequently asked questions

Can I convert decimals too?

This tool handles integers only. You cannot enter values containing a decimal point or fractions.

Will large integers lose digits?

The entered integer is kept as an integer and converted without losing digits. Enter no more than 4096 characters, excluding leading and trailing whitespace.

Do I need to select hexadecimal when entering 0xFF?

A 0x prefix means hexadecimal and takes priority over the selected base. 0b means binary, and 0o means octal. Without a prefix, the selected base is used.

Does this feature convert text strings to binary?

This page converts integer representations. It does not encode text using a character encoding or convert multiple values in a batch.

Inputs and results

Input
Binary, octal, decimal, or hexadecimal integers. Supports prefixes and positive or negative signs.
Results
Values in four bases, plus the bit and byte counts of the absolute value.
Save
Copy all 6 items together or save them as TXT. Changing the input clears the previous results.

Current settings

Search tools