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.