Request Payload Builder

Build HTTP request bodies visually — JSON, form-data, URL-encoded, XML, GraphQL, and raw.

JSON Fields

Request Headers

Content-Type application/json
Accept application/json

These headers should be included in your request.

Preview

55 B
{
  "name": "John Doe",
  "age": 30,
  "active": true
}

Snippet

fetch('/api/endpoint', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
});

About Request Payload Builder

The Request Payload Builder is a free, browser-based tool that lets developers visually construct HTTP request bodies without writing JSON or form data by hand. Whether you're testing REST APIs, building GraphQL queries, or crafting XML payloads, this tool generates properly formatted output instantly with a live preview.

How to Use

  1. Select the body format: JSON, Form Data, URL-Encoded, XML, GraphQL, or Raw.
  2. Add key-value pairs using the field builder, or type your query directly.
  3. Watch the live preview update on the right as you type.
  4. Copy the payload with one click, or download it as a file.
  5. Use the snippet panel for a ready-made fetch() call.

Supported Payload Formats

JSON

Build nested objects and arrays with type-safe fields. Ideal for REST APIs.

Form Data

multipart/form-data for file uploads and HTML form submissions.

URL-Encoded

application/x-www-form-urlencoded for classic form submissions.

XML

application/xml payloads for SOAP APIs and legacy integrations.

GraphQL

Query + variables bundled into a proper JSON body for GraphQL endpoints.

Raw

Plain text, HTML, CSV, or binary with a custom Content-Type header.

Common Use Cases

  • Prototyping API requests before writing client code
  • Generating test payloads for Postman, Insomnia, or curl
  • Debugging webhook payloads and event schemas
  • Building GraphQL query bodies for automated scripts
  • Creating XML payloads for SOAP or legacy enterprise APIs
  • Teaching HTTP fundamentals with interactive examples

FAQ

Is my data sent to a server?

No. All payload generation happens entirely in your browser. Nothing is transmitted or stored.

Can I build nested JSON objects?

Yes. Set a field type to "object" or "array" to add child fields and build nested structures.

What does the "Pretty" toggle do?

It switches between indented, human-readable output and compact minified output for JSON and XML.

Can I use this for GraphQL subscriptions?

You can build the query body here. Actual subscription transport (WebSocket) is outside the scope of a payload builder.