Skip to content

EDI (ANSI X12 & EDIFACT) viewer and CSV converter

Turn dense X12 and EDIFACT supply-chain interchanges into readable purchase order, invoice, and shipment tables without sending partner data to a VAN portal.

Partner purchase orders and invoices stay in local worker memory.

Or drop an .edi, .x12, .edifact, or .txt file

Auto-detects X12 ISA offsets and EDIFACT UNA service string delimiters.

How to use EDI X12 & EDIFACT viewer

  1. Read vendor EDI files or paste raw segments. Drop an .edi, .x12, .edifact, .txt, or .dat file onto the upload panel, paste text into the editor, or click Load X12 850 sample or Load EDIFACT INVOIC sample.
  2. Decode segments inside the browser worker. Click Parse EDI interchange to detect element, component, and segment terminators without uploading proprietary orders, prices, or trading partner IDs.
  3. Inspect header cards, parties, and line items. Review the four summary cards, check any Structural diagnostics count warnings, and filter raw rows inside the Annotated segments table by tag code.
  4. Download spreadsheet or structured exports. Choose Export CSV, Export Excel (.xlsx), or Export JSON to save line items and decoded segment tables directly to your workstation.

Everything you type stays in this browser on your device. Nothing is uploaded, and your saved details are never sent anywhere.

How does EDI parsing detect ANSI X12 and UN/EDIFACT delimiters?

The browser-based parser strips any leading UTF-8 BOM, then checks opening interchange markers (ISA, UNA, or UNB) inside a local Comlink Web Worker. Trading partners read vendor EDI files without uploading orders or pricing to remote servers, decoding ansi x12 and edifact structures strictly in memory.

Under the X12 EDI standards and control segments directory, every ANSI X12 interchange starts with a fixed 106-byte ISA header. The parser reads the element separator at byte index 3, the component separator at index 104, and the segment terminator at index 105, falling back to line-delimited splitting when newline characters occupy position 105.

