Skip to content

Payload

A payload is the actual content carried by a message, packet or vehicle, as opposed to the envelope, headers or structure that carries it; the term comes from 19th-century cargo shipping and was adopted by rocketry and computing.

Definition

What it is

The distinction between payload and envelope is older than computing. A ship carries cargo (payload) in a hull (envelope). A letter carries a message (payload) in an envelope. A rocket carries a satellite (payload) inside a fairing. Everywhere, the question "what is being delivered?" is answered by the payload.

In computing, the envelope is everything that helps the network or the protocol route the content: headers, cookies, MAC addresses, TLS certificates. The payload is everything that the recipient actually wants. A TCP packet has a TCP header (routing) and a payload (the bytes). An HTTP request has headers (metadata) and a body (payload). A JWT has a header and a payload (claims). A malware sample has an infection vector (envelope) and a payload (the code that does the damage).

Why it matters

When a developer mixes the two, tests, logs and security break. A payload logged is a privacy incident; a header not validated is a routing bug; a payload encrypted but not authenticated is tampered with. The distinction is not pedantic; it decides the boundary between what a system checks (envelope) and what a system processes (payload).

Envelope vs payload across layers

Layer

Envelope

Payload

Ethernet

MAC header

IP packet

IP

IP header

TCP segment

TCP

TCP header

Application bytes

HTTP

Request headers

Request body

JWT

Base64 header

Base64 claims (payload)

Malware

Delivery vector

Executable code

The envelope/payload stack

graph TD
  App[Aplicación] -->|TLS payload| TLS[TLS record]
  TLS -->|TCP payload| TCP[TCP segment]
  TCP -->|IP payload| IP[IP packet]
  IP -->|Ethernet payload| Eth[Ethernet frame]
  style App fill:#E8F5E9
  style Eth fill:#E8F5E9

How to use the term correctly

Using "payload" without confusion

  1. Name the layer

    "HTTP payload" and "TCP payload" are different objects. Say which one.

  2. Separate from metadata

    Metadata describes the payload; the payload contains the information. Keep them in different fields.

  3. Do not log payload

    Payloads contain user data. Logs contain metadata. Mixing them is a compliance incident.

  4. Validate the envelope, sanitize the payload

    The envelope must be validated for routing; the payload must be sanitized for the application.

Common failures

Origin

In the 19th century, a payload was the part of an aircraft's or ship's load that produced revenue: the cargo that paid for the trip, as opposed to fuel and crew. In rocketry (1940s–50s), the payload was the satellite or warhead the rocket carried into orbit or trajectory; the rocket itself was just the vehicle. In computing, the term entered through data communications in the 1960s to describe the data a packet carries, as distinct from the headers.

The payload is the actual cargo, what the vehicle carries and delivers. Everything else on board is there to make the delivery possible.

— Adapted from NASA, *Rocketry Basics*, 2018
s. XIX · "payload" como carga rentable en envíos
1940s · payload en cohetería (carga útil del cohete)
1960s · payload en comunicaciones de datos (bytes vs headers)
2000s · payload en seguridad (malware, exploits)
1500 · bytes típicos de payload en un paquete TCP medio

Evidence

FAQ

Payload vs body?

In HTTP, "payload" and "body" are often synonyms, but "payload" emphasizes the content-carrying role. RFC 9110 uses "content" for the request/response body.

Why does JWT call its claims "payload"?

Because the claims are the information the token carries, as opposed to the header that describes how the token is signed.

Is payload layer-relative?

Yes. Each layer's payload becomes the next layer's envelope. Context determines meaning.

Does "payload" imply security?

In security contexts, yes; "payload" often refers to malicious code. In networking, no; it just means content.

Connections

  • envelope
  • http-body
  • jwt
  • packet
  • metadata

Etymology

Origin: compound

  • pay (verb): from Old French payer, from Latin pacare, "to pacify" (via paying a debt)
  • load (noun): Old English lād, "a way, a carrying"

Semantic network

Payloadnetworkingdata-commuenvelopehttp-bodyjwtpacketMetadata

● broader ● narrower ● related

Broader

  • networking
  • data-communication

Related

Used in the garden

Sources