FHIR JSON utility

FHIR Resource Diff & Comparison Tool

Compare two FHIR resources or Bundles and find meaningful changes by resource, JSON path, semantic array identity, and reference target.

Privacy reminder. Do not paste real patient data, credentials, secrets, production identifiers, or confidential resources. Use synthetic or properly de-identified test data only.

Comparison

Paste two FHIR resources or Bundles

The comparison runs locally in your browser. Common repeating elements and Bundle entries are matched using meaningful FHIR identifiers where possible rather than array position alone.

Baseline or before version.

Changed or after version.

Comparison options

Separate paths with commas or spaces. Asterisks act as wildcards.

No comparison runPaste two FHIR resources or Bundles and click Compare resources.
A differences-only report will appear here.

FAQ

FHIR comparison questions

How are repeating elements matched?

The tool uses FHIR-aware keys where possible: identifier by system and value, coding by system and code, extension by URL, telecom by system and use, names by use and name content, references by target, and Bundle entries by fullUrl or resourceType/id. It falls back to array order when a stable key is unavailable.

Why are meta.lastUpdated and meta.versionId ignored by default?

Those server-managed metadata values commonly change even when the meaningful resource content is otherwise equivalent. You can include them by clearing the options.

Does this validate FHIR conformance?

No. It compares JSON structure and applies practical FHIR-aware matching, but it does not validate profiles, terminology bindings, invariants, or implementation guides.

Can I paste real patient data?

No. Use synthetic or appropriately de-identified test data only.

Practical guide

Separate meaningful FHIR changes from formatting noise

The comparison tool is intended for release testing, interface troubleshooting, regression review, and examining before-and-after resources. It compares parsed JSON structure, so indentation and property order should not distract from actual value, resource, and repeating-element changes.

Good comparison candidates

  • Two versions of the same Patient, Encounter, Observation, or DiagnosticReport.
  • A source resource before and after a mapping or transformation.
  • A Bundle from a previous release compared with the current build.
  • A known-good test response compared with a failing response.
  • Payloads from two environments where configuration drift is suspected.

Recommended workflow

  1. Use resources representing the same business object or test case.
  2. Confirm both inputs parse as JSON before interpreting the differences.
  3. Review high-level resource and Bundle changes first.
  4. Inspect changed paths and decide whether each difference is expected, environment-specific, or clinically significant.
  5. Repeat with stable synthetic identifiers when random IDs or timestamps obscure the change under investigation.

Worked example

Distinguish status changes from result changes

Before: Observation.status = "preliminary"
After:  Observation.status = "final"

Before: Observation.valueQuantity.value = 4.8
After:  Observation.valueQuantity.value = 5.6

The first change represents workflow state; the second changes the reported measurement. Both may be legitimate, but they deserve different review. A regression test might permit the status transition while requiring explicit confirmation that the changed result was expected.

Also inspect related fields such as effectiveDateTime, issued, reference ranges, interpretation codes, units, and the coding system. A numeric value that appears unchanged can still mean something different when its unit or code changes.

Interpreting differences

Repeating arrays need context

Identifiers and coding arrays

FHIR arrays are often conceptually matched by stable properties such as system, value, code, or resource ID rather than by visual position alone. Missing stable keys or regenerated IDs can make two equivalent-looking collections harder to match.

When a system changes array ordering on every response, normalize or stabilise the test data before deciding that every reported movement is a defect.

Limitations

  • The tool does not decide whether two different codings are semantically equivalent.
  • It does not apply profile-specific rules, terminology subsumption, or business tolerances.
  • Narrative XHTML may change without the underlying coded content changing, or vice versa.
  • Bundle entry matching is strongest when resources have stable IDs, full URLs, or identifiers.

Authorship and review

Practical guidance backed by integration experience

Maintained and technically reviewed by Health Data Tools, drawing on more than 15 years of healthcare integration experience across HL7, FHIR, CDA, APIs, PKI, and clinical integration systems.

Technically reviewed: