ISO 8583 Parser
Free · ISO8583 · 约 8 分钟ISO8583 · ~8 min read

看懂 ISO 8583 报文:MTI、位图、数据域Reading ISO 8583: MTI, Bitmaps & Data Elements

ISO 8583 是银行卡交易的国际报文标准。一条报文 = MTI(消息类型)+ 位图(哪些字段出现)+ 数据域(字段内容)。读懂这三块,你就能读懂几乎所有卡交易报文。边读边用本站解析工具验证效果最好。 ISO 8583 is the international standard for card transaction messages. One message = MTI (message type) + bitmap (which fields are present) + data elements (the field values). Master these three and you can read almost any card message. Best learned alongside the parser tool on this site.

1. MTI — 消息类型指示符Message Type Indicator

4 位数字,逐位表达报文性质。例如 0200:Four digits, each position describing the message. For example 0200:

所以 0200 = 收单方发起的一笔金融请求;它的响应就是 0210。授权类常见 0100/0110,冲正 0400/0420So 0200 = a financial request from the acquirer; its response is 0210. Authorizations are commonly 0100/0110, reversals 0400/0420.

2. 位图 BitmapThe Bitmap

紧跟 MTI,是一串二进制位,第 N 位 = 1 表示数据域 N 出现。主位图 64 位(域 1–64)。如果第 1 位为 1,说明还有一张副位图(域 65–128)。这样报文只携带真正用到的字段,非常紧凑。Right after the MTI, a string of bits where bit N = 1 means data element N is present. The primary bitmap is 64 bits (DEs 1–64). If bit 1 is set, a secondary bitmap follows (DEs 65–128). This keeps messages compact — only the fields actually used are carried.

技巧:位图常以 8 字节二进制或 16 位十六进制出现。把十六进制展开成二进制、标出哪些位是 1,就得到「出现的数据域清单」。本站工具会自动画出这张位图。Tip: the bitmap appears as 8 binary bytes or 16 hex chars. Expand the hex to binary, mark the 1-bits, and you get the list of present data elements. The tool on this site draws this bitmap for you.

3. 数据域 Data Elements (DE)Data Elements (DE)

标准定义了 128 个数据域,按位图指示依次排列。最常见的几个:The standard defines 128 data elements, laid out in order as the bitmap indicates. The most common ones:

DE含义Meaning
DE2主账号 PAN(卡号)Primary Account Number (card number)
DE3处理码(交易类型 + 借贷账户)Processing code (txn type + accounts)
DE4交易金额(最小货币单位)Transaction amount (minor units)
DE11STAN 系统跟踪号(当日唯一)STAN (unique within a day)
DE39响应码(00=批准)Response code (00=approved)
DE41 / 42终端号 / 商户号Terminal ID / Merchant ID
DE49交易货币代码(ISO 4217)Currency code (ISO 4217)
DE55EMV 芯片数据(TLV)EMV chip data (TLV)

每个域有固定的格式(n 数字 / an 字母数字 / b 二进制)和长度类型:定长(FIX)、或带 2/3 位长度前缀的变长(LLVAR/LLLVAR)。此外还有编码差异——ASCII、压缩 BCD、EBCDIC——不同卡组织(尤其 VISA)口径不同,这是新手最容易踩的坑。Each element has a fixed format (n numeric / an alphanumeric / b binary) and a length type: fixed (FIX) or variable with a 2/3-digit length prefix (LLVAR/LLLVAR). There's also encoding — ASCII, packed BCD, EBCDIC — which differs by scheme (VISA especially). That's the classic beginner trap.

动手试:打开解析工具,选卡组织(如 Visa),粘贴一条报文,点解析——它会自动拆出 MTI、画位图、逐个列出数据域并给出通俗解释和 EMV/DE55 的 TLV 分解。Try it: open the parser tool, pick a scheme (e.g. Visa), paste a message and hit parse — it splits the MTI, draws the bitmap, lists every data element with plain-language notes, and breaks down EMV/DE55 TLV.

👉 进阶:EMV 芯片交易与 DE55 深入(订阅)——DE55 里每个 EMV 标签、ARQC 密文、TVR/CVM 决策逻辑。👉 Advanced: EMV Chip & DE55 Deep Dive (subscriber) — every EMV tag in DE55, the ARQC cryptogram, and TVR/CVM decision logic.