cURL Command Builder
Fill in the method, URL, headers and body and get a correctly quoted curl command, with options for redirects, compression and basic auth.
Processed on your device. Files are not uploaded
How to build a curl command
Enter the request
Method, URL, headers and body.
Set the options
Redirects, compression and basic auth.
Copy or download
Run the command in your terminal.
Worked example
This is what cURL Command Builder gives for its own sample values. Open the tool above and change anything to try your own.
- Method
- POST
- URL
- https://api.example.com/v1/items
- Basic auth as user:password (optional)
- Follow redirects (-L)
- No
- Ask for a compressed response (--compressed)
- No
- Skip certificate checks (-k, for testing only)
- No
curl command
curl 'https://api.example.com/v1/items' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{"name":"Ada"}'About cURL Command Builder
Build a curl command without worrying about quoting. Headers go one per line, the body is wrapped safely even if it has quotes, and the command is laid out over several lines so it is easy to read.
FAQs
Why is the body in single quotes?
So the shell does not change dollar signs, backticks or double quotes inside it.
What does -k do?
It skips certificate checks. Use it for local testing only.
Can I turn it into code?
Use cURL to Code Converter.