Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was going through the source code of an open source framework, where I saw a variable "payload" mentioned many times. Any ideas what "payload" stands for?

share|improve this question
up vote 50 down vote accepted

The term 'payload' is used to distinguish between the 'interesting' information in a chunk of data or similar, and the overhead to support it. It is borrowed from transportation, where it refers to the part of the load that 'pays': for example, a tanker truck may carry 20 tons of oil, but the fully loaded vehicle weighs much more than that - there's the vehicle itself, the driver, fuel, the tank, etc. It costs money to move all these, but the customer only cares about (and pays for) the oil, hence, 'pay-load'.

In programming, the most common usage of the term is in the context of message protocols, to differentiate the protocol overhead from the actual data. Take, for example, a JSON web service response that might look like this (formatted for readability):

            "message":"Hello, world!"

In this example, the string Hello, world! is the payload, the part that the recipient is interested in; the rest, while vital information, is protocol overhead.

Another notable use of the term is in malware. Malicious software usually has two objectives: spreading itself, and performing some kind of modification on the target system (delete files, compromise system security, call home, etc.). The spreading part is the overhead, while the code that does the actual evil-doing is the payload.

share|improve this answer
wow! Thanks a lot for such a great explanation. :) – Vishwas G Jul 30 '12 at 6:50
Nice explanation... tks =D – rizidoro Jun 18 '14 at 13:22
Your explanation hits bullseye. – pushya Jun 25 '15 at 15:44

I have met two meanings of Payload so far:

1) The essential data that is being carried within a packet or other transmission unit. The payload does not include the "overhead" data required to get the packet to its destination. Note that what constitutes the payload may depend on the point-of-view. To a communications layer that needs some of the overhead data to do its job, the payload is sometimes considered to include the part of the overhead data that this layer handles. However, in more general usage, the payload is the bits that get delivered to the end user at the destination.

2) The eventual effect of a software virus that has been delivered to a user's computer.

share|improve this answer
Sry!.. but what u mean by "overhead" data exactly ? And btw, i am mostly seeing the use of "payload" is being done in event dispatching and it's flow. – Vishwas G Jul 28 '12 at 19:00
The framing/overhead would be the stuff that's wrapped around the payload to get it where it needs to be, labelled as what it needs to be identified as. You can contrast it with a web request, which results in a bunch of headers that identify things about the actual page like the encoding, the size, the format, and so on. The payload is the actual page, which comes after the headers that enables the recipient to make sense of it. – Lars Viklund Jul 28 '12 at 19:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.