curl Generator

Convert HTTP request parameters to cURL commands. Input method, URL, headers, body, and auth. Parse existing curl commands back into fields. Copy and run in terminal.

Generated cURL

curl -X GET "https://api.example.com/endpoint" \
  -H "Content-Type: application/json"

Parse curl command

Paste a curl command below to extract method, URL, headers, and body into the form.

Converting HTTP Requests to curl

The curl Generator turns your HTTP request parameters into a ready-to-run curl command. Enter the method, URL, headers, and optional body. Choose auth type (none, basic, or bearer) and the tool generates the appropriate -X, -H, -d, and --user flags.

Copy the command and run it in your terminal. curl bypasses CORS, so you can test APIs that block browser requests. It's also useful for documentation, CI/CD scripts, and sharing reproducible API calls.

Parsing curl Commands

Paste an existing curl command and click Parse to extract its components into the form. The parser handles -X (method), -H (headers), -d (body), and --user (basic auth). Authorization: Bearer is also detected. After parsing, you can edit the fields and regenerate a modified command. Useful when converting a curl command to another format or debugging.

curl Flags Reference

-X specifies the HTTP method. -H adds a header. -d sends the request body (sets Content-Type: application/x-www-form-urlencoded by default; use -H 'Content-Type: application/json' for JSON). --user user:pass adds Basic auth. For Bearer, use -H 'Authorization: Bearer <token>'. -v enables verbose output. -i includes response headers in the output.

Frequently Asked Questions

Related Tools

Explore More Tools

Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.