Hex to BCD Converter
Find the BCD (binary-coded decimal) form of a hex value — each decimal digit packed into its own nibble, the format RTC chips and BCD displays use.

Built by
Swapnil SanghviFull-Stack Web Developer & WordPress Developer
Swapnil Sanghvi is a full-stack web and WordPress developer, UI designer, and full-time freelancer who builds and maintains Hex Calculator.
Further reading: Character encoding — Wikipedia
How to Convert Hex to BCD
Each nibble (4 bits) of a packed-BCD value already holds one decimal digit directly — there's no base-16 positional math involved. Reading 0x59 as packed BCD means reading the nibbles 5 and 9 as the digits of decimal 59, not computing 5×16+9=89 the way a normal hex-to-decimal conversion would.
Hex to BCD Example, Step by Step
0x59 (packed BCD) = 59 (decimal)
0x59 (BCD) = 59 in decimal
Nibbles: 5 9 Digits: 5 9 Read directly as decimal digits: 59
| Step | Description | Result |
|---|---|---|
| Read each nibble | 5, 9 — both valid BCD digits (0-9) | 2 digits |
| Reinterpret as decimal digits | 5 then 9, in order | 59 |
This is not the same as normal hex-to-decimal math — 0x59 as an ordinary hex number equals 89 decimal (5×16+9). Packed BCD instead reinterprets each nibble as its own decimal digit, which is why the two operations give different answers for the same digits.
Where Hex to BCD Actually Comes Up
Reading an RTC Register
Real-time clock chips store seconds/minutes/hours as packed BCD — reading 0x59 straight out of the seconds register and interpreting it as packed BCD gives 59 seconds, without any hex-to-decimal math.
0x59 (BCD) -> 59 decimal
Driving a Seven-Segment Display
Display controllers that accept BCD input need each digit packed into its own nibble — converting a decimal counter value to packed BCD is what makes it displayable without extra decoding logic.
0x23 (BCD) -> 23 decimal
Debugging a BCD Arithmetic Routine
When testing embedded code that does BCD math, converting a known packed-BCD value to decimal gives you a reference to check the routine's output against.
0x42 (BCD) -> 42 decimal
Common Mistakes When Converting Hex to BCD
- Trying to use A-F in a packed-BCD nibble — only 0-9 are valid; A-F means the value isn't actually BCD-encoded.
- Confusing packed BCD with a normal hex-to-decimal conversion — they use the same digit characters but mean different things: 0x59 is decimal 89 as an ordinary hex number, but decimal 59 as packed BCD.
- Assuming BCD is more compact than hex — it's actually less efficient per bit.
Why Use This Calculator Instead of Doing It by Hand
- Handles the decimal conversion and digit-packing for you
- Runs entirely in your browser — nothing you type gets sent anywhere
- Works on multi-byte hex values, not just single bytes
- Shows decimal and binary for the same value alongside the BCD result
Limitations
- Only accepts nibbles 0-9 — a hex value containing A-F isn't valid packed BCD and returns an error rather than a guessed result.
Frequently Asked Questions
What is BCD, exactly?
Binary-coded decimal packs one decimal digit (0-9) into each 4-bit nibble, instead of letting a nibble represent a full hex digit (0-F). It trades some efficiency for numbers that stay easy to read and display digit by digit.
How do you convert hex to BCD?
Each nibble of the hex value already represents one decimal digit directly — 0x59 in packed BCD reads as the digits 5 and 9, giving decimal 59. There's no base-16 positional math involved, unlike a normal hex-to-decimal conversion.
Why does the BCD value look like a decimal number written in hex digits?
Because that's exactly what it is — BCD nibbles only ever hold 0-9, so a BCD value never contains A-F, and visually looks identical to writing the decimal number using hex notation.
Where is BCD actually used?
Real-time clock (RTC) chips, digital displays, and some embedded systems store values in BCD because it converts directly to a readable digit display without extra math.
What's the downside of BCD compared to plain hex?
It wastes some bits — a nibble can represent 16 values (0-F) but BCD only uses 10 of them (0-9), so BCD-encoded numbers take more storage than the equivalent plain hex value.
Is BCD the same as packing two digits per byte?
That's exactly what "packed BCD" means in hardware — two BCD nibbles (two decimal digits) fit in one byte, which is how most real BCD hardware stores values.
Why would I convert a hex value to BCD instead of just displaying it in decimal?
When the destination is BCD-native hardware — a seven-segment display driver or an RTC register you're about to write — you need the value already packed as BCD nibbles, not just decimal-formatted text.
Does this handle hex values larger than a single byte?
Yes — the converter isn't limited to 8-bit input, so multi-byte hex values convert to their full BCD digit sequence, not just the low byte.