curl Cheatsheet
The most used curl commands, ready to copy and paste.
Fill in your values
Enter your own values below and every matching command updates automatically.
Make a GET request
curl <URL>
Follow redirects
curl -L <URL>
Save the response to a file
curl -o <Output File> <URL>
Download and save using the remote filename
curl -O <URL>
Send a POST request with a JSON body
curl -X POST -H "Content-Type: application/json" -d '<Data (JSON body)>' <URL>
Send a custom request header
curl -H "<Header>" <URL>
Include response headers in the output
curl -i <URL>
Fetch only the response headers
curl -I <URL>
Make a silent request (no progress meter)
curl -s <URL>
Authenticate with basic auth
curl -u <Username>:<Password> <URL>
Show verbose request and response details
curl -v <URL>
Send a PUT request with a body
curl -X PUT -d '<Data (JSON body)>' <URL>
Send a DELETE request
curl -X DELETE <URL>
Upload a file as form data
curl -F "file=@<File Name>" <URL>
Retry a failed request a few times
curl --retry 3 <URL>
Set a request timeout (in seconds)
curl --max-time 30 <URL>
Fail silently on server errors (no HTML error body)
curl -f <URL>
Resume a partial download
curl -C - -O <URL>
No commands match your search.