Visual RFC.
ALL RFCs / RFC 2781
Read the RFC ↗
RFC 2781 / UTF-16 REPRESENTATION

Serialize each unit in the declared byte order

03

Big-endian writes a 16-bit unit’s higher-order byte first. Little-endian writes its lower-order byte first; it does not reverse the order of the code units.

RFC 2781 · § 3.1EXAMPLE
4 / 4
Serialize each unit in the declared byte orderSameorderedpair serializes littleendian08D845DF, not whole-array reversal.Serialize bytes inside each unit; retain unit orderOrdered units: high D808, then low DF45D808DF45Little-endian: low byte first08D845DFEach adjacent pair still belongs to its original unitSchematic byte fields; little-endian does not reverse the whole array
04
Serialize the pair in little-endian order

The same ordered units D808 DF45 become bytes 08 D8 45 DF. Reversing the whole four-byte sequence would be a different, wrong operation.

Source for this drawing: RFC 2781 · Read RFC source: § 3.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

The RFC’s numeric unit 0102 serializes as bytes 01 02 in big-endian and 02 01 in little-endian.

  • The RFC’s numeric unit 0102 serializes as bytes 01 02 in big-endian and 02 01 in little-endian.
  • A surrogate pair stays high unit then low unit in either byte order. Only the two bytes within each unit exchange order.
  • A byte-order label describes the wire serialization, not the processor’s native hardware order.
DETAILS

Field widths are schematic. A code point, a 16-bit code unit and an eight-bit byte are different objects. No assumption about host memory order is needed for these chosen serializations.

Read the RFC section ↗

All chapters in RFC 2781

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