All Tools
Tools/ISO 8583 Bitmap Decoder
🗺️
MessagingAvailable
ISO 8583 Bitmap Decoder
Decode primary, secondary and tertiary ISO 8583 bitmaps (up to 192 bits / 24 bytes) into the list of present and absent data elements.
Follows ISO 85831987·verified Oct 2026· double-checked Oct 2026— 1987 data element names, shared with the parser; bit 65 read as a tertiary-bitmap flag (implementation convention)
Try it as a puzzle: route a chip payment to the card’s bank →
Names follow ISO 8583:1987. Bit 1 set means a secondary bitmap (DE 65–128) follows. In 1987, DE 65 is "Bit map, extended" (b 1); reading a set bit 65 as a tertiary bitmap (DE 129–192) is a convention some implementations use, so a third bitmap is only expected from systems that use it.
</> Code Implementation
# ISO 8583 Bitmap Decoder — extract present field numbers
# No external dependencies required
def decode_bitmap(hex_bitmap: str) -> list:
data = bytes.fromhex(hex_bitmap.replace(" ", ""))
fields = []
for byte_idx, byte in enumerate(data):
for bit_idx in range(8):
if byte & (0x80 >> bit_idx):
fields.append(byte_idx * 8 + bit_idx + 1)
return fields
# Example — primary + secondary bitmap
bitmap = "F230000002C000001000000000000000"
fields = decode_bitmap(bitmap)
print(f"Present fields: {fields}")
# Present fields: [1, 2, 3, 4, 7, 11, 12, 39, 41, 42, 68]
Something wrong or missing? Report a problem— we check reports against the specs and fix them.