Skip to content
ToolZone

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal instantly, with support for any custom base from 2 to 36.

Runs in your browser. Nothing you enter or upload leaves your device.

Binary
11111111
Octal
377
Decimal
255
Hexadecimal
FF
Custom base (2–36)
255

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Number Base Converter

The Number Base Converter takes a whole number written in binary, octal, decimal, or hexadecimal and shows it in all four bases at once. A custom base field covers anything else from base 2 to base 36.

How it works

In any positional number system, each digit is multiplied by the base raised to the power of its position, counting from 0 on the right. Hex 1A3F is 1x16^3 + 10x16^2 + 3x16 + 15 = 6719 in decimal. The converter first reads your input in the selected base this way to get its value.

It then writes that value in each target base by repeatedly dividing by the base and collecting the remainders. Digits above 9 are written as uppercase letters, A for 10 up to Z for 35. The four standard bases are always shown, and the custom base field adds one more output in any base from 2 to 36.

How to use

  1. 1

    Choose the base your number is written in from the Input base menu.

  2. 2

    Type the number into the Value field.

  3. 3

    Read the Binary, Octal, Decimal, and Hexadecimal results, and click the copy icon on any of them.

  4. 4

    For another base, enter a number from 2 to 36 in the Custom base field.

Worked examples

The default value

Converting 255, the largest value of one byte.

Input
Decimal 255
Result
Binary 11111111 Octal 377 Decimal 255 Hexadecimal FF

With custom base 36, 255 becomes 73 (7x36 + 3).

Hex to decimal

Decoding a value from a hex dump.

Input
Hexadecimal 1A3F
Result
Binary 1101000111111 Octal 15077 Decimal 6719 Hexadecimal 1A3F

Binary flags

Reading a bit mask from a config file.

Input
Binary 101101
Result
Octal 55 Decimal 45 Hexadecimal 2D
Limitations
Only whole numbers are supported; fractional parts are ignored. Very large values above 9,007,199,254,740,991 lose precision because standard JavaScript numbers are used. Parsing is lenient: the number is read up to the first invalid character, so 12abc in decimal is treated as 12.
Assumptions
Input numbers are unsigned or use a leading minus sign, not two's complement. Letters A-Z represent digit values 10-35.
Privacy
All conversions run in your browser, and nothing you enter is sent or stored.

Frequently asked questions

Why is hexadecimal commonly used in programming?+

Each hex digit represents exactly four bits, so hex is a compact, readable way to write binary values such as memory addresses, byte data, and color codes.

What letters are used for digits above 9 in hexadecimal?+

A through F represent the values 10 through 15. In bases up to 36, the letters continue to Z for 35.

Can I convert decimal fractions like 10.5?+

No. The converter handles whole numbers only, and anything after the decimal point is ignored.

Why does my input show a smaller number than expected?+

The value is read up to the first character that is not valid in the selected base. For example, typing 129 with Binary selected reads only the 1. Check that the input base matches your number.

Does it support very large numbers?+

Results are exact up to 9,007,199,254,740,991 (2^53 - 1). Beyond that, the last digits can be wrong because of JavaScript number precision.

Related tools