HL7 transport utility

MLLP Frame Inspector & Encoder

Inspect HL7 v2 MLLP streams, validate VT–FS–CR boundaries, extract individual messages, display invisible control characters, view raw bytes, or wrap plain HL7 in MLLP.

Privacy reminder. Do not paste real patient data, credentials, production identifiers, or confidential messages. Use synthetic/test HL7 only.

Inspector and encoder

Paste an MLLP stream or plain HL7

Use raw control characters, visible tokens such as <VT> and <FS>, escaped notation such as \x0B, or a hex byte sequence.

Raw VT, FS, and CR characters may be invisible in the input box. The output views make them explicit.

No stream loadedPaste an MLLP stream or plain HL7 message.

Stream diagnostics will appear here.

Supported in this version

Focused MLLP transport diagnostics

Frame boundaries

Detects the MLLP start block VT (0x0B), end block FS (0x1C), and required trailing CR (0x0D).

Multiple messages

Splits multiple frames from one pasted stream and lets you inspect each payload separately.

Input representations

Accepts raw controls, \xNN/\uNNNN escapes, visible VT/FS/CR tokens, and hexadecimal bytes.

HL7 checks

Summarises MSH message type, control ID, version, segment count, and CR versus CRLF/LF line endings.

Encoding actions

Wraps plain HL7 with VT … FS CR, normalises segment separators to CR, and unwraps the selected frame.

Deliberate limits

No network connection, socket testing, TLS, character-set conversion beyond UTF-8 display, or site-specific interface-profile validation.

FAQ

MLLP inspector questions

What is a valid MLLP frame?

A normal frame begins with VT (0x0B), contains the HL7 payload, ends with FS (0x1C), and is immediately followed by CR (0x0D). The HL7 payload itself normally uses CR between segments.

Why can I not see the framing characters?

VT, FS, and CR are control characters and are usually invisible in ordinary text boxes. Use Visible controls, Escaped frame, or Hex dump to see them explicitly.

Does MLLP use CRLF?

The frame terminator is FS followed by CR. HL7 v2 segment separators are also normally CR. Some systems add LF characters, which this tool preserves and flags for review.

Can this test an MLLP server?

No. It is a local framing and byte-inspection tool; it does not open a TCP connection or transmit messages.

Can I paste real patient messages?

No. Use synthetic, anonymised, or test data only.

Practical guide

Separate HL7 payload problems from MLLP framing problems

MLLP is a lightweight byte-framing convention commonly used to carry HL7 v2 messages over a TCP connection. It defines where a message begins and ends; it does not define the HL7 fields, acknowledgement meaning, socket lifecycle, retries, or encryption.

Standard frame boundaries

  • Start block: vertical tab, byte 0x0B, often displayed as <VT>.
  • Payload: the HL7 message, normally with carriage return 0x0D between segments.
  • End block: file separator, byte 0x1C, displayed as <FS>.
  • Final terminator: carriage return, byte 0x0D, displayed as <CR>.

Recommended workflow

  1. Paste the captured text, escaped representation, or bytes available from the sender or receiver log.
  2. Confirm exactly one start block exists before each message.
  3. Confirm each frame ends with FS followed by CR.
  4. Unwrap the payload and inspect its segment boundaries separately.
  5. When multiple frames are present, verify that bytes between frames are expected and that no message is truncated.

Worked example

Recognise the frame in text and hexadecimal form

<VT>MSH|^~\&|SENDER|FACILITY|RECEIVER|FACILITY|...<CR>
PID|1||12345^^^HOSPITAL^MR||TEST^ALEX<CR><FS><CR>

Hex boundaries: 0B ... 1C 0D

The carriage return before FS terminates the final HL7 segment and is part of the payload. The carriage return after FS terminates the MLLP frame. They serve different purposes even though both use byte 0x0D.

Troubleshooting

Framing faults that commonly cause timeouts

Common faults

  • Sending plain HL7 without the initial 0x0B when the receiver expects MLLP.
  • Ending with CR alone instead of FS followed by CR.
  • Using the printable characters “0B” and “1C” rather than the control bytes.
  • Adding line feeds around the control characters when the receiver treats them as unexpected data.
  • Concatenating frames without a complete end boundary or dropping a boundary during log copying.

TCP and tool limitations

A TCP read can return part of a frame, one frame, or several frames. Correct receivers buffer bytes until a complete MLLP boundary is available. A packet capture may therefore look incomplete even when the full application stream is valid.

This browser tool inspects supplied data; it does not open a TCP socket, test TLS, measure network timing, or prove how the remote endpoint buffers and acknowledges messages.

Authorship and review

Practical guidance backed by integration experience

Maintained and technically reviewed by Health Data Tools, drawing on more than 15 years of healthcare integration experience across HL7, FHIR, CDA, APIs, PKI, and clinical integration systems.

Technically reviewed:

Official references

Standards and further reading

These references support the technical context. Local implementation guides, vendor profiles, and receiving-system rules still take precedence for a specific interface.