Binary, decimal and hexadecimal converter

Type a number in any base and see it in binary, decimal, hexadecimal and octal at once. Very large numbers are exact. A second mode turns text into its bytes and back.

  • Free
  • No sign-up
  • Runs in your browser
binary-decimal-hex-converter

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

How it works

Choose what to convert

A number between bases, or text to bytes.

Type the value

Prefixes such as 0x, 0b and 0o are recognized.

Copy the result

Each base has its own copy button.

Every base at once

Computers work in binary, programmers read hexadecimal and people count in decimal. Moving between them is a constant chore in programming, networking, electronics and computer science classes: reading a color code, a memory address, a permission mask or a bit flag. This converter shows the same number in binary, decimal, hexadecimal and octal as you type, and can add any other base from 2 to 36.

Exact for numbers of any size

Most calculators use ordinary floating-point numbers, which lose precision above about 9 quadrillion. This tool uses arbitrary-precision integers, so a 128-bit value or the hash of a file converts without losing a single digit. Negative numbers are supported too, with a minus sign.

Prefixes and separators

You can start a value with 0x for hexadecimal, 0b for binary or 0o for octal, and the base is set for you. Spaces, commas and underscores are ignored, so a value copied as 1111 0000 works as it is. The binary result is grouped in fours to make it readable, and the number of bits is shown.

From text to bytes and back

The second mode converts text into the bytes that represent it in UTF-8, shown in binary, hexadecimal, decimal and octal. It works with accents and symbols too, which take more than one byte. You can also paste a sequence of bytes and turn it back into text. This is the classic way to check how a message is encoded or to solve those binary-code puzzles.

What it does not do

It converts integers. It does not convert fractions such as 0.1 in binary, and it does not interpret a number as a signed value in two's complement of a fixed width. Everything is calculated in your browser. To turn text into Base64 instead, see the Base64 encoder and decoder.

Frequently asked questions

How do I convert binary to decimal?
Choose Binary as the base of the value, type it and read the decimal result. For example, 11111111 is 255.
How do I convert decimal to hexadecimal?
Type the decimal number with Decimal selected. The hexadecimal value appears next to it. 255 is FF.
Can it convert very large numbers?
Yes. It uses arbitrary-precision integers, so large values such as 128-bit numbers are exact.
How do I convert text to binary?
Switch to Text to bytes and type the text. You get the UTF-8 bytes in binary, hexadecimal, decimal and octal.
What do 0x and 0b mean?
They are prefixes that mark a value as hexadecimal (0x) or binary (0b). The tool recognizes them automatically.
Is my data sent anywhere?
No. All conversions are done in your browser.