BCD decoder
Convert binary-coded decimal nibbles to a decimal number, or the other way round.
BCD decoder
Binary-coded decimal (BCD) represents a decimal number by encoding each digit separately as its own 4-bit binary group, instead of converting the whole number to binary at once. This tool reads a sequence of BCD nibbles — written space-separated like "0101 0111" or as one continuous run of bits like "01010111" — and returns the decimal number they represent. It also runs in reverse: type a decimal number and it expands each digit into its 4-bit BCD nibble.
Direction is detected automatically: a string made only of 0s and 1s is read as BCD to decode, anything else is treated as a decimal number to encode. Use the direction option to force one mode when the input is ambiguous, such as a short run like "10" that is valid either way. The nibble separator controls how groups are split apart on decode and joined back together on encode — space by default, but any character or an empty string works, so you can match the format a datasheet or a legacy system expects.
Every 4-bit group is checked as it is read. A group that isn't exactly 4 bits long, or one that falls in the 1010–1111 range that BCD never uses, is reported as an error naming the offending group rather than silently turned into a wrong digit — the same care matters for hardware protocols, serial dumps and old database formats where a misread nibble means a corrupted value. Leading zero digits are kept, since a zero nibble is a real digit position in BCD, not padding to strip.
Everything runs locally in your browser. The BCD strings and decimal numbers you paste in are never uploaded anywhere, so it's safe to use with data pulled from real embedded devices, RTC chips, calculators or other systems that still store values in BCD.