DevTools Logo

HTTP Header Builder

HTTP Header Builder

Assemble request headers and export them as a raw request, curl, or fetch — in your browser

Request

Method, URL, and headers

Examples

Compose a GET request

Input
method: GET
path: /api/users
host: example.com
header: Accept = application/json
Output
GET /api/users HTTP/1.1
Host: example.com
Accept: application/json

A request line, one header per line, then a blank line that marks the end of headers and the (empty) body.

Add a body to a POST request

Input
method: POST
path: /api/login
header: Content-Type = application/json
body: {"user":"ada"}
Output
POST /api/login HTTP/1.1
Host: example.com
Content-Type: application/json

{"user":"ada"}

The body follows the blank line after the headers; a Content-Type header tells the server how to parse it.

About this tool

An HTTP request is the raw text a client sends to a server: a request line (method, path, version), a block of headers, and an optional body. Being able to compose one precisely — for debugging a proxy, writing a cURL one-liner, or pasting into documentation — is a surprisingly common need, and assembling the bytes by hand is error-prone.

This builder turns a short form into the same request in three ready-to-paste forms: the raw HTTP message, an equivalent cURL command, and a JavaScript fetch call. Add a method and URL, then build up headers with autocomplete that suggests common names like Authorization, Content-Type, Accept and Cookie as you type.

Everything is generated in your browser. No request is ever sent — the tool is a pure composer, so you can build requests against internal or authenticated endpoints without anything leaving your device.

How to use

  1. Set the method and URL

    Pick the HTTP method and type the request URL, including path and query string.

  2. Add headers

    Add header name/value pairs; the autocomplete suggests common header names as you type.

  3. Switch format

    Use the Raw, curl, and fetch tabs to copy the request in the exact form your target needs.

Use cases

Reproducing a raw request for debugging

Paste the exact text an HTTP library or curl sends to see precisely what reaches the server, headers and all.

Hand-crafting requests for telnet or nc testing

Send a built request byte-for-byte to a server over a raw socket when a higher-level client hides the wire format.

Teaching the HTTP/1.1 message format

Show students the request line + header block + blank line + body structure without any library abstraction.

Common HTTP methods

MethodTypical use
GETRetrieve a resource without side effects
POSTCreate a resource or submit a body
PUT / PATCHReplace or partially update a resource
DELETERemove a resource
HEAD / OPTIONSInspect metadata or allowed methods

The request is composed locally and never sent.

Common mistakes

Mistake:Forgetting the blank line between headers and body.

Fix:HTTP requires an empty CRLF line after the headers. Without it the server keeps waiting for more headers and never reads the body.

Mistake:Putting the HTTP version on the wrong end.

Fix:The request line is `METHOD path HTTP/1.1` (version last). Reversing it produces a malformed request most servers reject.

Mistake:Splitting header name and value with anything other than a colon.

Fix:Headers are `Name: value`. Equals signs or dashes are not valid separators and will be treated as part of the name.

Frequently asked questions

References & standards