1. Home
  2. Developer tools
  3. Hex to Binary

Hex to Binary

Paste a hex value such as 0xDEADBEEF and see its bits. Each hex digit maps to four binary digits, so the page shows the lookup beside the result and lets you group the bits for reading.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Hex to Binary

  1. Paste hex numbers, one per line (0x prefix optional).
  2. Read the binary result and the digit-to-nibble table.
  3. Turn on grouping to read the bits in fours.

Features

  • Expands every hex digit to four bits and shows the mapping
  • Reads upper or lower case and a 0x prefix
  • Fractions after a point convert too
  • Works for values of any length
  • Shows decimal and octal as well
  • Names the first invalid character

Supported formats

Input

  • Hex numbers
  • Typed or pasted numbers

You get

  • Binary
  • Nibble table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Hex to Binary is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Numbers are read in the base named by the tool, so a digit outside that base is reported instead of guessed.
  • Leading zeros are dropped unless you switch on grouping, so a byte may be shown with fewer than eight bits.

Guide

Expanding hexadecimal into bits, one digit at a time

A hexadecimal value tells you what a number is; the bits tell you what it does. Status registers, permission masks, protocol flags and feature switches pack many on-off settings into one hex number, and reading them means expanding the number to its bits. This page does the expansion and lays out the table so you can follow it.

The sixteen patterns

Every hex digit maps to a fixed group of four bits: 0 is 0000, 1 is 0001, up to 9 which is 1001, then A is 1010, B is 1011, C is 1100, D is 1101, E is 1110 and F is 1111. Learning these sixteen is the quickest way to read hex by eye, and the working on this page prints the ones your number uses so you can learn them with real examples. To convert, replace each digit by its group and join the groups.

Why the conversion is exact

Hexadecimal and binary are both powers of two, so no arithmetic is needed: the digits map directly and nothing can be lost. That is different from converting to decimal, where the place values do not line up. For that reason this conversion is also the safest one to do by hand when you are checking another tool.

Options

The page accepts upper and lower case, a 0x prefix, and separators such as spaces or underscores, so you can paste straight from a debugger or a log. Adding “Add 0b prefix” to the output helps if you are pasting into source code, and “Group digits” splits the result into readable blocks. The same number is shown in octal, decimal and base 36 in the box below.

Edge cases

Leading zeros disappear: 0F is 1111, not 00001111. If a format needs a full byte, pad the left side yourself. Hex can also hold fractions, such as 1F4A.8, and the digits after the point are expanded in the same way. A character that is not 0–9 or A–F stops the line and the message points to its position, which catches mistakes such as the letter O in place of zero.

Very large values are fine. A 64-digit hex string, such as a SHA-256 digest, becomes 256 bits without any rounding.

A worked example

The Sample button loads 1F4A.8. The digits expand as 1 → 0001, F → 1111, 4 → 0100, A → 1010, and after the point 8 → 1000. Dropping the leading zeros gives 1111101001010.1. In decimal that value is 8010.5: 4096 + 3840 + 64 + 10 for the integer part and 0.5 for the fraction. In octal it is 17512.4. Seeing the same number in several bases makes it easy to spot a transcription mistake in any of them.

Limits

The page expands whatever you give it and does not know which bits mean what. It will not pad to a width, mark the bit positions or name the flags of a particular device, so keep the data sheet at hand. For a quick view of how individual bits combine into masks, the bitmask calculator is a better fit. If the hex came from a network capture and the bytes look reversed, the endian converter shows both readings.

Checked against the current version of the Hex to Binary on .

Frequently asked questions

How do I find which bits are set in a hex status value?

Expand each digit to four bits and number the positions from the right starting at zero. For 0x2A the bits are 0010 1010, so positions 1, 3 and 5 are set. Then look those positions up in the documentation for the register.

Is the letter case of hex digits significant?

No. A to F and a to f mean the same values, 10 to 15. Only the conventions of a code base or a file format care whether you use upper or lower case.

Why does 0x0F become 1111 and not 00001111?

Leading zeros carry no value, so the result drops them. Add zeros on the left yourself when you need a fixed width such as 8 bits.

Are letters A to F case sensitive?

No. 0xff, 0xFF and 0xFf are the same number.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.