Build an HTTP request visually, then export it as curl, fetch, axios, Python or Go.
Tip: use samples, upload, copy, download, and send-to actions inside the workspace where available.
API Request Builder is a free, browser-based tool that helps you convert between formats. Build an HTTP request visually, then export it as curl, fetch, axios, Python or Go. It's built for speed and privacy: Everything runs locally in your browser — your data is never uploaded to a server. No sign-up, no installs, and no daily limits.
Start with the source file or pasted payload, then confirm delimiters, headers, and field handling before conversion.
Review the preview, copy or download the result, and keep everything local in your browser.
API Response Inspector: Inspect a response's shape, status, caching and rate-limit signals.
Open toolHTTP Header Analyzer: Grade security headers, explain every header, and simulate CORS preflight.
Open toolGraphQL Query Formatter: Format, minify and cost-analyse GraphQL queries and fragments.
Open toolRequests: https://api.example.com/v1/orders?expand=customer
| Header | Value | Source |
|---|---|---|
| Accept | application/json | explicit |
| X-Request-ID | req_01HZY3 | explicit |
| Authorization | Bearer sk_test_51H8xY2 | derived |
| Content-Type | application/json | derived |
Body is 111 bytes.
curl \
-X POST \
'https://api.example.com/v1/orders?expand=customer' \
-H 'Accept: application/json' \
-H 'X-Request-ID: req_01HZY3' \
-H 'Authorization: Bearer sk_test_51H8xY2' \
-H 'Content-Type: application/json' \
-d '{
"customer_id": "cus_9f2a",
"currency": "gbp",
"items": [
{ "sku": "PRO-SEAT", "quantity": 3 }
]
}'const response = await fetch("https://api.example.com/v1/orders?expand=customer", {
method: "POST",
headers: {
"Accept": "application/json",
"X-Request-ID": "req_01HZY3",
"Authorization": "Bearer sk_test_51H8xY2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"customer_id": "cus_9f2a",
"currency": "gbp",
"items": [
{ "sku": "PRO-SEAT", "quantity": 3 }
]
}),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status} ${response.statusText}`);
}
const data = await response.json();POST /v1/orders?expand=customer HTTP/1.1
Host: api.example.com
Accept: application/json
X-Request-ID: req_01HZY3
Authorization: Bearer sk_test_51H8xY2
Content-Type: application/json
Content-Length: 111
{
"customer_id": "cus_9f2a",
"currency": "gbp",
"items": [
{ "sku": "PRO-SEAT", "quantity": 3 }
]
}Nothing is sent. This builds the command and the code; it never performs the request, which is also why it can safely hold a real token — the value stays in your browser and is not transmitted anywhere.
curl infers POST from a body. Supplying -d without -X silently switches the method, and on a redirect curl will downgrade it to GET unless you pass --post301.
An explicit header always wins. If you set Content-Type yourself, that value is used verbatim rather than the one implied by the body type — which is exactly what a real client does, and the usual cause of a mysterious 415.
Multipart boundaries belong to the client. That is why the multipart mode never emits a Content-Type: setting one by hand without a matching boundary breaks the upload.