Compare, reconcile and trace X12 healthcare files on your own PC.
x12diff is a free command-line tool for 834 enrollment, 835 remittance and 837 claim files. It runs offline, handles files in the hundreds of megabytes, and writes plain CSV you can open anywhere.
Version 0.2.3 · MIT license · Source: github.com/datawharf-tools/x12diff (public on release)
Sound familiar?
The 834 is too big to open
Notepad++ stalls, Excel gives up, and you still have to tell the carrier who was added, termed or changed since last month.
The term hides in the file
A termination shows up as a flag or a date inside one member record, or, in a full file, as a member who just stops appearing. Hard to spot by eye in a file with thousands of members.
A 999 or 277CA reject you cannot tie to a claim
The rejection refers to control numbers and patient control numbers. Finding which claim it meant is manual work, claim by claim.
The 835 will not reconcile
Check totals, claim totals and adjustment codes do not add up, and you cannot see where without flattening the file to rows first.
What the free CLI does
parse | Summarize a file: interchanges, transaction sets by type, segment counts, and envelope control-number mismatches. |
|---|---|
diff | Compare two 834 member files. Lists members ADDED, TERMED and CHANGED (segment, element, old value, new value) and counts UNCHANGED. One CSV row per change. It reads BGN08 to tell full files from change files (override with --mode full|change), and it stops with exit code 3 if a file is cut off. |
remit | Flatten 835s to one CSV row per service line. Roll up adjustments by group and reason code. Check that each claim and each check balances. |
recon | Match 837 claims to 835 payments and to 999/277CA rejections. Each claim is marked paid, partial, denied, patient responsibility, reversed, adjusted, rejected before adjudication or unmatched (with aging). Remits with no claim are listed as orphans. |
gen | Make synthetic test files so you can try everything without touching real data. |
It streams the files. In our synthetic tests, a pair of roughly 300 MB 834 files was compared in about 8 seconds, and a 1 million claim reconciliation across 837, 835, 999 and 277CA files took about 7 seconds. Your hardware and your files will differ.
$ x12diff gen --members 300 --old old.834 --new new.834 --seed 3 $ x12diff diff old.834 new.834 --show 3 --csv changes.csv CHANGED SUB00000031|999000031|18 N3 N301: '100 TEST STREET UNIT 31' -> '200 SAMPLE AVENUE APT 31' CHANGED SUB00000067|999000067|18 N3 N301: '100 TEST STREET UNIT 67' -> '200 SAMPLE AVENUE APT 67' TERMED SUB00000073|999000073|18 DTP*349 segment added; termination flag: DTP*349:03 present Old: old.834 members: 300 (BGN08 4: full) New: new.834 members: 298 (BGN08 4: full) Mode: full (a member missing from the new file is termed) ADDED: 3 TERMED: 13 (5 absent from new, 8 newly flagged) CHANGED: 11 UNCHANGED: 276 CSV written: changes.csv
$ x12diff gen --kind claims --claims 2000 --dir demo --seed 4 $ x12diff recon demo --asof 20260601 --csv recon.csv Files: 5 837 claims: 2,000 in 50 sets 835 claim entries: 1,910 on 20 checks Acknowledgement sets: 1 (3 837 sets rejected) 277CA claim statuses: 239 PAID: 892 PARTIAL: 370 DENIED: 150 PATIENT_RESP: 59 REVERSED: 108 ADJUSTED: 71 UNMATCHED: 131 REJECTED: 219 ORPHAN: 10 Charged (837): 503572.20 Paid (matched 835s, net): 270076.15 UNMATCHED aging (days since claim date): 0-30: 0 31-60: 32 61-90: 35 91+: 64 future: 0 unknown: 0 Warnings: 0 CSV written: recon.csv
All names, IDs and numbers above are synthetic.
Privacy: PHI never leaves your PC
x12diff has no network code. No upload, no telemetry, no update check, no account. It reads the files you name and writes the CSV you ask for. You can run it on an offline machine, and you can check the source yourself.
Pro (coming): desktop app, $99 per year
- Desktop app on the same engine, with claim-to-remit drill-down
- Excel workbook reports
- Saved profiles per trading partner
- Folder watching
The free CLI stays free. Pro is not released yet. You can pre-order at $99 per year, or join the waitlist and tell us which part matters most to you.
Email us to pre-order and we send a PayPal invoice for $99. Full refund if Pro has not shipped by June 30, 2027. Ask at [email protected].
Join the waitlist: your email and which module matters most to you (834 compare, 835 remits, claim recon and rejections, desktop app, or FHIR export). One email when Pro ships, and occasional release notes.
Never real member or claim data, please.
FAQ
Is it HIPAA safe to use?
Nothing is uploaded. x12diff never connects to a network, so PHI in your files stays on the machine where you run it. Your own policies about where PHI may be stored and who may open it still apply to the CSV files it writes. We do not claim any certification.
What about the X12 licence and implementation guides?
The tool ships no implementation-guide text: no loop names, element descriptions or code lists. It refers to segments and elements by ID and position. You supply your trading partner's companion-guide settings (member key, termination codes, labels) in a plain-text profile.
Does it work on a locked-down Windows laptop?
There are two options. The Windows exe bundles its own runtime, so no Java install is needed. Or use the jar if you already have Java 17 or newer (it is built for Java 17 and tested on 17 and 21). Either runs from a folder without installing anything, though your IT policy may still need to allow running it.
What about refunds on the Pro pre-order?
If Pro does not ship by June 30, 2027, you get a full refund, no questions. Email [email protected].
Is the free version limited?
No. All CLI commands are free and MIT licensed. Pro adds a desktop app and reporting features on top.
Can I trust the numbers?
Check them against a sample you know. Use gen to make synthetic files with known counts, and compare against your own process on a small real file in your own environment. Report problems, with synthetic repro files only, to [email protected].