Free X12 EDI to JSON Converter

Paste or upload an X12 or HIPAA file, select Parse, then select To JSON. Edit the JSON and select From JSON to turn it back into EDI. You can also validate and acknowledge the file from the same toolbar. Everything runs in your browser.

EDI never leaves your browser

Convert X12 EDI to JSON, and JSON back to EDI

The EdiNation X12 JSON Converter turns X12 and HIPAA EDI files into readable JSON, and builds valid EDI files from JSON. Every loop, segment and data element becomes a named property, such as TransactionSetControlNumber_02 or Loop2300, so you can read a claim or a purchase order without memorizing element positions. Both editors can be edited, and all conversion runs locally in your browser with WebAssembly.

  • EDI to JSON for any X12 ASC or HIPAA transaction, including 837, 835, 834, 270/271, 850, 810 and 856.
  • JSON to EDI from the JSON tab, with the default X12 delimiters or your own.
  • Large files converted in chunks, split by transaction or by a repeating loop.
  • Validate and acknowledge the same file with Validate and ACK, as in the X12 Local Editor.
  • Download the EDI or the JSON when you are done.

How to convert EDI to JSON

  1. Load the EDI file. Paste it into the EDI editor, upload it with Upload, or pick a sample from Samples.
  2. Parse it. Select Parse. Uploaded files are parsed automatically. Only files that parse without errors can be converted, and you need to parse again after every change.
  3. Convert it. Select To JSON. The JSON appears in the JSON tab on the right, and you can download it from Download.

To go the other way, edit the JSON and select From JSON. The JSON must match an existing transaction model. Select Parse afterwards to check that the generated EDI file is correct.

Convert large EDI files by splitting them

JSON can be ten times larger than the EDI it comes from, which can slow down or crash the browser. To convert a large file in chunks, select the scissors button next to To JSON and enter a segment index. Use the index of the first ST segment to split by transaction, or the index of the first segment of a repeating loop, such as the LX segment that starts Loop2400, to split by loop. The index is the line number shown next to the segment in the EDI editor.

Generate X12 with custom delimiters

To generate X12 with non-default separators, set these properties in the X12Interchange JSON before you select From JSON:

  • Segment separator: X12Interchange.SegmentDelimiter
  • Data element separator: X12Interchange.DataElementDelimiter
  • Repetition separator: X12Interchange.ISA.InterchangeControlStandardsIdentifier_11
  • Component separator: X12Interchange.ISA.ComponentElementSeparator_16

Convert EDI to JSON in your own code

The converter runs on ediFabric. You can get the same JSON from your own code with the ediFabric native libraries for Python, Java, C, C++ and C#, or from the ediFabric Cloud REST API. Use it to load EDI into databases, queues or document stores, or to generate outbound EDI from your application data.

REST API with ediFabric Cloud

curl -L -X POST 'https://api.edination.com/v2/x12/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@purchase-order.edi'

Python with ediFabric Native

import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

edi = open("837P_Claim.txt", "rb").read()
output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE)
print(output[:offset])

Read how to convert between EDI and JSON with ediFabric. Every plan includes .NET, Native and Cloud, and the Community plan is free.

Start free with ediFabric See the EDI REST API

Frequently asked questions

No. Parsing and conversion run in your browser with WebAssembly. EdiNation only downloads the transaction model it needs, and never sends the EDI file or the JSON.

Each transaction follows its model in OpenEDI, an open format for EDI specs based on the OpenAPI 3 schema object. You can view and download every model in the EDI Spec Library.

Yes. Edit or paste the JSON in the JSON tab and select From JSON. The JSON must match an existing transaction model. Then select Parse to check the generated EDI.

JSON is much larger than EDI. Select the scissors button next to To JSON and enter the index of the first ST segment, or of the first segment in a repeating loop, to convert the file in chunks.

Yes. There is no account, no file size limit and no limit on the number of conversions.

Use ediFabric, the EDI engine behind EdiNation. It is available as native libraries, as a REST API and for .NET.