Visual RFC.
ALL RFCs / RFC 7578
Read the RFC ↗
RFC 7578 / MULTIPART FORM DATA

Separate values with a boundary

01

A form body can carry several values. A boundary is a chosen marker that separates its parts; it is not a password or a label for the file type.

RFC 7578 · § 4.1EXAMPLE
4 / 4
04
Choose an unambiguous marker.

A candidate value containing a line beginning --Picnic conflicts with this boundary. The sender must choose another boundary before constructing this body; no valid transmission is drawn.

Separate values with a boundaryA candidate value containing a line beginning --Picnic conflicts with this boundary. The sender must choose another boundary before constructing this body; no valid transmission is drawn.A collision stops this candidateCandidate boundary: PicnicPart data contains:CRLF --PicnicconstructionNo body sentChoose another boundary before encoding

Key idea: The boundary parameter and delimiter lines must agree; a delimiter MUST NOT occur inside a part.

Terms

Look up a term in the glossary ↗

Rules & examples
  • The media type is multipart/form-data and its boundary parameter is required. The format is transport-independent; the browser and receiving web application here are one example, not the only possible users.
  • Each part has headers, an empty line, then its data. Delimiter lines use two leading hyphens and the boundary value. CRLF means the two bytes carriage return and line feed.
  • The delimiter after the final part has two extra trailing hyphens. A delimiter between parts does not close the body. RFC 2046 section 5.1.1 supplies this MIME framing; verified erratum 4676 corrects the misplaced hyphens in RFC 7578 section 4.6.
  • The delimiter MUST NOT appear inside an encapsulated part. Choose a different boundary if it would collide. Boundary values can need quoting. Construct each delimiter by adding two hyphens to the actual parameter value, even if that value itself starts with hyphens.
  • The worked boundary Picnic is a short fictional fixture. MIME boundary values are limited to 70 characters excluding the two delimiter hyphens. No HTTP method, request length or transport security is specified by this body format.

The drawing labels empty lines and CRLF for explanation; those labels are not transmitted text. The bounded teaching encoder accepts a conservative ASCII boundary/header subset, emits exact bytes, and rejects delimiter-prefix collisions. It is not a streaming MIME parser or a browser form implementation.

Sources
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.

All chapters in RFC 7578

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 ↗