October 6, 2026
Top 20 curl Commands Every Hacker Should Know.
My Top 20 curl Commands โ Quick Cheat Sheet

By Cy5ec-rhythm
1 min read
My Top 20 curl Commands โ Quick Cheat Sheet
If you want to understand each command in detail, check out my previous blog post. Here's the cheat sheet I keep coming back to.
These are the commands worth knowing first, especially if you're learning Linux, web security, APIs, or penetration testing.
1. Basic GET Request
curl https://example.comcurl https://example.com2. View HTTP Headers
curl -I https://example.comcurl -I https://example.com3. Verbose Mode
curl -v https://example.comcurl -v https://example.com4. Headers + Response Body
curl -i https://example.comcurl -i https://example.com5. Follow Redirects
curl -L https://example.comcurl -L https://example.com6. Change User-Agent
curl -A "Mozilla/5.0" https://example.comcurl -A "Mozilla/5.0" https://example.com7. Add a Custom Header
curl -H "X-Test: hello" https://example.comcurl -H "X-Test: hello" https://example.com8. Send Query Parameters
curl "https://example.com/search?q=test"curl "https://example.com/search?q=test"9. Send POST Data
curl -X POST -d "username=test" https://example.com/logincurl -X POST -d "username=test" https://example.com/login10. Send JSON Data
curl -X POST \
-H "Content-Type: application/json" \
-d '{"username":"test"}' \
https://example.com/apicurl -X POST \
-H "Content-Type: application/json" \
-d '{"username":"test"}' \
https://example.com/api11. Send an Authorization Header
curl \
-H "Authorization: Bearer YOUR_TOKEN" \
https://example.com/apicurl \
-H "Authorization: Bearer YOUR_TOKEN" \
https://example.com/api12. Send a Cookie
curl -b "session=YOUR_SESSION" https://example.comcurl -b "session=YOUR_SESSION" https://example.com13. Save and Reuse Cookies
curl -c cookies.txt https://example.comcurl -c cookies.txt https://example.comThen reuse them:
curl -b cookies.txt https://example.comcurl -b cookies.txt https://example.com14. Use a Proxy
curl -x http://127.0.0.1:8080 https://example.comcurl -x http://127.0.0.1:8080 https://example.comThis is especially useful when working with Burp Suite.
15. Reproduce a Request
curl 'https://example.com/api' \
-H 'Content-Type: application/json' \
--data-raw '{"test":"value"}'curl 'https://example.com/api' \
-H 'Content-Type: application/json' \
--data-raw '{"test":"value"}'16. Upload a File
curl -F "file=@test.txt" https://example.com/uploadcurl -F "file=@test.txt" https://example.com/upload17. Get Only the HTTP Status Code
curl -s -o /dev/null -w "%{http_code}\n" https://example.comcurl -s -o /dev/null -w "%{http_code}\n" https://example.com18. Use curl With jq
curl https://example.com/api/user | jqcurl https://example.com/api/user | jqGreat for making JSON responses easier to read.
19. Save the Response to a File
curl https://example.com -o response.htmlcurl https://example.com -o response.html20. Debug a Request and Follow Redirects
curl -v -L https://example.comcurl -v -L https://example.comThe Commands I'd Learn First
If you're completely new to curl, don't try to memorize all 20 immediately.
Start with these:
curl https://example.com
curl -I https://example.com
curl -v https://example.com
curl -H "Header: value" https://example.com
curl -X POST -d "data=value" https://example.com
curl -X POST -H "Content-Type: application/json" -d '{}' https://example.com
curl -b "cookie=value" https://example.com
curl -x http://127.0.0.1:8080 https://example.comcurl https://example.com
curl -I https://example.com
curl -v https://example.com
curl -H "Header: value" https://example.com
curl -X POST -d "data=value" https://example.com
curl -X POST -H "Content-Type: application/json" -d '{}' https://example.com
curl -b "cookie=value" https://example.com
curl -x http://127.0.0.1:8080 https://example.comOnce these start making sense, the rest becomes much easier.
The goal isn't to memorize every option.
The goal is to understand what you're actually sending to the server.
~Sh4d0w