---
title: Healthcare EDI ANSI X12 Parser & Validator API | 837P, 835, 271, 834 to JSON
description: Parse and validate HIPAA ANSI X12 EDI transactions (837P claims, 835 remittances, 270/271 eligibility, 834 enrollment, 850 PO, 810 invoices) into JSON in sub-5ms edge compute.
canonical: https://stanzaapi.com/tools/x12-parser/
---

[Home](/)/[API Directory](/tools/)/Healthcare EDI ANSI X12 Parser API

 <5ms Edge Latency99.9% SLA AvailableVerified: Sep 2026V8 Pure ComputeHealthcare & B2B EDI

# Healthcare EDI ANSI X12 Parser API

Transform raw HIPAA ANSI X12 EDI streams into strongly-typed hierarchical JSON with automated delimiter autodetection, loop traversal, and syntax validation.

⚠ COMPLIANCE STATUS NOTICE

NOT YET HIPAA COMPLIANT — DO NOT SUBMIT REAL PHI/PII. This API parses HIPAA-standard X12 5010 transaction formats, but our formal HIPAA compliance program (security risk assessment, BAA execution, third-party audit) is in progress. Until formally announced, use synthetic, test, or fully de-identified payloads only.

[Subscribe & Get API Key →](/tools/pricing)[⚡ Live Playground](#live-playground)[Specs (32)](#specifications)

 Interactive Edge Workbench

## ⚡ Live Pure-Compute Playground

 Test deterministic edge parsing with sub-2ms execution across 330+ Cloudflare V8 edge locations. Zero persistent storage, zero cold-starts, pure function $f(x)=y$.

32KB Demo Cap60 req/min Burst<2ms V8 ComputeZero Data Retention

input.x120 B

 Reset

1

ISA*00* *00* *ZZ*SUBMITTER1 *ZZ*RECEIVER01 *260830*1200*^*00501*000000001*0*P*:~GS*HC*SENDER*RECEIVER*20260830*1200*1*X*005010X222A1~ST*837*0001*005010X222A1~BHT*0019*00*CLAIM001*20260830*1200*CH~NM1*41*2*DR CLINIC*****46*1234567890~CLM*CLM001*150.00***11::1*Y*A*Y*Y~SE*7*0001~GE*1*1~IEA*1*000000001~

 RUN VALIDATION (<5ms) [ CHECKSUM: AWAITING RUN ]

output.jsondemo-ready

Status: Ready Copy

```
{
  "status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
```

Sandbox Quota: Free Tier (50 reqs/mo) • Production keys from $29/mo[Get Free Sandbox Key →](/login?email=)

Need 512KB+ Payloads, High-Throughput & 99.9% Production SLA?

Direct API keys include pooled monthly quotas, zero cold-starts, and HIPAA BAA eligibility on the Mega tier.

[Get Production API Key →](/pricing)

## Key Capabilities & Performance Architecture

- ✓Native parsing for 837P, 837I, 835, 270, 271, 834, 850, 810, 276, and 277 EDI transaction sets
- ✓Automatic ISA 106-character delimiter autodetection (element, component, segment separators)
- ✓Full hierarchical loop traversal (Billing Provider, Subscriber, Patient, Claim, Service Line, Adjustments)
- ✓Deterministic pure compute on Cloudflare Workers edge runtime (<5ms latency, zero cold-starts)
- ✓ReDoS-safe linear O(N) stream tokenization with strict 512KB payload capacity

## Transaction Set Specifications (32 Specifications)

Explore full structural breakdowns, checksum logic, and field schemas for every supported format.

[EDI X12 837P Professional Health Care Claim Parser & Validator — Instant sub-5ms parsing of ANSI X12 837P (5010X222A1) professional medical claims into structured JSON with full Hierarchical Loop (HL) resolution. — View Specification →](/tools/x12-parser/transaction/837p-professional-claim)[EDI X12 837I Institutional Claim Parser & Free Validator — Automated institutional claim parser for hospital inpatient and outpatient EDI 837I files with UB-04 revenue code mapping. — View Specification →](/tools/x12-parser/transaction/837i-institutional-claim)[EDI 835 Remittance Advice (ERA) Parser, Viewer & Format Guide — High-speed ANSI 835 ERA parser extracting payer payments, deductible/coinsurance CAS adjustments, CARC/RARC codes, and PLB provider adjustments in sub-3ms. — View Specification →](/tools/x12-parser/transaction/835-remittance-advice)[EDI X12 270 Eligibility Inquiry Parser & Validator — Parse inbound real-time and batch HIPAA 270 eligibility check requests into structured JSON payloads in under 3ms. — View Specification →](/tools/x12-parser/transaction/270-eligibility-inquiry)[EDI X12 271 Eligibility & Benefit Response Parser — Extract copays, remaining deductibles, out-of-pocket maximums, and in-network coverage terms from 271 EDI response streams. — View Specification →](/tools/x12-parser/transaction/271-eligibility-response)[EDI X12 834 Benefit Enrollment and Maintenance Parser — Process employer benefit enrollments, terminations, and demographic modifications with high-speed 834 EDI to JSON parsing. — View Specification →](/tools/x12-parser/transaction/834-benefit-enrollment)[EDI X12 850 Purchase Order Parser & JSON Converter — B2B supply chain EDI parser converting retail and enterprise ANSI X12 850 purchase orders into structured JSON. — View Specification →](/tools/x12-parser/transaction/850-purchase-order)[EDI X12 810 Electronic Commercial Invoice Parser — High-performance 810 commercial invoice parser extracting line item charges, discounts, taxes, and payment terms into JSON. — View Specification →](/tools/x12-parser/transaction/810-invoice)[EDI X12 276 Health Care Claim Status Request Parser — Extract claim status query parameters, provider identifiers, and patient encounter lookups from ANSI X12 276 streams. — View Specification →](/tools/x12-parser/transaction/276-claim-status-inquiry)[EDI X12 277 Health Care Claim Status Notification Parser — Parse payer 277 claim status responses, STC segment claim adjudication status codes, and pending payment dates in JSON. — View Specification →](/tools/x12-parser/transaction/277-claim-status-response)[CARC 45 Denial Code (Charge Exceeds Fee Schedule / Maximum Allowable Amount) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 45 (Charge Exceeds Fee Schedule / Maximum Allowable Amount) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-45-charge-exceeds-fee-schedule)[CARC 16 Denial Code (Claim/Service Lacks Information or Has Submission Error) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 16 (Claim/Service Lacks Information or Has Submission Error) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-16-claim-lacks-information)[CARC 96 Denial Code (Non-Covered Charge(s)) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 96 (Non-Covered Charge(s)) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-96-non-covered-charges)[CARC 1 Denial Code (Deductible Amount) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 1 (Deductible Amount) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-1-deductible-amount)[CARC 2 Denial Code (Coinsurance Amount) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 2 (Coinsurance Amount) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-2-coinsurance-amount)[CARC 3 Denial Code (Co-payment Amount) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 3 (Co-payment Amount) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-3-copay-amount)[CARC 18 Denial Code (Exact Duplicate Claim/Service) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 18 (Exact Duplicate Claim/Service) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-18-duplicate-claim)[CARC 27 Denial Code (Expenses Incurred After Coverage Terminated) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 27 (Expenses Incurred After Coverage Terminated) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-27-coverage-terminated)[CARC 29 Denial Code (Time Limit for Filing Has Expired (Timely Filing)) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 29 (Time Limit for Filing Has Expired (Timely Filing)) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-29-timely-filing-expired)[CARC 97 Denial Code (Procedure Included in Allowance for Another Service (Bundled)) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 97 (Procedure Included in Allowance for Another Service (Bundled)) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-97-bundled-service)[CARC 197 Denial Code (Precertification / Prior Authorization Absent) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 197 (Precertification / Prior Authorization Absent) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-197-prior-authorization-absent)[CARC 22 Denial Code (Care May Be Covered by Another Payer (Coordination of Benefits)) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 22 (Care May Be Covered by Another Payer (Coordination of Benefits)) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-22-coordination-of-benefits)[CARC 50 Denial Code (Non-Covered Services Not Deemed Medically Necessary) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 50 (Non-Covered Services Not Deemed Medically Necessary) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-50-not-medically-necessary)[CARC 204 Denial Code (Service / Drug Not Covered Under Patient Benefit Plan) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 204 (Service / Drug Not Covered Under Patient Benefit Plan) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-204-not-covered-benefit-plan)[CARC 252 Denial Code (Attachment / Documentation Required to Adjudicate) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 252 (Attachment / Documentation Required to Adjudicate) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-252-attachment-required)[CARC 140 Denial Code (Patient / Insured Identification Number and Name Mismatch) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 140 (Patient / Insured Identification Number and Name Mismatch) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-140-patient-id-name-mismatch)[CARC 4 Denial Code (Procedure Code Inconsistent with Modifier Used) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 4 (Procedure Code Inconsistent with Modifier Used) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-4-modifier-inconsistent)[CARC 11 Denial Code (Diagnosis Inconsistent with Procedure) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 11 (Diagnosis Inconsistent with Procedure) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-11-diagnosis-inconsistent)[CARC 31 Denial Code (Patient Cannot Be Identified as Insured) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 31 (Patient Cannot Be Identified as Insured) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-31-patient-cannot-be-identified)[CARC 109 Denial Code (Claim Not Covered by Payer / Sent to Wrong Contractor) | ANSI 835 EDI Spec — Comprehensive healthcare EDI technical reference and denial resolution guide for Claim Adjustment Reason Code 109 (Claim Not Covered by Payer / Sent to Wrong Contractor) under ANSI ASC X12 835 005010X221A1. — View Specification →](/tools/x12-parser/carc/carc-109-wrong-payer-contractor)[Free Online ANSI X12 EDI to JSON Converter & Inspector — Instant, zero-install ANSI X12 EDI to JSON converter running on Cloudflare Workers edge isolates. Converts 837P, 837I, 835, 270/271, 834, and B2B transactions into clean typed JSON in sub-5ms. — View Specification →](/tools/x12-parser/converter/x12-to-json)[EDI 835 Electronic Remittance Advice (ERA) to CSV/Excel Converter — Convert cryptic ANSI X12 835 Electronic Remittance Advice (ERA) files into flat tabular CSV and Excel-ready formats for accounting, reconciliation, and revenue cycle reporting. — View Specification →](/tools/x12-parser/converter/edi-835-to-csv)

## API Endpoints & Request Signatures

| Method | Path | Description |
| --- | --- | --- |
| `POST` | `/api/v1/x12/parse` | Parse raw ANSI X12 text (837P, 835, 270, 271) into structured JSON |
| `POST` | `/api/v1/x12/validate` | Validate ANSI X12 interchange envelopes and segment counts |

## Sample Response JSON Payload

All endpoints deliver strongly-typed envelopes with deterministic parsing and performance metrics.

HTTP 200 Response PayloadCopy

```
{
  "success": true,
  "data": {
    "transactionType": "837",
    "standard": "005010X222A1",
    "interchangeControlNumber": "000000001",
    "delimiters": {
      "element": "*",
      "component": ":",
      "segment": "~"
    },
    "claims": [
      {
        "claimId": "CLM001",
        "totalClaimChargeAmount": 150,
        "billingProvider": {
          "name": "DR DOE CLINIC",
          "npi": "1992837465"
        },
        "patient": {
          "firstName": "JANE",
          "lastName": "SMITH",
          "memberId": "W123456780"
        },
        "serviceLines": [
          {
            "line": 1,
            "procedureCode": "99213",
            "chargeAmount": 150,
            "units": 1
          }
        ]
      }
    ]
  },
  "meta": {
    "latency_ms": 1.84,
    "version": "1.0.0"
  }
}
```

## Multi-Language Integration Code

Copy and paste ready-to-run snippets with your direct API credentials:

cURLCopy

```
curl --request POST \
  --url "https://api.stanzaapi.com/x12-parser/api/v1/x12/parse" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data '{
  "raw": "ISA*00*          *00*          *ZZ*SUBMITTER1     *ZZ*RECEIVER01     *260830*1200*^*00501*000000001*0*P*:~GS*HC*SENDER*RECEIVER*20260830*1200*1*X*005010X222A1~ST*837*0001*005010X222A1~BHT*0019*00*CLAIM001*20260830*1200*CH~NM1*41*2*DR DOE CLINIC*****46*1234567890~PER*IC*SUPPORT*TE*8005551212~HL*1**20*1~NM1*85*2*DR DOE CLINIC*****XX*1992837465~HL*2*1*22*0~NM1*IL*1*SMITH*JANE****MI*W123456780~CLM*CLM001*150.00***11::1*Y*A*Y*Y~LX*1~SV1*HC:99213*150.00*UN*1***1~SE*11*0001~GE*1*1~IEA*1*000000001~"
}'
```

Node.js (Fetch)Copy

```
const response = await fetch("https://api.stanzaapi.com/x12-parser/api/v1/x12/parse", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.API_KEY || "YOUR_API_KEY"
  },
  body: JSON.stringify({
  "raw": "ISA*00*          *00*          *ZZ*SUBMITTER1     *ZZ*RECEIVER01     *260830*1200*^*00501*000000001*0*P*:~GS*HC*SENDER*RECEIVER*20260830*1200*1*X*005010X222A1~ST*837*0001*005010X222A1~BHT*0019*00*CLAIM001*20260830*1200*CH~NM1*41*2*DR DOE CLINIC*****46*1234567890~PER*IC*SUPPORT*TE*8005551212~HL*1**20*1~NM1*85*2*DR DOE CLINIC*****XX*1992837465~HL*2*1*22*0~NM1*IL*1*SMITH*JANE****MI*W123456780~CLM*CLM001*150.00***11::1*Y*A*Y*Y~LX*1~SV1*HC:99213*150.00*UN*1***1~SE*11*0001~GE*1*1~IEA*1*000000001~"
})
});

const data = await response.json();
console.log(data);
```

Python (Requests)Copy

```
import requests
import json

url = "https://api.stanzaapi.com/x12-parser/api/v1/x12/parse"
headers = {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_API_KEY"
}
payload = {
    "raw": "ISA*00*          *00*          *ZZ*SUBMITTER1     *ZZ*RECEIVER01     *260830*1200*^*00501*000000001*0*P*:~GS*HC*SENDER*RECEIVER*20260830*1200*1*X*005010X222A1~ST*837*0001*005010X222A1~BHT*0019*00*CLAIM001*20260830*1200*CH~NM1*41*2*DR DOE CLINIC*****46*1234567890~PER*IC*SUPPORT*TE*8005551212~HL*1**20*1~NM1*85*2*DR DOE CLINIC*****XX*1992837465~HL*2*1*22*0~NM1*IL*1*SMITH*JANE****MI*W123456780~CLM*CLM001*150.00***11::1*Y*A*Y*Y~LX*1~SV1*HC:99213*150.00*UN*1***1~SE*11*0001~GE*1*1~IEA*1*000000001~"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

GoCopy

```
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	url := "https://api.stanzaapi.com/x12-parser/api/v1/x12/parse"
	payload := []byte(`{"raw":"ISA*00*          *00*          *ZZ*SUBMITTER1     *ZZ*RECEIVER01     *260830*1200*^*00501*000000001*0*P*:~GS*HC*SENDER*RECEIVER*20260830*1200*1*X*005010X222A1~ST*837*0001*005010X222A1~BHT*0019*00*CLAIM001*20260830*1200*CH~NM1*41*2*DR DOE CLINIC*****46*1234567890~PER*IC*SUPPORT*TE*8005551212~HL*1**20*1~NM1*85*2*DR DOE CLINIC*****XX*1992837465~HL*2*1*22*0~NM1*IL*1*SMITH*JANE****MI*W123456780~CLM*CLM001*150.00***11::1*Y*A*Y*Y~LX*1~SV1*HC:99213*150.00*UN*1***1~SE*11*0001~GE*1*1~IEA*1*000000001~"}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("x-api-key", os.Getenv("API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

## Frequently Asked Questions

Which HIPAA ANSI X12 transaction sets does this API parse?

The API features dedicated high-speed parsers for 837P (Professional Claims), 837I (Institutional Claims), 835 (Electronic Remittance Advice / Payments), 270/271 (Eligibility Inquiry and Response), 834 (Benefit Enrollment), 850 (Purchase Orders), 810 (Invoices), and 276/277 (Claim Status Inquiry & Response).

How does dynamic delimiter detection work in X12?

ANSI X12 defines separators dynamically inside the 106-character ISA segment. Our parser inspects ISA[3] for the data element separator, ISA[104] for the component element separator, ISA[105] for the segment terminator, and ISA[82] for repetition separators.

Is PHI retained or logged by the API?

Zero PHI or EDI data is ever stored. All processing occurs in-memory at Cloudflare Workers edge nodes and streams back directly to your application. Note: zero-retention is an architecture property, not a HIPAA compliance certification — see the compliance status notice above.

Is this API HIPAA compliant? Can I submit real patient data (PHI/PII)?

Not yet. The parser handles HIPAA-standard X12 5010 formats (837P, 837I, 835, 270/271, 834) and is engineered with data-minimization and zero-retention principles, but our formal HIPAA compliance program — security risk assessment, Business Associate Agreement (BAA) execution, and third-party audit — is still in progress. Until it is formally announced, submit only synthetic, test, or fully de-identified payloads. Never send real PHI or PII through the endpoint.

What is the maximum payload size supported?

Requests accept up to 512KB of raw EDI text per request, accommodating multi-claim 837 batches and large 835 electronic remittance files.

## Complementary Enterprise APIs

Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:

[FDA DSCSA Drug Serialization → — Verify pharmaceutical 2D DataMatrix barcodes, NDC verification, and EPCIS compliance.](/tools/pharma-dscsa/)[FDA AccessGUDID & IMDRF UDI Decoder → — Decode medical device identifiers (DI + PI) conforming to 21 CFR 801.20 and EU MDR.](/tools/udi-decoder/)[ISO 20022 Financial Messaging → — Transform enterprise remittance workflows between X12 835 ERA and ISO 20022 camt.053.](/tools/iso20022-parser/)
