All Tools
Tools/BCD / Hex / Decimal Converter
🔢
UtilitiesAvailable
BCD / Hex / Decimal Converter
Convert between decimal, hexadecimal and packed BCD — EMV format n (right-justified, zero-padded) and cn (F-padded), signed packed COMP-3 and unpacked BCD — exactly, for any length. Common in ISO 8583 field encoding and EMV amount fields.
Follows EMV 4.4 Book 3 §4.3 · IBM packed decimalformats n, cn; COMP-3 sign codes·verified Oct 2026· double-checked Oct 2026— exact for any length; 25,251 cases match bc and an independent nibble implementation
Integer, optional leading ‘-’; leading zeros are kept as BCD digits
Unsigned binary value, optional 0x
Each nibble = one decimal digit; trailing F padding (cn) or a C/D sign nibble (COMP-3) accepted
Binary
Conversion table
| Representation | Value |
|---|---|
| Decimal (base 10) | |
| Hexadecimal (base 16) | |
| Binary (base 2) | |
| Octal (base 8) | |
| Packed BCD (EMV n) |
Something wrong or missing? Report a problem— we check reports against the specs and fix them.