FHIR Bulk Data Preview

Preview FHIR Bulk Data exports (NDJSON) in your browser. Inspect resource counts and structure privately.

  • Open FHIR Bulk Data NDJSON exports and inspect resource counts and structure locally.

How to preview a Bulk Data export

  1. Paste NDJSON content or drop a .ndjson, .jsonl or .json file.
  2. The preview counts resources by type and lists them. Lines that aren't valid JSON are flagged with the error and line number.
  3. Select a resource type, then a resource, to see its full JSON.

The file is read in your browser and isn't uploaded. That matters, because bulk exports usually contain a whole population's data.

What NDJSON is

FHIR Bulk Data Access (the $export operation) delivers data as newline-delimited JSON: one complete resource per line, usually one file per resource type.

{"resourceType":"Patient","id":"p1","gender":"female","birthDate":"1987-02-20"}
{"resourceType":"Patient","id":"p2","gender":"male","birthDate":"1990-11-03"}

Unlike a Bundle, there's no wrapper and no commas between resources, so files can be streamed and processed line by line, however large they are. A typical export lists its output files in a manifest:

{
  "transactionTime": "2026-03-05T10:00:00Z",
  "request": "https://fhir.example.org/r4/Group/diabetes-cohort/$export?_type=Patient,Observation",
  "requiresAccessToken": true,
  "output": [
    { "type": "Patient", "url": "https://files.example.org/export/patient_1.ndjson" },
    { "type": "Observation", "url": "https://files.example.org/export/observation_1.ndjson" }
  ],
  "error": []
}

Things to check in an export

  • Counts by type match what you expected for the cohort and _type filter.
  • Invalid lines. A truncated download or a line broken across two lines shows up as a JSON error.
  • References. Observations refer to Patients by id (Patient/p1). Check that those Patients appear in the Patient file, since exports filtered by _since or _typeFilter may not include them.
  • The error files in the manifest contain OperationOutcomes for resources the server couldn't export.

Limitations

  • Very large files (hundreds of megabytes) are limited by your browser's memory. Preview a sample (head -n 1000 patient_1.ndjson) rather than the whole file.
  • It doesn't download files from manifest URLs or authenticate to a server. Fetch the files with your backend client, then open them here.
  • To turn resources into a spreadsheet, convert a sample in FHIR to CSV. That tool takes JSON, so wrap the resources in a Bundle or convert them one at a time.

FAQ

How do I run a Bulk Data export?

Call $export at the system, Group or Patient level with Prefer: respond-async and a backend-services access token, poll the status URL until the manifest is ready, then download each output file. SMART on FHIR Developer Guide covers the backend-services authorization step.

Is my export uploaded?

No. The file is read with the browser's File API and parsed in this page. Nothing is sent to a server, which matters because bulk exports usually contain data for many patients.

Which FHIR versions are supported?

Any. Each line is parsed as JSON and grouped by resourceType, so R4, R4B and R5 exports display the same way.

Why are some lines marked invalid?

Each line must be one complete JSON object. Common causes are a download cut off mid-line, a pretty-printed resource spread over several lines (not valid NDJSON), or a stray blank or header line. The error message comes from the browser's JSON parser.

FHIR Toolbox is a free collection of HL7 FHIR tools by Omindra Labs. The tools process your data in your browser; it is not uploaded for normal tool operations.