For UN/EDIFACT payloads, opening bytes inspect the optional 9-character UNA service string advice (UNA:+.? '). Positions 3, 4, 5, 6, and 8 define component, element, decimal, release escape, and segment characters respectively, honoring ? escapes inside data strings. Using an offline EDI viewer avoids custom ERP mapping setups when teams just need to audit partner messages or create PDF purchase orders manually for smaller accounts.

Inspect ANSI X12 850, 810, 856 and EDIFACT message segments

After delimiter detection, the EDI segment parser groups interchange, functional group, header, trading partner, and line-item segments across common X12 850, 810, 856, and 997 messages as well as UN/EDIFACT ORDERS, INVOIC, DESADV, and CONTRL payloads built under UNECE UN/EDIFACT ISO 9735 directories. Unrecognized transaction codes still populate the annotated segment list with raw element tags.

Transaction pairing Header tag Party and line tags Extracted fields
X12 850 / EDIFACT ORDERS BEG / BGM N1, NAD, PO1, LIN PO number, order date, SKUs, quantities
X12 856 / EDIFACT DESADV BSN / BGM N1, NAD, PID, QTY Shipment ID, carrier locations, carton GTINs
X12 810 / EDIFACT INVOIC BIG / BGM CUR, TDS, MOA, IT1 Invoice total (2 decimal places), tax currency
X12 997 / EDIFACT CONTRL AK1 / UCI AK2, AK5, IK3, UCM Functional acknowledgement accept or reject
X12 820, 940, 945 / REMADV BPR / W05 N1, LX, W01, MOA Remittance totals and warehouse ship advice

Parsing PO, ASN, and invoice tags in the EDI segment parser

Header extraction maps document numbers and dates from BEG03, BIG02, BSN02, BGM02, and DTM+137 while reading currency codes from CUR or CUX. Because ANSI X12 omits decimal points in TDS summary totals, integer cents divide by 100 to display clean currency totals, whereas EDIFACT MOA lines check qualifiers 79, 86, 9, and 203.

Trading party cards translate 10 partner role qualifiers (BY, SE, ST, SF, BT, RE, SU, VN, IV, DP) alongside address fields from N3/N4 or NAD.

Line extraction pairs PO1/IT1 and LIN/PIA/IMD/QTY/PRI qualifiers (VP, SK, IN, BP for SKU; UP, EN, UI for GTIN) so ops teams can reconcile ASN cartons with a carton barcode and SSCC-18 label scanner on loading docks.

How EDI diagnostics verify SE01 and UNT segment counts

Operations teams inspecting ANSI X12 and EDIFACT segments rely on trailer parity to catch truncated EDI transmissions before ERP import. The parser counts segments from ST through SE in X12 and UNH through UNT in EDIFACT, comparing actual totals against SE01 and UNT01 declared values.

Any mismatch or missing envelope trailer (SE, GE, IEA, UNT, UNZ) triggers a warning inside Structural diagnostics without hiding decoded segments. Below the diagnostic panel, typing inside Filter by tag (PO1, LIN, NAD, N1…) isolates matching tags across large payloads in real time.

Export EDI to Excel, clean CSV spreadsheets, or JSON locally

Once parsed, teams use this EDI to CSV converter to extract clean flat tables for finance, warehouse auditing, and onboarding reviews without writing custom Python scripts. Three download actions save output straight from browser memory: Export CSV, Export Excel (.xlsx), and Export JSON.

  • RFC 4180 CSV tables: Clicking Export CSV saves edi-lines.csv whenever line items exist or falls back to edi-segments.csv, prepending a UTF-8 byte order mark (\uFEFF) with Windows CRLF line breaks conforming to the IETF RFC 4180 CSV specification and formula-injection sanitization across every cell.
  • Multi-sheet Excel workbooks: Clicking Export Excel (.xlsx) builds edi-export.xlsx with a dedicated Line Items worksheet followed by a complete Segments worksheet (index, tag, label, raw_segment) when structured lines are present.
  • Full structured JSON: Clicking Export JSON exports edi-parsed.json containing detected delimiters (segment, element, component), summary header fields, resolved party objects, line items, warnings, and annotated segment arrays.
  • Warehouse label alignment: Operations coordinators who pull GTINs, SKUs, and quantities from spreadsheets can immediately generate compliant GS1-128 and DataMatrix shipping labels before dispatching pallets.

Implementation note: Always cross-check parsed EDI line counts, unit prices, and qualifier meanings against your trading partner’s specific Implementation Guide (IG) before booking accounting entries or customs filings.

When do partner AS2 payloads require extra validation checks?

Standard EDI envelopes validate only flat-file syntax and segment counts, whereas live trading networks wrap payloads inside signed MIME containers and encrypted sessions. Reviewing transport headers, decimal scaling, and implementation guides catches trading partner discrepancies before automated ERP queues reject batches.

Validating trading partner AS2 transport certificates

In production B2B exchanges following the IETF RFC 4130 AS2 EDIINT protocol, interchanges travel inside HTTP POST payloads secured by S/MIME digital signatures and X.509 encryption certificates before returning signed MDN receipts. When an AS2 gateway decrypts an unreadable batch or rejects a signature thumbprint, performing AS2 partner X.509 certificate checks before deployment confirms expiry dates, key usages, and SHA fingerprints offline.

Checking sample interchanges and unknown transaction sets

Before loading sensitive production batches, click Load X12 850 sample (17 segments, version 004010, order PO-2026-8841) or Load EDIFACT INVOIC sample (18 segments, INVOIC:D:96A:UN, total EUR 980.00) to inspect how segment tags, party addresses, and line tables map inside the EDI viewer. Click Clear anytime to reset all state, or paste non-standard regional EDI transaction sets (860, 852, ORDRSP) to decode every individual tag and raw segment cleanly.

Questions

How are X12 ISA and EDIFACT UNA delimiters detected automatically?

For ANSI X12 files, the parser reads a fixed 106-character ISA envelope where byte index 3 holds the element separator, index 104 holds the component separator, and index 105 gives the segment terminator. For UN/EDIFACT files, it reads the 9-character UNA string for component, element, decimal, release, and segment markers, or defaults to standard ISO 9735 separators.

What triggers structural diagnostics warnings in EDI files?

Structural diagnostics flags missing functional or interchange trailers such as SE, GE, IEA, UNT, or UNZ, plus mismatched segment counts inside SE01 or UNT01. Because parsers check the literal segments between ST and SE or UNH and UNT, dropped lines or trailing blank delimiters surface immediately without blocking segment inspection.

Does Excel or CSV export protect against spreadsheet formula injection?

Yes. Before generating RFC 4180 CSV text with a UTF-8 BOM, every extracted cell passes through a spreadsheet sanitizer that neutralizes leading equals, plus, minus, and at signs. Excel exports place extracted Line Items and raw Segments on separate worksheets so item descriptions never evaluate as active formulas.

Which ANSI X12 and UN/EDIFACT document types extract structured line items?

Structured header, party, and SKU line extraction runs across ANSI X12 850 Purchase Orders, 855 Acknowledgements, 856 Advance Ship Notices, 810 Invoices, 820 Remittances, 997 Acknowledgements, 940 Warehouse Orders, and 945 Advices, plus EDIFACT ORDERS, ORDRSP, DESADV, INVOIC, CONTRL, and REMADV. Other transaction codes open cleanly in the full segment inspector.

Can I read vendor EDI files without uploading confidential pricing?

Yes. Every parsing routine runs inside a Comlink Web Worker on your device after page load, making zero network requests with file contents, partner qualifiers, or monetary totals. Built-in sample interchanges also run locally so supply-chain teams can verify formatting offline.

Why are X12 TDS invoice totals divided by 100 in the summary card?

Under ANSI X12 rules, monetary elements in the TDS segment use implied two-decimal precision without a literal period character. Dividing the integer value by 100 restores standard currency notation such as 980.00 beside currency codes read from CUR or CUX segments.

Updated