Skip to content
ZeroServer.tools

HTTP Request Builder

Build and preview raw HTTP requests — method, URL, headers, and body — then export as raw format or curl.

Presets:

Target request endpoint URL

Headers

HTTP preview updated. Method: GET, target host: api.example.com.

Target Host

api.example.com

Method

GET

Headers Count

2

Body Payload Size

20 Bytes

Total Request Size

108 Bytes

How the HTTP request builder works

A raw HTTP request consists of a request line (METHOD /path HTTP/1.1), followed by headers, an empty line, and optionally a body. The curl export wraps the same information in a command you can run in any terminal. Use this builder to prototype API requests before writing code, or to generate curl snippets for documentation.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Composing a raw HTTP request to see exactly what will be sent.
  • Building a request and exporting it as a curl command.
  • Checking header ordering and the request line before sending.
  • Producing a request to paste into a bug report.
  • Learning the raw wire format rather than a client library's abstraction.

Frequently Asked Questions

What does the builder actually produce?
A request expressed several ways at once — the raw HTTP text, a `curl` invocation, and code — from one set of method, URL, headers and body. The value is seeing the same request in each form, which is what makes an unfamiliar syntax readable rather than something to look up.
Why does shell quoting matter in the curl output?
Because a JSON body is full of characters the shell interprets. A single unescaped quote inside a `-d` argument ends the string early and the rest of the payload becomes shell tokens. The quoting here is a shared, tested primitive precisely because six hand-rolled versions of it were each wrong differently.
Which methods can carry a body?
POST, PUT and PATCH conventionally do; GET, HEAD and OPTIONS conventionally do not. The HTTP spec does not forbid a GET body, but intermediaries and servers are inconsistent about it — some drop it, some reject the request — so a GET body is unreliable in practice regardless of what the RFC permits.
Do I need a Content-Type header?
For any request with a body, yes. Without it the server guesses, and a JSON payload sent without `application/json` is commonly parsed as form data, which fails in a confusing way — the request succeeds, the fields arrive empty. Include the charset for text types.
Is a request sent from this page?
No — it builds the request text for you to run elsewhere. That is deliberate: a browser cannot make arbitrary cross-origin requests anyway, so a fetch from here would fail CORS on most real APIs and would also mean putting your Authorization header through someone else's page.

Common errors and gotchas

  • Omitting the Host header, which HTTP/1.1 requires.
  • Getting the line endings wrong, since the protocol requires CRLF rather than LF.
  • Setting a content-length that does not match the body's byte count.
  • Forgetting the blank line between headers and body, without which the body is read as a header.
  • Assuming a raw request works over HTTP/2, whose framing is entirely different.

Related Developer Utilities tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate