JSON to EDI Converter
Convert a JSON list of segments into a plain-text EDI/X12 file, using the standard delimiters (*, :, and ~). This is the reverse of this site's EDI to JSON Converter.
How it works
- Paste a JSON array of segments shaped like {"id": "ISA", "elements": [...]} (or use the built-in example).
- The tool checks that every item in the array has an "id" (segment code) and an "elements" array.
- Each segment is serialized by joining its elements with the standard element separator (*).
- Segments are joined together with the standard segment terminator (~), producing the full EDI file.
- Copy the result or download it as an .edi file, ready to send.
Use cases
- Generate a test EDI file from data you already have in JSON, without hand-writing the format.
- Rebuild an EDI file after editing its content in JSON (for example, changing an item number or a quantity).
- Complete the round trip: convert an EDI file to JSON, edit it, and convert it back to EDI.
- Prototype an integration's EDI output before coding it into your system.
Common mistakes
- Pasting the nested JSON (grouped into interchange/group/transaction) produced by the EDI to JSON Converter.This tool expects a flat list of segments, not the nested structure. If you have the nested JSON, extract the segments into a flat list shaped like {"id": "...", "elements": [...]} before converting.
- Forgetting to include the closing segments (IEA, GE, SE) in the list.The tool only serializes what you give it; if your list doesn't include the closing segments, the resulting EDI file won't have them either, and will likely fail a trading partner's validation.
- Expecting the tool to automatically calculate control numbers or SE's segment count.Those values are taken literally from what you put in the JSON; the tool doesn't calculate or correct them. Use this site's EDI Validator to check they're correct before sending the file.
Frequently asked questions
Alternatives
Code libraries like node-x12 or pyx12 let you generate EDI files programmatically with more control. This tool is useful for a one-off conversion from JSON without writing code.