Premium tool

HL7-to-JSON

Turn an HL7 v2 message into structured JSON. Nothing is lost: order, repeated segments, empty values and repetitions are all kept.

Structure, not meaning. The JSON mirrors the message: positions, repetitions, components and subcomponents, with every value kept as text. It has no field names or data types, because those depend on your HL7 version and profile, and escape sequences are not decoded. The message is converted in memory on the server and is not stored or logged. Use synthetic or de-identified messages only.
A free account is needed for this tool. Log in or create a free account. Free accounts include a small monthly allowance; see proposed plans.

Choose Convert to JSON to see the result.

The JSON format (hl7-json/1)

Formal schema: hl7-json-1.schema.json (JSON Schema). Full description and limits are in the documentation.

{
  "schema": "hl7-json/1", "style": "full",
  "message": { "delimiters": {...}, "segmentCount": 5, "messageType": "ORU^R01", ... },
  "segments": [
    { "index": 2, "id": "PID", "occurrence": 1, "fieldCount": 8, "fields": [
        { "position": 3, "path": "PID-3", "value": "000789^^^FAC^MR~A99^^^OTH^PI", "empty": false,
          "repetitions": [
            { "index": 1, "components": [ { "position": 1, "value": "000789" }, { "position": 2, "value": "", "empty": true }, ... ] },
            { "index": 2, "components": [ ... ] } ] },
        { "position": 2, "path": "PID-2", "value": "", "empty": true, "repetitions": [] } ] } ],
  "parseWarnings": []
}