EDIFACT UNT segment: message trailer.

The UNT segment closes an individual message and carries two values: the total number of segments in the message (including UNH and UNT) and the message reference number matching the UNH. If the segment count does not match, the message is malformed.

Tag
UNT
Full name
Message trailer
Part of the message
Summary and trailers
Data elements
2

A UNT segment, explained

Hover any part of the segment to see what it is. Open What your system receives to see the JSON or XML CleanEDI delivers.

  1. UNT+36+1'
    UNTMessage trailer

    End of message 1. Declares 36 segments.

    UNT
    Message trailer

UNT structure

Elements are separated by + and their parts by :. Positions match the explainer, so 2.3 is the third part of the second element.

PositionElementParts
1Segment countSingle value
2Message referenceSingle value

Common EANCOM and UN/EDIFACT values. Your trading partner's implementation guide is the final word on which codes they send.

UNT segment FAQ

Have a real message with UNT in it? The explainer breaks down every segment and runs in your browser.

Explain my message

What is the UNT segment in EDIFACT?

UNT is the Message Trailer segment. The UNT segment closes an individual message and carries two values: the total number of segments in the message (including UNH and UNT) and the message reference number matching the UNH. If the segment count does not match, the message is malformed.

Where does UNT appear in an EDIFACT message?

UNT belongs to the summary and trailers part of a message, alongside UNS, CNT, UNZ.

How do I read a UNT segment in my own message?

Paste the message into the free CleanEDI explainer. It breaks every UNT segment into its elements, translates the codes and shows the JSON and XML your system would receive. Nothing you paste leaves your browser.

Related segments in summary and trailers