Developer Tools
cURL Command Builder
Build a cURL command from a URL, method, headers, body, and auth. Get equivalent PowerShell, HTTPie, wget, fetch, and raw HTTP output in one click.
cURL command builder
The URL is parsed in your browser. Existing query parameters merge with the rows below.
Query parameters
Appended after the ? in the final URL. Disable a row to keep it for later without removing it.
Request headers
Standard HTTP headers. Authorization is added automatically below; Content-Type follows the body type when not set.
Authorization
Renders as Authorization: Bearer <token>. Paste your access token; do not include the word Bearer.
Request body
Body will be compacted before sending. Content-Type defaults to application/json.
Command output
Live preview. Switch tabs for each runtime.
Linux, macOS, and any POSIX shell. Single-quoted, multi-line.
curl 'https://api.example.com/v1/orders?status=open&limit=20' \
-X 'POST' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
-H 'Content-Type: application/json' \
--data-raw '{"customer_id":42,"items":[{"sku":"ABC-1","qty":2}]}'Final request URL
https://api.example.com/v1/orders?status=open&limit=20
Effective request
Method
POST
Headers
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Content-Type: application/json
Body (52 chars)
{
"customer_id": 42,
"items": [
{
"sku": "ABC-1",
"qty": 2
}
]
}Every output, side by side
Same request expressed in each runtime. Copy whichever your team uses.
cURL (Bash)
curl 'https://api.example.com/v1/orders?status=open&limit=20' \
-X 'POST' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
-H 'Content-Type: application/json' \
--data-raw '{"customer_id":42,"items":[{"sku":"ABC-1","qty":2}]}'cURL (Windows)
curl.exe "https://api.example.com/v1/orders?status=open&limit=20" -X "POST" -H "Accept: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" -H "Content-Type: application/json" --data-raw "{\"customer_id\":42,\"items\":[{\"sku\":\"ABC-1\",\"qty\":2}]}"PowerShell
$uri = 'https://api.example.com/v1/orders?status=open&limit=20'
$headers = @{
'Accept' = 'application/json'
'Authorization' = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
'Content-Type' = 'application/json'
}
$body = @'
{
"customer_id": 42,
"items": [
{
"sku": "ABC-1",
"qty": 2
}
]
}
'@
Invoke-RestMethod -Uri $uri -Method POST -Headers $headers -Body $body -ContentType 'application/json'HTTPie
http POST \
"https://api.example.com/v1/orders?status=open&limit=20" \
'Accept:application/json' \
'Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
'Content-Type:application/json' \
--raw '{"customer_id":42,"items":[{"sku":"ABC-1","qty":2}]}'wget
wget 'https://api.example.com/v1/orders?status=open&limit=20' \
--method='POST' \
--header='Accept: application/json' \
--header='Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header='Content-Type: application/json' \
--body-data='{"customer_id":42,"items":[{"sku":"ABC-1","qty":2}]}' \
-q -O -JavaScript fetch
const response = await fetch("https://api.example.com/v1/orders?status=open&limit=20", {
method: "POST",
headers: {
"Accept": "application/json",
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"Content-Type": "application/json",
},
body: JSON.stringify({
"customer_id": 42,
"items": [
{
"sku": "ABC-1",
"qty": 2
}
]
}),
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();Raw HTTP/1.1
POST /v1/orders?status=open&limit=20 HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Content-Type: application/json
Content-Length: 52
{"customer_id":42,"items":[{"sku":"ABC-1","qty":2}]}What gets escaped and why
Bash single quotes
Each header, URL, and body is wrapped in single quotes so the shell does not expand variables. Internal apostrophes are closed, escaped, and reopened (the classic '\'' dance), so JSON with JavaScript-style strings keeps its meaning.
cmd.exe double quotes
Windows curl.exe is invoked from cmd.exe, which uses double quotes. Internal double quotes are escaped with a backslash, and backslashes are doubled so a literal Windows path survives the shell.
PowerShell here-strings
JSON bodies are emitted inside a single-quoted PowerShell here-string (@'...'@) so $ signs and backticks inside the JSON are not interpreted as variables or escape sequences.
Content-Length and UTF-8
The raw HTTP/1.1 preview calculates Content-Length from the UTF-8 byte size of the body using TextEncoder, not from the JavaScript string length, so multi-byte characters do not break the request.
Nothing on this page is sent to a server. URLs, tokens, and bodies stay in your browser tab.
How to use
- Pick an HTTP method and type the request URL. Existing query parameters in the URL are merged with the rows below.
- Add query parameters, headers, and either Basic or Bearer authorization. Disable a row without deleting it by clearing its checkbox.
- Choose a body mode (JSON, Form, or Raw) and fill in the body. JSON is validated and compacted automatically.
- Switch the output tabs to see the same request rendered as cURL Bash, cURL Windows, PowerShell, HTTPie, wget, fetch, or raw HTTP/1.1.
- Click any Copy button to grab the generated command, the final URL, or the equivalent output for another runtime.
About this tool
cURL Command Builder turns a structured API request into a paste-and-run command for the runtime you actually use. Pick the HTTP method, type the URL, add query parameters as rows (existing parameters in the URL merge in automatically), list any request headers, choose Basic or Bearer auth, and pick a body mode (JSON, application/x-www-form-urlencoded, or raw text). The tool emits seven equivalent outputs at once: cURL for Bash and POSIX shells (single-quoted with correct escaping of internal apostrophes), cURL for Windows cmd.exe and curl.exe (double-quoted, one line), PowerShell Invoke-RestMethod with a $headers hashtable and a single-quoted here-string for JSON bodies, HTTPie using its Key:Value header and --raw body syntax, GNU wget with --method, --header, and --body-data, browser or Node 18+ fetch with async/await and a typed body, and the raw HTTP/1.1 wire request with Host, Accept, and a Content-Length computed from the UTF-8 byte length of the body. JSON bodies are compacted before sending and validated live, an invalid JSON shows a warning instead of silently failing, and a final URL preview shows the exact target after query parameters and the existing URL search string have been merged. Useful for writing API documentation, sharing reproducible repro commands in a bug report, switching the same request between a Mac terminal and a Windows CI job, or generating the JavaScript fetch call for a test harness. Everything is computed in your browser; the URL, headers, tokens, and bodies you type here never leave the page.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
cURL to Fetch Converter
Convert curl into fetch, Node fetch, axios, or XHR JavaScript.
Open tool
DeveloperAuthorization Header Generator
Build Basic, Bearer, and custom Authorization headers with copy-paste request snippets.
Open tool
DeveloperCORS Headers Generator
Build Access-Control headers with live validation and Apache, Nginx, Vercel, Netlify, Next.js, Worker, and Express snippets.
Open tool
DeveloperURL Parser
Break a URL into protocol, host, path, query params, and fragment with decoded values.
Open tool
DeveloperURL Encoder Decoder
Encode and decode percent-encoded URLs.
Open tool
DeveloperHTTP Headers Parser
Parse, classify, and decode HTTP headers, with a missing security headers audit.
Open tool