curl Command Builder
NewBuild a curl command from a friendly UI — shell-safe quoting.
curl Command Builder
How was your experience with this tool?
Found a bug? Missing a feature? Tell us — it takes 10 seconds.
See how it works
Watch a quick simulation of this tool in action — no file needed.
How to use curl Command Builder
Follow these steps — everything happens instantly in your browser.
- 1
Step 1. Set method, URL, headers, body, query params and auth.
- 2
Step 2. Toggle -k (insecure) and -L (follow redirects).
- 3
Step 3. Review the generated curl command.
- 4
Step 4. Copy and paste into your terminal.
curl Command Builder: Generate Correct Requests Every Time
Why hand-writing curl goes wrong
curl is the universal way to test an HTTP endpoint from a terminal, but its flag syntax is unforgiving. A method needs the uppercase flag, each header needs its own header flag with a colon-separated name and value, and a JSON body must be quoted so the shell does not split it on spaces or interpret its braces. Miss one and you get a cryptic error or, worse, a request that silently sends the wrong thing.
The builder assembles the command for you from simple fields, so the flags, quoting, and ordering are always correct. You describe the request; it produces a command you can paste straight into a terminal.
The result uses long-form flags where they aid readability and wraps the JSON body in single quotes so inner double quotes survive the shell.
Anatomy of a curl command
A complete request has four parts, and the builder maps a field to each:
| Part | curl flag | Example value |
| --- | --- | --- |
| HTTP method | request flag | POST |
| Headers | header flag (repeatable) | Content-Type: application/json |
| Request body | data flag | a JSON object |
| URL | positional | an API endpoint |
Headers repeat — you add one flag per header. The body flag also implies a POST when no method is set, which is a frequent surprise when people expect a GET.
How to build a command
Choose the HTTP method (GET, POST, PUT, PATCH, DELETE).
Enter the full URL of the endpoint you are calling.
Add each header as a name and value pair; the tool formats them with the correct flag.
Paste a request body if needed — the tool quotes it so it survives the shell.
Copy the generated command and run it in any terminal.
Testing the generated command
Run the command and read the response headers first. A 2xx status means the request was well-formed; a 401 or 403 points at a missing or wrong auth header; a 400 usually means the body was malformed or the Content-Type header was missing.
If the shell complains about an unexpected token, the body quoting is the culprit — a JSON body wrapped in single quotes keeps its inner double quotes intact, which is why the builder defaults to that style.
Common mistakes
Omitting the Content-Type header on a JSON POST, so the server refuses to parse the body.
Wrapping a JSON body in double quotes in the shell, which then swallows the inner quotes.
Forgetting that a data flag turns the request into a POST unless a method is set explicitly.
Putting a space in a header value without quoting, which splits it into two arguments.
Where a builder helps
Reproducing an API call from documentation without memorizing every flag.
Sharing a request with a teammate in a bug report so they can run the exact call.
Converting a request you built in a GUI client into a terminal command for a script.
Teaching HTTP basics where the mapping from parts to flags needs to be visible.
Frequently asked questions
Q: Does the data flag force a POST?
A: Yes. If you supply a body but no method, curl defaults to POST. Set the method explicitly if you need PUT or PATCH.
Q: Why single quotes around the JSON body?
A: Single quotes stop the shell from interpreting the inner double quotes and braces, so the body reaches the server intact.
Q: Does the tool send the request?
A: No. It only builds the command text locally; you run it yourself in a terminal.
Q: Can I add a bearer token?
A: Yes — add a header named Authorization with the value set to Bearer followed by your token.
Build your curl command now
Open the curl Command Builder. For related HTTP work, check HTTP Status Codes, decode a token with the JWT Decoder, or tidy a response with the JSON Formatter.
Want the extended step-by-step tutorial? Read it here.
Why use this tool
Private by design
All processing happens locally in your browser. Open DevTools → Network and you'll see zero file uploads. Ever.
Instant
No upload wait, no queue, no server round-trip. Results appear the moment you drop a file.
Free & unlimited
No accounts, no watermarks, no daily caps. Use it as many times as you like, forever.
Works everywhere
Desktop, tablet or phone — every tool is responsive and installable as a PWA for offline use.
Frequently asked questions
Everything you might want to know about curl command builder.
❤️ This tool is free — forever.
Sharing it helps more people discover it, and ad revenue from visitors is what keeps it free. No accounts, no catch.
HTTP Status Codes Reference
Searchable reference of 60+ HTTP status codes — click to copy.
HTTP Headers Decoder
Parse and annotate raw HTTP headers — 60+ known headers.
JWT Decoder
Inspect JWT header and payload — no signature verification.
JSON Formatter
Beautify, minify and validate JSON — 100% in your browser.