EDIFACT Viewer, Parser, and Validator
Paste an interchange or drop in a file and the viewer opens on the Summary tab, which reads the message the way an order desk would: who is buying, what, how many, delivered where and when, then the UNB envelope. The Segments tab lists the file one segment per line for debugging: click any segment to see its elements by position (NAD02.1, QTY01.2) and what each value means. The JSON tab gives you the parsed message to drop into a script or a ticket.
What the Validator Checks
| Check | What it catches |
|---|---|
| Envelope | Missing UNB or UNZ, a UNZ count that does not match the number of messages or groups, and a UNZ control reference that does not echo UNB05 |
| Messages | Unclosed UNH, a UNT segment count that is off by one (the most common hand-edit mistake), and UNT references that do not match UNH01 |
| Content | Missing BGM or DTM+137 document date, CNT+2 line counts that disagree with the LIN segments, and invalid CCYYMMDD dates |
| GS1 identifiers | GTINs on LIN, GLNs on NAD, and SSCCs on GIN+BJ that fail the GS1 check digit |
| Syntax | Clashing UNA separators, an unknown UNB character set, lower case data under UNOA, and release character (?) escapes |
What it does not check is your trading partner's implementation guide. A message can be structurally valid EDIFACT and still be rejected because a retailer requires a segment the directory treats as optional. Use the retailer compliance pages for what each customer expects, or pick a UK retailer under Validate for once a file is loaded.
EDIFACT Format at a Glance
An EDIFACT interchange opens with an optional UNA that declares the separators, then UNB with the sender, recipient, date, and control reference. Each business document is a message between UNH and UNT. Segments end with an apostrophe, data elements are separated by +, and components by :. A ? in front of any of those makes it literal data, so O?'Brien reads as O'Brien.
| EDIFACT | X12 equivalent | Purpose |
|---|---|---|
| UNB / UNZ | ISA / IEA | Interchange envelope |
| UNG / UNE | GS / GE | Functional group (optional in EDIFACT) |
| UNH / UNT | ST / SE | One business document |
| ORDERS | 850 | Purchase order |
| ORDRSP | 855 | Purchase order response |
| DESADV | 856 | Despatch advice (ASN) |
| INVOIC | 810 | Invoice |
| CONTRL | 997 | Syntax acknowledgement |
EANCOM and TRADACOMS
Most UK and European retail EDIFACT is EANCOM, the GS1 subset. You can spot it from the association code at the end of UNH02, such as EAN008, and from 13-digit GLNs with agency code 9 on every NAD.
TRADACOMS is older and UK only. It looks similar but writes the segment tag with an equals sign (MHD=1+ORDERS:9'), wraps the transmission in STX and END, and splits an order file into header, order, and trailer messages. The viewer reads both. For the background, see the EDIFACT guide and the TRADACOMS guide. Working with US customers too? This page reads X12 as well, and the X12 EDI viewer adds a 997 generator and US retailer checks.