Visual RFC.
ALL RFCs / RFC 2397
Read the RFC ↗
RFC 2397 / INLINE DATA URLS

Decode percent escapes as bytes

03

Percent encoding represents one byte with two hexadecimal digits; it is not a Unicode character escape or form-field encoding.

RFC 2397 · § 3EXAMPLE
3 / 3
Decode percent escapes as bytesThree percent-decoding cases. The RFC example A percent20 brief percent20 note recovers A brief note. The published original percentbe percentfg percentbe contains non-hex g and is stopped by this teaching decoder. Verified erratum2009 corrects the payload to percentbe percentd3 percentbe, producing octets BE D3 BE; no Greek charset rendering is performed. Erratum2045 separately fixes the grammar import to uric. Percent decoding recovers bytes, not Unicode code points.Percent escapes represent octets%be%d3%beeach %xx → one byteBE D3 BEcharset interpretation is separateVerified correction: %d3 replaces %fg
03
Use the verified corrected bytes.

The corrected %be%d3%be yields BE D3 BE. The diagram stops at octets; it does not claim that each byte is an independent Unicode character.

Source for this drawing: RFC 2397 · Read RFC section 3 ↗

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

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

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.

What changed
RFC2397 §4 original exampleVerified errata2009 and2045

Erratum2009 corrects %fg to %d3. Erratum2045 changes the imported grammar name to uric. Held/reported proposals about parameter quoting are not verified corrections.

Read the updated RFC section ↗
KEY POINT

Recover bytes before interpreting their charset.

  • Without ;base64, safe URL characters represent their ASCII bytes and %xx represents an octet, an eight-bit byte. Hex digits range from 0 to 9 and A to F, case-insensitively.
  • Verified erratum2009 replaces invalid %fg in the Greek-charset example with %d3. The corrected payload %be%d3%be gives bytes BE D3 BE; the declared charset governs any later character interpretation.
  • Verified erratum2045 corrects the imported grammar name from undefined urlchar to uric in RFC2396. Escape characters that would conflict with URL or parameter syntax; do not treat arbitrary raw spaces or quoted strings as safe URL content.
DETAILS

The published A%20brief%20note example yields A brief note. A plus sign is a literal plus byte here, not the space conversion used by some form encodings. The teaching decoder rejects malformed escapes rather than guessing a byte; that error UI is a chosen implementation policy. Errata3214/4124 are Held for Document Update,5923 is Reported and3360 Rejected; none is silently adopted as a verified replacement. The model does not implement a Greek or full MIME charset decoder.

Read the RFC section ↗

All chapters in RFC 2397

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 ↗