EDI Formatter
EDI files usually arrive as one long line of segments. This formatter splits ANSI X12 and UN/EDIFACT data into one segment per line so you can read it, and can join it back into a single line for sending.
or drop a file here · .edi, .x12, .txt, .dat · up to 20 MB
About the EDI Formatter
Most EDI software writes an interchange as one unbroken string, often thousands of characters wide. That is fine for machines but painful for a person trying to spot the purchase order number or a wrong date. This formatter breaks ANSI X12 and UN/EDIFACT data at every segment terminator so each segment sits on its own line.
Who uses it
- Support staff comparing a rejected file with a good one.
- Developers writing or debugging an EDI map.
- Buyers and suppliers who received a raw
.ediattachment and just want to read it.
Worked example
Load the X12 example and choose One segment per line. The output begins:
ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *261119*1200*U*00401*000000001*0*T*>~
GS*PO*SENDERID*RECEIVERID*20261119*1200*1*X*004010~
ST*850*0001~
BEG*00*SA*PO-1001**20261119~
Tick Indent by envelope and the GS line moves in two spaces, ST four, and the order lines six, so you can see where each transaction set starts and ends. Switch to One line (as sent) to join everything again.
How the separators are found
X12 hides its separators inside the ISA header, which always has the same width: the fourth character separates elements and the last two characters give the component separator and the segment terminator. EDIFACT announces them in an optional UNA segment; without one, the standard apostrophe, plus sign, colon and question mark are used.
Good to know
- Only the gaps between segments change. Segment text, including EDIFACT release characters such as
?+, is copied exactly. - Indented output is for reading. Trading partners often refuse leading spaces, so send a plain version.
- You can choose Windows line endings if the receiving system expects them.
- Files up to 20 MB open fine; very long results show the start on screen while the download holds everything.
- For a deeper look, the EDI viewer labels every element and the EDI validator checks the counts.
How to use EDI Formatter
- Paste your EDI data, open a file, or load an example.
- Choose one segment per line or one line, and optionally indent by envelope.
- Select Format EDI, check the result, then copy or download it.
Privacy: how it works
Everything happens in your browser. Your text is not sent to any server.
Frequently asked questions
Does formatting change my data?
No. The text of every segment is kept exactly as it was, including release characters. Only the line breaks between segments change, plus spaces at the start of lines if you choose indentation.
How does it know the separators?
For X12 it reads them from the fixed-length ISA header. For EDIFACT it reads the UNA segment, or uses the standard + : and apostrophe when there is no UNA.
Can I send the indented version to a trading partner?
Better not. Indentation is for reading. Many EDI systems reject extra spaces, so send the one-line or plain one-segment-per-line version.