Skip to main content

HL7 v2 Message Parser & Inspector

Parse HL7 v2 messages into segments, fields and components with names

Raw message

Paste ER7 (pipe-encoded) text: CR, LF or CRLF separators and MLLP framing are accepted. The message stays in this tab.

Structure

Paste an HL7 v2 message
Or load an example. The summary, structure and diagnostics appear here.

Details

Select a segment or field
Choose a row in the structure to see its definition, raw and decoded values, repetitions and components.

What the inspector does

HL7 v2 Message Parser & Inspector reads ER7 (pipe-encoded) HL7 v2 messages and shows their exact positional structure: segments, fields, repetitions, components and subcomponents, with empty positions kept. Delimiters are read from MSH-1 and MSH-2, so custom separators work, and MSH numbering is handled correctly: MSH-1 is the field separator and MSH-2 the encoding characters. Escape sequences such as \F\ and \T\ are decoded while the raw value is kept next to the decoded one.

Definitions and versions

Field, component and table names come from HL7 v2 definitions for versions 2.1 to 2.9, loaded only for the version you need. Auto mode follows MSH-12; when the declared version is missing or not available (for example 2.9.1), the message is still parsed structurally and you can choose a version manually. Definition data is generated from the hl7v2-dictionary package by Panates (BSD-3-Clause), which is derived from HL7 schemas.

Limits

This is a parser and inspector, not a validator: it does not check message structures, cardinality, conditional rules, table values or implementation profiles. Schema warnings only point out unknown segments, data beyond the defined fields and invalid dates. Files up to 5 MB are accepted, but messages with more than about one million fields, repetitions, components and subcomponents (roughly 1 MB of typical lab messages) are rejected as too complex; messages over 200 KB are parsed in a background worker. MLLP framing is detected and stripped, but the tool never connects to an MLLP endpoint.

Privacy

HL7 messages usually contain protected health information. Parsing runs entirely in your browser: messages are not uploaded, stored, logged, added to the URL or sent to analytics, and related-tool links never carry the message. Use synthetic data in shared screenshots.

Frequently asked questions
Is my HL7 message uploaded or stored?
No. Parsing runs entirely in your browser. Messages are not uploaded, stored, logged, added to the URL or sent to analytics, and links to related tools never carry the message. Use synthetic data when you share screenshots.
Does the parser validate my HL7 message?
No. It shows the exact structure, names and data types from the HL7 definitions and reports parse errors, schema warnings such as unknown segments or invalid dates, and info notes. Full conformance validation depends on message structures, profiles and site agreements and is out of scope.
Why are my field numbers off by one in other tools?
MSH is special: MSH-1 is the field separator character itself and MSH-2 holds the encoding characters, so a naive split on the pipe shifts every MSH field by one. This parser numbers MSH fields the way the standard does, so MSH-9 is the message type and MSH-12 the version.

CodingTool is officially live on