Visual RFC.
ALL RFCs / RFC 5952
Read the RFC ↗
RFC 5952 / WRITE IPv6 ADDRESSES

Trim groups without changing bits

02

Remove padding at the beginning of each hexadecimal group, use lowercase letters, and leave a visible 0 for an all-zero group.

RFC 5952 · § 4.1EXAMPLE
4 / 4
Trim groups without changing bitsSeparate stages preserve eight values: 2001, db8, a0, 0, 1, ab, 2, 3. Suppress leading zeros, lowercase letters, and retain the single zero group. In particular 00A0 becomes a0 (decimal 160), not a (decimal 10). This address has no eligible zero run, so canonical output has no double colon.Keep one zero group visible2001db8a001ab232001:db8:a0:0:1:ab:2:3only one zero groupCanonical: keep :0: hereSingle-group :: remains valid input
04
Keep a lone zero visible.

Do not replace this single zero group with :: in canonical output. The output is shorter without changing the address.

Source for this drawing: RFC 5952 · Read RFC section 4.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

Shorter spelling must preserve every group value.

  • Leading zeros in each 16-bit field MUST be suppressed. An all-zero field MUST be represented as 0 before any eligible zero-run compression.
  • The hexadecimal characters a through f MUST be lowercase in canonical output. Uppercase remains legitimate input.
  • Remove leading zeros, never trailing digits: 00a0 becomes a0, not a. A lone zero group remains 0; :: MUST NOT shorten just one zero group.
DETAILS

The worked address has one zero group, so the final canonical form contains no double colon. Hexadecimal a0 is decimal 160; a is decimal 10. Lowercase changes spelling, not value.

Read the RFC section ↗

All chapters in RFC 5952

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 ↗