Skip to content
DoItJag

EDI to CSV Converter

Get EDI data into a spreadsheet. Each row shows the segment, the message it belongs to and its line number, so you can sort and filter in Excel, LibreOffice or Google Sheets.

or drop a file here · .edi, .x12, .txt, .dat · up to 20 MB

Try an example:
Rows

About the EDI to CSV Converter

Sometimes the quickest way to answer a question about an EDI file is a spreadsheet: total the quantities, list every ship-to address, or compare two orders side by side. This converter turns ANSI X12 or UN/EDIFACT data into a CSV file that Excel, LibreOffice Calc and Google Sheets open directly.

Two layouts

One row per segment mirrors the file. Columns are the segment number, its line, the message type and control number it belongs to, the tag, the segment name where known, then E01, E02 and onwards. Composite values stay together with their component separator, for example 137:20261119:102.

One row per value is long and narrow. Each non-empty element or component gets its own row with a reference such as PO102 or DTM 01 and a component number. This is the better choice for pivot tables and filters, such as pulling out every quantity.

Worked example

Convert the X12 example with one row per value. Among the rows you will find:

5,1,850,0001,N1,N102,,Example Store
6,1,850,0001,PO1,PO102,,10

Filter the Segment column on PO1 and the Element column on PO102 to see all ordered quantities.

Opening the file correctly

  • If everything lands in one column, your spreadsheet expects semicolons. Choose Semicolon and download again.
  • IDs with leading zeros, like 0001, may be shown as 1 by Excel when double-clicked open. Import through Data › From Text/CSV and set those columns to Text to keep them.
  • Values starting with = + - or @ are prefixed with an apostrophe by default so that they cannot run as formulas.

Before you download

A table preview of the first twenty rows appears under the button, together with the full CSV text, so you can check the layout first.

For a structured export that programs can read, see the EDI to JSON converter.

How to use EDI to CSV Converter

  1. Paste your EDI data, open a file, or load an example.
  2. Choose one row per segment or one row per value, and the delimiter.
  3. Select Convert to CSV, check the table preview, then download the .csv file.

Privacy: how it works

Everything happens in your browser. Your text is not sent to any server.

Frequently asked questions

Which layout should I choose?

One row per segment gives columns E01, E02 and so on, like the file itself. One row per value lists every element and component separately, which is easier to filter, for example all NAD values.

Why does a value start with an apostrophe?

Values beginning with = + - or @ get a leading apostrophe so a spreadsheet does not run them as formulas. You can turn this protection off.

Excel shows my file in one column. What now?

Some regional settings expect semicolons. Choose Semicolon as the delimiter and download again, or use Excel’s Data › From Text/CSV import.