The short answer
ANSI X12 and UN/EDIFACT are the two most widely used EDI standards. X12 dominates in North America and identifies documents by number, such as 850 for a purchase order. EDIFACT is the international United Nations standard used widely in Europe and Asia and names documents with six-letter codes, such as ORDERS. Both carry the same kinds of business documents with different syntax.
X12 and EDIFACT at a glance
| Criteria | ANSI X12 | UN/EDIFACT |
|---|---|---|
| Governing body | Accredited Standards Committee X12 | United Nations (UN/CEFACT) |
| Primary regions | United States and Canada | Europe, Asia and international trade |
| Document naming | Three-digit transaction set numbers, such as 850 | Six-letter message names, such as ORDERS |
| Envelope | ISA/IEA, GS/GE, ST/SE | UNB/UNZ, optional UNG/UNE, UNH/UNT |
| Typical delimiters | Element *, segment ~ (set in ISA) | Element +, component :, segment ' (set in UNA) |
| Acknowledgment | 997 or 999 | CONTRL |
Read across each row to see how the two standards express the same idea. In the sample segments, X12 separates elements with * and ends segments with ~, while EDIFACT uses + and ends segments with an apostrophe.
Two standards, one purpose
Both X12 and EDIFACT define how business documents are structured so that trading partners’ systems can exchange them without custom formats for every relationship. They cover the same core processes, such as ordering, shipping, invoicing and payment, and both are maintained and versioned over time.
The differences are mostly about where they are used and syntax, not what they can express.
Where each standard is used
- X12 is the default for companies trading in the United States and Canada, especially in retail, manufacturing, transportation, finance and healthcare. U.S. healthcare administrative transactions mandated under HIPAA also use X12.
- EDIFACT is standard across Europe and in much of Asia, the Middle East and international trade, including automotive, logistics, customs and retail.
A company with both North American and European customers will often support both.
Structural differences
Both standards organize documents into segments (lines of related data) made up of elements (individual fields), separated by delimiters. In X12, delimiters are defined in the ISA envelope; a typical segment looks like BEG*00*SA*PO123456**20261015~. In EDIFACT, an optional UNA segment defines delimiters, and a segment looks like BGM+220+PO123456+9'.
Envelopes differ too. X12 uses ISA/IEA around the interchange, GS/GE around functional groups and ST/SE around each transaction set. EDIFACT uses UNB/UNZ for the interchange, optional UNG/UNE groups, and UNH/UNT around each message.
Equivalent documents
| Business document | X12 | EDIFACT |
|---|---|---|
| Purchase order | 850 | ORDERS |
| Order response | 855 | ORDRSP |
| Order change | 860 | ORDCHG |
| Despatch advice / ship notice | 856 | DESADV |
| Invoice | 810 | INVOIC |
| Remittance advice | 820 | REMADV |
| Delivery forecast | 830 | DELFOR |
| Delivery just-in-time | 862 | DELJIT |
| Inventory report | 846 | INVRPT |
| Syntax acknowledgment | 997 | CONTRL |
See the EDIFACT reference for a longer list.
Supporting both standards
A modern integration platform keeps one internal representation of each business document and maintains separate maps for X12 and EDIFACT partners. That way, adding an international customer means building a map, not a new process. Version differences, such as X12 4010 versus 5010 or EDIFACT D96A versus D01B, are handled the same way.