FHIR Validator
Check FHIR JSON in your browser: syntax, ids and meta for any resource, plus detailed rules for Patient, Observation and Bundle, with line-mapped errors.
- Check JSON syntax, resourceType, id and meta for any FHIR resource.
- Detailed element, code and cardinality rules for Patient, Observation and Bundle, with line-mapped errors.
How to use the FHIR Validator
- Paste a FHIR resource or Bundle in JSON, upload a
.jsonfile, open one from your workspace, or load the valid or invalid sample. - Click Validate. Errors, warnings and information messages appear with the element path and the line number they refer to.
- Fix the issues in the editor and validate again. When it's clean, open the resource in another tool with Open with….
Everything happens in your browser. The resource isn't uploaded, so you can check real payloads during development.
What it checks
For every resource:
- JSON syntax, with the parser's error message (most browsers include the position of the problem).
resourceTypeis present and is a known FHIR resource type.idmatches the FHIR id format (1–64 characters: letters, digits,-and.).meta.versionIdandmeta.lastUpdatedformats (lastUpdatedmust be a full instant with timezone).
Detailed rules for Patient, Observation and Bundle (including Patients and Observations inside a Bundle):
- Unknown top-level elements, which usually means a typo such as
birthdateforbirthDate. - Arrays where the spec requires arrays (
name,identifier,telecom,category...) and objects where it requires objects. - Required elements:
Observation.status,Observation.code,Bundle.type. - Codes from required value sets:
gender,Observation.status, name/address/telecomuse,Bundle.type,request.method. - Primitive formats: dates (including impossible days like
2026-02-30), dateTimes, integers, booleans. - Choice types: only one
value[x],effective[x],deceased[x]ormultipleBirth[x]. - Data types inside: Identifier, HumanName, ContactPoint, Address, CodeableConcept, Coding, Quantity and Reference.
- Bundle rules:
entry.requestrequired for transaction and batch,entry.responsefor responses,totalonly in searchset and history,entry.searchonly in searchset, and duplicatefullUrlvalues.
Worked example
This Observation has four problems:
{
"resourceType": "Observation",
"status": "Final",
"code": { "coding": [{ "code": "8867-4" }] },
"effectiveDateTime": "2026-02-30T10:00:00Z",
"valueQuantity": { "value": 72, "unit": "/min" },
"valueString": "72 bpm"
}
The validator reports: status must be a lowercase code (final); February 30th isn't a real date; only one value[x] may be present; and, as a warning, the Coding has a code but no system. Fixing those four gives a structurally sound heart-rate Observation.
What it doesn't check
This is a fast structural checker, not a conformance validator. It doesn't:
- validate resource types other than Patient, Observation and Bundle beyond the basic checks above,
- evaluate the specification's FHIRPath invariants or check cardinality for every element,
- check codes against terminology (whether a LOINC or SNOMED CT code exists),
- validate against profiles or implementation guides such as US Core,
- validate XML.
For those, use the official HL7 validator (validator_cli.jar or validator.fhir.org) or your server's $validate operation. FHIR Validation Best Practices explains how to combine them.
FAQ
Does it support R4 and R5?
The checks above use elements and codes common to R4, R4B and R5, so they apply to all three. Version-specific differences (for example R5's Encounter changes) aren't validated. To look up how an element differs between versions, use the R4 vs R5 comparison.
Is my data uploaded?
No. Parsing and validation run in JavaScript in this page. Nothing you paste is sent to a server or stored, unless you choose to save it to your browser-local workspace.
Why is something a warning and not an error?
Warnings flag things that are allowed but usually wrong, such as a Coding without a system, an Observation with no value and no dataAbsentReason, or an unknown element that might be a typo. Fix them unless you have a reason not to.
How is this different from the official HL7 validator?
The HL7 validator checks every resource type, all invariants, terminology and profiles, but needs Java or a server round trip. This page gives instant structural feedback while you edit. Use both: this one during development, the HL7 validator before you claim conformance.
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.