Pre-launch — your 10 free credits are reserved for launch day. Join the waitlist
converters · free tool

IDoc to JSON

Turn an SAP IDoc into JSON — the shape you map from.

Runs in your browser — your data never leaves it

Paste, type, or drop a file. Runs as you type.

Output appears here as you type.

Worked example

Input
<ORDERS05><IDOC><EDI_DC40><IDOCTYP>ORDERS05</IDOCTYP><MESTYP>ORDERS</MESTYP><DIRECT>2</DIRECT></EDI_DC40></IDOC></ORDERS05>
Output
{
  "@_basicType": "ORDERS05",
  "@_idocType": "ORDERS05",
  "@_messageType": "ORDERS",
  "@_direction": "Inbound",
  "Control": {
    "DocNumber": "",
    "Sender": {
      "Partner": "",
      "PartnerType": "",
      "Port": ""
    },
    "Receiver": {
      "Partner": "",
      "PartnerType": "",
      "Port": ""
    },
    "Reference": ""
  },
  "Header": {
    "Currency": "",
    "PaymentTerms": ""
  },
  "Partners": {
    "Partner": []
  },
  "LineItems": {
    "LineItem": []
  },
  "Dates": {
    "Date": []
  },
  "References": {
    "Reference": []
  }
}

This example is one of IDoc to JSON's test cases — if the tool stopped producing this output, the build would fail.

Questions

Why isn't there an IDoc Viewer JSON export already?
There is now — this is it. The IDoc Viewer reads for a human; this reads for a mapping script or a diff tool, same parse underneath.
Does it handle any IDoc basic type, or just ORDERS05?
Any IDoc XML the parser reads: the control record, partners, dates, references, line items with pricing conditions, and the segment histogram, whatever the basic type. Fields that aren't present come back empty rather than omitted, so the shape is stable across IDoc types.
Is this the same parser the IDoc Studio uses?
Yes — literally the same code, same rule as the EDI tools: the free JSON and the paid kit can never disagree about the same file.

Related tools