EDI Sample Files
Free, valid sample EDI files for X12, EDIFACT and TRADACOMS. Each one is annotated segment by segment and opens in the EDI Inspector.
Every file is synthetic: made-up companies, IDs and amounts, safe to load into a test system.
Plain text, one interchange per file.
22 sample files
- 850X12
Purchase Order
Retail store order, 3 lines with UPCs and prices
23 segmentsOpen in Inspector - 850X12
Drop Ship Purchase Order
Ships to the consumer, with the web order number
18 segmentsOpen in Inspector - 850X12Has errors
Purchase Order With Errors
Broken on purpose: 3 faults a translator rejects
14 segmentsOpen in Inspector - 855X12
Purchase Order Acknowledgment
One line accepted, one backordered, one quantity changed
15 segmentsOpen in Inspector - 856X12
Ship Notice (ASN)
3 cartons with SSCC labels, one line short
37 segmentsOpen in Inspector - 810X12
Invoice
Invoices the shipped quantities, freight and terms
27 segmentsOpen in Inspector - 860X12
Purchase Order Change
Quantity cut, price change and an added line
15 segmentsOpen in Inspector - 997X12
Functional Acknowledgment
Accepts one 850 in one group
10 segmentsOpen in Inspector - 999X12
Implementation Acknowledgment
Rejects an 856: SCAC too long, bad unit code
14 segmentsOpen in Inspector - 824X12
Application Advice
Rejects an invoice: total mismatch, unknown UPC
11 segmentsOpen in Inspector - 820X12
Payment Order / Remittance Advice
ACH payment for 2 invoices with deductions
22 segmentsOpen in Inspector - 940X12
Warehouse Shipping Order
A brand tells its 3PL to pick and ship 2 lines
21 segmentsOpen in Inspector - 945X12
Warehouse Shipping Advice
The 3PL confirms shipment, one line short
24 segmentsOpen in Inspector - ORDERSEDIFACT
Purchase Order
EANCOM D96A order, 3 lines with GTINs
29 segmentsOpen in Inspector - ORDRSPEDIFACT
Order Response
Answers the ORDERS sample, one line changed
20 segmentsOpen in Inspector - DESADVEDIFACT
Despatch Advice
Two pallets with SSCCs, 3 lines
30 segmentsOpen in Inspector - INVOICEDIFACT
Invoice
Zero-rated UK food invoice with VAT numbers
40 segmentsOpen in Inspector - REMADVEDIFACT
Remittance Advice
Pays 2 invoices, one short with a reason
24 segmentsOpen in Inspector - CONTRLEDIFACT
Syntax and Service Report
Rejects an INVOIC and points at the bad segment
9 segmentsOpen in Inspector - ORDERSEDIFACTHas errors
Purchase Order With Errors
Broken on purpose: counts, references, a GTIN
29 segmentsOpen in Inspector - ORDHDRTRADACOMS
Order File
UK grocery order file: header, order, trailer
19 segmentsOpen in Inspector - INVFILTRADACOMS
Invoice File
Invoice file with VAT and file trailers
24 segmentsOpen in Inspector
What Is in an EDI File?
An EDI file is plain text: segments, each starting with a tag such as BEG or NAD, split into elements by a delimiter. X12 wraps them in three envelopes (ISA for the interchange, GS for the group, ST for each document) and closes each with a trailer that counts what is inside. EDIFACT uses UNB, UNH and UNT for the same job. When a partner rejects a file, a wrong count in one of those trailers is the most common cause.
Each sample page shows the raw file, then every segment with its element names and what each code means, then the same document as a readable order, ship notice or invoice. To check a file of your own, paste it into the EDI Inspector; to turn one into a PDF, use EDI to PDF; and for the meaning of every document type, see the EDI transaction guides.
X12 Sample Files
| Code | Document | Sent by |
|---|---|---|
| 850 | Purchase Order | Buyer to supplier |
| 850 | Drop Ship Purchase Order | Retailer to drop ship supplier |
| 850 | Purchase Order With Errors | Buyer to supplier |
| 855 | Purchase Order Acknowledgment | Supplier to buyer |
| 856 | Ship Notice (ASN) | Supplier to buyer |
| 810 | Invoice | Supplier to buyer |
| 860 | Purchase Order Change | Buyer to supplier |
| 997 | Functional Acknowledgment | Receiver to sender |
| 999 | Implementation Acknowledgment | Receiver to sender |
| 824 | Application Advice | Receiver to sender |
| 820 | Payment Order / Remittance Advice | Buyer to supplier |
| 940 | Warehouse Shipping Order | Brand (depositor) to 3PL |
| 945 | Warehouse Shipping Advice | 3PL to brand (depositor) |
EDIFACT and TRADACOMS Sample Files
| Code | Document | Sent by |
|---|---|---|
| ORDERS | Purchase Order | Buyer to supplier |
| ORDRSP | Order Response | Supplier to buyer |
| DESADV | Despatch Advice | Supplier to buyer |
| INVOIC | Invoice | Supplier to buyer |
| REMADV | Remittance Advice | Buyer to supplier |
| CONTRL | Syntax and Service Report | Receiver to sender |
| ORDERS | Purchase Order With Errors | Buyer to supplier |
| ORDHDR | Order File | Retailer to supplier |
| INVFIL | Invoice File | Supplier to retailer |
One Order, Start to Finish
The X12 files follow one retail order through its life. The 850 orders three items, the 855 answers it line by line, the 856 ships it in three labelled cartons with one line short, and the 810 invoices what shipped. Load all four into Compare EDI to see the 3-way match. The 940 and 945 do the same for a brand and its 3PL.
Frequently Asked Questions
Where can I download a sample EDI file?
Right here. Every file on this page is free to download on its own or all together as one zip, with no signup. There are X12 files (850, 855, 856, 810, 860, 997, 999, 824, 820, 940 and 945), EDIFACT EANCOM files (ORDERS, ORDRSP, DESADV, INVOIC, REMADV and CONTRL) and TRADACOMS order and invoice files.
Are these sample EDI files valid?
Yes, except the two marked Has errors, which are broken on purpose. A test checks every other file on each release: envelope counts (SE01, GE01, IEA01, UNT, MTR), control numbers that pair up, GS1 check digits on every UPC, GTIN, GLN and SSCC, and a clean parse in the EDI Inspector.
Can I use these files to test my EDI translator or ERP import?
Yes. That is what they are for. The companies, IDs and amounts are made up, so the files are safe to load into a test system or share with a developer. Change the ISA sender and receiver IDs to your test IDs first if your translator routes by them.
Which version of X12 are the samples?
004010, the version most retailers still trade, except the 999, which only exists in 005010. The EDIFACT files are EANCOM on directory D.96A, the version UK and European grocers use most.
What do the characters ~ * and : mean in an EDI file?
They are delimiters. In these X12 files ~ ends a segment, * separates elements and : or > separates components inside an element. The ISA segment declares them, so another file can use different ones. EDIFACT declares its own in the UNA segment: ' ends a segment, + separates elements and : separates components.
Why include files with errors?
Because a validator is only worth something on the files that fail. The broken 850 and ORDERS carry the faults behind most real rejections: a wrong segment count, a wrong line count, reference numbers that do not pair up and a bad check digit. Open them in the EDI Inspector to see each one named.
Related Free Tools
EDI Viewer and Validator
Open an X12 or EDIFACT file, see every segment and element named, find errors by segment, check retailer rules and generate a 997.
EDI to PDF Converter
Turn an X12, EDIFACT or TRADACOMS order, ship notice or invoice into a readable PDF, with lines in Excel or CSV.
EDI Response Builder (855, 856, 810)
Paste an EDI 850 and get draft 855, 856 and 810 replies, with SSCC carton numbers, validated and ready to send.
Compare EDI Documents (3-Way Match)
Check a PO against its change, acknowledgment, ship notice and invoice line by line: quantities, prices and missing lines.
EDI Rejection Explainer
Paste a 997, 999, TA1, 824 or CONTRL. Every rejection code in plain English, located in your original file, with the fix.