FHIR Resource Viewer

View and flatten FHIR JSON or XML resources.

Save

Calculator

Inputs

Paste your FHIR resource here.

Live output

Results

Resource Structure

Message Analysis

Total Fields8
Segments Found
resourceType: 1
JSON PathValueType
resourceType (1)
resourceTypePatientstring
idexamplestring
name[0].useofficialstring
name[0].familyChalmersstring
name[0].given[0]Peterstring
name[0].given[1]Jamesstring
gendermalestring
birthDate1974-12-25string

Report

Export and share

Document

Copy and share

Assumptions

  • This viewer focuses on structure only and does not validate conformance to FHIR profiles, implementation guides, value sets, or terminology bindings.
  • JSON parsing uses the browser parser and XML parsing uses DOM traversal, so the output reflects the payload structure rather than business meaning.
  • Flattened arrays are shown with positional indexes, which is useful for inspection but does not guarantee how another application will map or persist those paths.

Sensitivity preview

No numeric sensitivity scenarios are available.

Logic: Recursive traversal of JSON object or XML DOM.

Related Tools

View All

About this FHIR Resource Viewer

FHIR resources are often exchanged as JSON or XML documents that contain nested arrays, objects, and extensions. This viewer helps you inspect the structure by flattening the payload into paths and values, which is useful when you need to trace a field without building a full parser around it.

Who this calculator is for

  • FHIR developers, analysts, and testers reviewing resource payloads from APIs or interface middleware.
  • Teams comparing how nested fields, arrays, and attributes are represented in JSON versus XML resources.
  • Anyone needing a quick structural view of a Patient, Observation, Bundle, or similar resource.

When to use it

  • Use it when you need to inspect where a field lives inside a deeply nested FHIR resource.
  • Use it to flatten a Bundle during API troubleshooting or mapping work.
  • Use it as a quick viewer before writing code that targets specific paths in a resource.

How to use this calculator

  1. Paste your FHIR content (JSON or XML) into the input box.
  2. The tool automatically detects the format.
  3. View the Path (e.g., `name[0].family`) and Value in the table below.

Key assumptions

  • This viewer focuses on structure only and does not validate conformance to FHIR profiles, implementation guides, value sets, or terminology bindings.
  • JSON parsing uses the browser parser and XML parsing uses DOM traversal, so the output reflects the payload structure rather than business meaning.
  • Flattened arrays are shown with positional indexes, which is useful for inspection but does not guarantee how another application will map or persist those paths.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

The parser recursively traverses the JSON object or XML DOM. For arrays (like multiple names or identifiers), it adds index numbers (e.g., `[0]`) to the path so you can distinguish between them.
Recursive traversal of JSON object or XML DOM.

Inputs explained

FHIR Content

The raw payload from a FHIR API response. Can be a single Resource or a Bundle.

Understanding your results

The Path column helps you write code to access specific data points (e.g. `patient.name[0].given[0]`).

Example scenarios

Patient JSON

`{"resourceType": "Patient", "active": true}` -> Path: `active`, Value: `true`.

Key Features

  • Supports JSON and XML
  • Flattens arrays and nested objects
  • Type detection

Things to Keep in Mind

This is a structural viewer, not a profile validator. It does not check if the resource adheres to US Core or other implementation guides.

Tips & Best Practices

  • Use the browser's Find (Ctrl+F) to search the table for specific fields like 'MRN' or 'birthDate'.
  • Local browser processing reduces exposure, but you should still scrub or minimize real PHI whenever possible before pasting payloads into troubleshooting tools.

Glossary of Terms

Resource
The basic unit of data exchange in FHIR (e.g. Patient, Medication, Appointment).
Bundle
A container for a collection of resources.

Frequently Asked Questions

What is the difference between FHIR and HL7 v2?
HL7 v2 uses a pipe-delimited format and is event-based (push). FHIR uses modern web standards (JSON/XML/HTTP) and is often resource-based (RESTful pull), though it supports messaging as well.
Does this support R4 and STU3?
It can flatten JSON or XML from common FHIR versions because it reads the underlying structure generically, but it does not validate version-specific rules or profile requirements.
What is a 'Resource'?
In FHIR, a Resource is the basic unit of data exchange (e.g. Patient, Medication, Appointment). Each has a known structure and definition.
Can I view Bundles?
Yes, if you paste a Bundle resource, the parser will flatten the entire structure, showing paths like `entry[0].resource.resourceType`.
Is XML or JSON better for FHIR?
JSON is generally preferred by modern web developers for its smaller size and native compatibility with JavaScript. XML is supported for legacy compatibility.