Choose what to convert
A number between bases, or text to bytes.
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.
100% private — the calculation is done in your browser and nothing is sent to any server.
A number between bases, or text to bytes.
Prefixes such as 0x, 0b and 0o are recognized.
Each base has its own copy button.
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.
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.
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.
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.
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.
More utilities that also run without leaving your browser.