FHIR to CSV/Excel Converter
Convert FHIR Bundles and resources to CSV for Excel or Google Sheets in your browser. See exactly how nested and repeating elements are flattened.
How to convert FHIR to CSV
- Paste a FHIR Bundle or a single resource, drop a
.jsonfile, or click Load sample. - Click Convert. The table preview shows one row per resource.
- Click Download CSV. The file opens in Excel, Google Sheets, LibreOffice or any data tool.
The conversion runs in your browser. The CSV file is generated locally and your data is never uploaded.
How the flattening works
FHIR is nested and a spreadsheet is flat, so the converter applies three rules:
| FHIR | Becomes |
|---|---|
Nested objects: address[0].city | Dotted column names: address.city |
Arrays of simple values: given: ["Amy", "V."] | Joined with ; : Amy; V. |
Arrays of objects: name, identifier, telecom | First entry only, plus a _count column when there's more than one |
Columns are the union of all paths across rows, so resources missing an element get an empty cell. Values with commas, quotes or line breaks are quoted using standard CSV escaping.
Worked example
A Patient with two names:
{
"resourceType": "Patient",
"id": "p1",
"name": [
{ "use": "official", "family": "Shaw", "given": ["Amy", "V."] },
{ "use": "maiden", "family": "Baxter" }
],
"gender": "female",
"birthDate": "1987-02-20"
}
becomes:
resourceType,id,name.use,name.family,name.given,name._count,gender,birthDate
Patient,p1,official,Shaw,Amy; V.,2,female,1987-02-20
name._count = 2 tells you the maiden name wasn't included.
Limitations
- Repeating elements keep only their first entry. Check the
_countcolumns before you rely on the data. For a specific entry (for example the official name, or the phone rather than the email), extract it explicitly. How to Convert FHIR Patient Data to Excel shows how with FHIRPath. - Output is CSV, not
.xlsx. Excel opens it, but import it via Data → From Text/CSV (UTF-8, columns as Text) so MRNs and ZIP codes keep their leading zeros and dates aren't reformatted. - Mixed Bundles make wide sheets. A Bundle with Patients and Observations produces one table where most cells are empty. Convert each resource type separately.
- Observation components (such as blood pressure systolic and diastolic) are arrays too, so only the first component appears.
- NDJSON (Bulk Data exports) isn't accepted here. Preview those in Bulk Data Preview.
FAQ
Is it safe to convert real patient data?
The conversion never leaves your browser, so the tool itself doesn't expose your data. The CSV you download is a different matter: spreadsheets are easy to email and forget. Export only what's needed, and consider de-identifying first.
How large a file can it handle?
It depends on your device's memory. Bundles of a few thousand resources are fine on a typical laptop. For very large exports, use a pipeline approach such as SQL on FHIR ViewDefinitions.
Can I choose which columns to export?
Not yet: every path found becomes a column. You can delete columns in your spreadsheet, or trim the JSON first.
Which FHIR versions does it support?
All of them. Flattening works on whatever elements are present, so R4, R4B and R5 resources convert the same way. Column names follow the element names of the version you paste.
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.