Free Online Curl Command Builder
The Curl Command Builder creates ready-to-run curl commands without memorizing the flags. Pick a method, enter the URL, add headers and a body, and copy the finished command.
The reverse conversion is the cURL to Fetch Converter, and the equivalent client-side form is produced by the Postman to Fetch Converter. To inspect what the command returns, the HTTP Header Checker reads the response.
How to use the Curl Builder
- 1 Choose the HTTP method.
- 2 Enter the URL and add query parameters.
- 3 Add request headers, and a body for the methods that carry one.
- 4 Copy the generated curl command.
Curl as a debugging tool
A curl command is the reproducible form of an HTTP request. Everything a browser does implicitly — headers, cookies, content types, redirect handling — has to be stated, which makes curl the fastest way to find out which of those differences is causing a problem.
The most common use is taking a request that works in the browser and reproducing it outside, then removing pieces until it stops working. That isolates the requirement to a specific header or cookie, and it is far more reliable than reading the original code and guessing.
- `-X` sets the method explicitly.
- `-H` adds a header; repeat it for several.
- `-d` sends form-encoded data, `--data-binary` sends it as-is.
- Redirects are not followed unless asked for.
Frequently asked questions
When should I use -d rather than --data-binary?
`-d` strips newlines from the value and sets a form-encoded content type by default. For JSON payloads, `--data-binary` preserves the payload exactly and you set the content type header explicitly. Using `-d` with JSON that contains newlines silently alters what is sent, which produces confusing server errors.
What do the -s and -v flags do?
`-s` suppresses the progress meter, which is what you want in a script. `-v` prints the full request and response including headers, which is what you want when debugging. They solve opposite problems, and using `-v` while capturing output to a file usually means the headers end up in the file.
How do I send a request that does not follow redirects?
Curl does not follow redirects by default, which is worth knowing because the opposite is often assumed. Adding the follow flag makes it follow them, and the location flag restricts how many hops it will accept. For debugging an authentication flow, following redirects while printing each response is often the clearest way to see what happens.
Related Developer Tools
You might also need
Tools from other categories that people pair with the Curl Builder: