Visual RFC.
ALL RFCs / RFC 3986
Read the RFC ↗
RFC 3986 / ENCODING

Escape data, preserve delimiters

02

Percent encoding represents an octet with a percent sign and two hexadecimal digits.

RFC 3986 · § 2.1EXAMPLE
4 / 4
04
Avoid changing meaning twice.

%252F decodes once to %2F, not directly to a delimiter.

Escape data, preserve delimitersSide-by-side path sketches contrast a separator with encoded data, then distinguish normalization from double decoding.A slash can be structure or data/a/b/a%2Fbtwo path segmentsone path segmentaba / bescaped slash is data%7E ⇄ ~unreserved character: safe normalization%252F → %2Fdecode once; do not reinterpret it again

Key idea: An encoded delimiter can mean something different from the delimiter itself.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Unreserved characters are letters, digits, hyphen, period, underscore, and tilde.
  • A reserved character used as data must be percent-encoded when it would conflict with a delimiter.
  • Do not encode or decode the same string more than once.

The examples simplify the wire representation. Follow the linked specification and application profile for implementation.

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

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

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.

All chapters in RFC 3986

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 ↗