EDIFACT is the international standard for exchanging business documents electronically between organisations. If you have been handed an EDIFACT file and have no idea what you are looking at, this page is for you.
EDIFACT stands for Electronic Data Interchange For Administration, Commerce and Transport. It is a standard developed by the United Nations in the 1980s that defines a common format for business documents like purchase orders, invoices, and shipment notices. The idea was that if every company used the same format, they could exchange documents automatically without any human involvement.
The standard worked, to a degree. It became the dominant format for large retailers, logistics companies, and manufacturers in Europe, Australia, and much of Asia. Today, billions of dollars of transactions flow through EDIFACT every day. If you supply goods to a major retailer, a fuel company, or a distributor, there is a good chance they require EDIFACT.
The problem is that EDIFACT was designed in a different era. It is dense, cryptic, and completely unlike any modern data format. Developers who encounter it for the first time almost universally find it confusing.
Here is a simple EDIFACT ORDERS message, the kind a retailer might send to a supplier when they want to place a purchase order:
If you have never seen EDIFACT before, that probably looks like noise. Each line is a segment. Each segment starts with a three-letter tag that identifies what kind of data it contains. Values within a segment are separated by plus signs. The apostrophe at the end of each line marks the end of a segment.
Here is what each segment in that message actually means:
A JSON or XML file tells you what each field means. EDIFACT uses two and three letter codes that mean nothing without the specification document.
EDIFACT is a standard with a huge amount of flexibility. Each trading partner uses segments, qualifiers, and field positions differently. What works for one partner breaks for the next.
EDIFACT has been updated regularly since the 1980s. D96A, D01B, D04A are all different versions. Partners may use different versions and even mix elements between them.
Almost every value in EDIFACT is accompanied by a qualifier code that gives it context. The DTM segment alone has over 100 different qualifier codes for different types of dates.
The complete UN/EDIFACT specification runs to thousands of pages. Most developers never read it and instead reverse-engineer messages from examples.
Once you start parsing EDIFACT, segment names and qualifier codes tend to spread into your database schemas, API responses, and internal models.
Several industry-specific subsets of EDIFACT exist with their own rules and conventions:
If you have worked with US trading partners, you may have encountered X12, also called ANSI X12. X12 is the North American equivalent of EDIFACT. Both serve the same purpose but use different syntax and segment names.
EDIFACT is the dominant standard in Europe, Australia, New Zealand, and most of Asia. X12 dominates in the United States and Canada. If you are dealing with APAC trading partners, you are almost certainly dealing with EDIFACT.
Paste any raw EDIFACT message into our free decoder and get back a plain English breakdown of every segment and field.