EDI File Reader and Parser

Paste or upload an EDI file — X12 or EDIFACT — and read it as a structured envelope tree: interchange, functional groups, transaction sets and individual segments with their element values. Export to JSON. Everything runs in your browser.

Loading the tool. It runs entirely in your browser...

What EDI is and how to read it

EDI (Electronic Data Interchange) is how businesses in logistics, retail and healthcare exchange documents such as purchase orders, invoices and shipment notices. Instead of readable text it uses short codes, fixed separators and tightly packed fields.

An X12 file has nested layers: the interchange (ISA...IEA), one or more functional groups (GS...GE), and inside each group transaction sets (ST...SE) holding data segments such as N1 (party name), PO1 (line item) or DTM (date).

The ISA header is always 106 characters and defines the separators: element separator at position 4, component separator at 105, segment terminator at 106. The tool reads those positions, so files with non-standard separators still parse.

Common transaction types

  • 850 – Purchase Order: a buyer orders goods.
  • 856 – Ship Notice/Manifest (ASN): a supplier announces a shipment.
  • 810 – Invoice: the seller bills the buyer.
  • 214 – Carrier Shipment Status: picked up, in transit, delivered.
  • 204 and 990 – Load Tender and response: a load is offered to a carrier, who accepts or declines.
  • 997 – Functional Acknowledgment: confirms receipt and syntax validity.

Worked example

A small X12 850 purchase order, one segment per line here (real files often run on a single line):

ISA*00*          *00*          *ZZ*ACMEBUYER      *ZZ*WIDGETCO       *240115*0930*U*00401*000000101*0*P*>~
GS*PO*ACMEBUYER*WIDGETCO*20240115*0930*101*X*004010~
ST*850*0001~
BEG*00*SA*PO12345**20240115~
N1*ST*Acme Warehouse~
PO1*1*24*EA*9.50**VP*WID-100~
CTT*1~
SE*6*0001~
GE*1*101~
IEA*1*000000101~

The reader shows:

Interchange: ACMEBUYER to WIDGETCO, version 00401, control 000000101
Group PO, control 101
  Transaction 850 Purchase Order, control 0001, 6 segments
    PO1 Baseline Item Data
      1=1  2=24  3=EA  4=9.50  5=(empty)  6=VP  7=WID-100

Read PO1 as line 1, quantity 24, unit EA, price 9.50, and vendor part number WID-100 (qualifier VP). The empty element 5 is kept so the positions stay correct.

How to use this tool

  • Paste or drop a file, or click Open file (.edi, .x12, .txt).
  • Press Parse. The Envelope view shows interchange, group, transaction and segments; click any segment to expand its elements.
  • All segments lists every segment in order, handy for checking one field in a long file.
  • JSON export converts the document to JSON you can copy or download.

Elements are numbered from 1 (the first element after the segment ID). Composite elements are split into components.

EDIFACT support

EDIFACT files are detected by an opening UNA or UNB segment. The parser reads the UNA string for separators and splits the rest into segments, which you can browse in the "All segments" tab. Hierarchical EDIFACT parsing (UNG/UNH) is on the roadmap.

Frequently asked questions

Is my EDI data uploaded?

No. The parser runs entirely in your browser using JavaScript. Your EDI file never leaves your device, which matters because EDI documents often contain orders, invoices and shipping details.

Which X12 versions are supported?

Any version (004010, 005010, 006020 and so on), because separators come from the ISA header rather than a version-specific schema. Transaction sets are recognized by their ST segment identifier.

What file extensions can I open?

Any text file that contains EDI content, such as .edi, .x12, .txt or .edi850. The content matters, not the extension.

Can I parse multiple interchanges in one file?

The parser reads the first ISA...IEA interchange. Multi-interchange parsing is on the roadmap.

Why do some segments show only an ID?

The name lookup covers the most common segments. Rarer or implementation-specific segments show their ID only, but the element values are still fully visible.

I got a separator error. What happened?

The ISA segment must be exactly 106 characters including the terminator. A shorter one usually means the file is truncated or Windows line endings (CRLF) shifted the terminator. Save the file with Unix line endings (LF) and try again.