curl Command Builder
Build a curl command from a form - method, headers, auth, and body - or paste one to edit it. Get the curl command plus equivalent JavaScript fetch and Python requests code. Everything stays in your browser.
GET requests do not support request bodies.
curl https://api.example.com/usersAnatomy of a curl command
A curl command is curl [options] URL. The method defaults to GET; add -X POST (or another verb) to change it, -H to add headers, and one of the data flags to send a body. curl figures out most of the rest - it adds the right Content-Type for -d and -F, and switches to POST when you send data.
Sending data: -d, --data-raw, and -F
-d/--data- form-urlencoded body; multiple-dare joined with&. curl setsapplication/x-www-form-urlencoded.--data-raw- sends the body exactly as given (no@fileinterpretation) - the safe choice for a JSON payload.--data-urlencode- like-dbut URL-encodes each value for you.-F/--form- multipart form data;-F "file=@/path"uploads a file.
Headers and content types
Add headers with -H "Name: Value". The most important one is Content-Type: it must match the body you send. A JSON API expects Content-Type: application/json; a form post expects application/x-www-form-urlencoded. This builder adds the JSON Content-Type for you when you choose a JSON body.
Authentication
- Basic -
-u user:passwordsends the standard Authorization: Basic header. - Bearer token -
-H "Authorization: Bearer <token>", used by most modern APIs and OAuth. - API key - a custom header like
-H "X-API-Key: <key>"(name varies by API).
A note on security
-k / --insecure tells curl to skip TLS certificate verification - handy against a local self-signed cert, but never use it in production, since it removes the protection HTTPS provides. This tool only builds command strings in your browser - it does not send the request and does not store anything you type.
Common curl flags
| Flag | What it does |
|---|---|
| -X | Set the HTTP request method. |
| -H | Add a request header (repeatable). |
| -d | Send a request body (implies POST, form-urlencoded). |
| --data-raw | Send the body verbatim (no @file interpretation) - used for JSON. |
| -F | Send a multipart form field; @file uploads a file. |
| -u | HTTP Basic auth as user:password. |
| -L | Follow redirects. |
| -k | Skip TLS certificate verification (insecure). |
| -i | Include response headers in the output. |
| -v | Verbose - show the request/response details. |
| -o | Write the response to a file. |
| -A | Set the User-Agent header. |
Frequently asked questions
Related developer tools
Cron Expression Generator
Build and decode crontab schedules with a plain-English preview.
Nginx Config Generator
Generate an nginx server block for a reverse proxy, static site, SPA, or PHP - with SSL.
Base64 Encoder / Decoder
Encode and decode Base64 - text, files, and data URIs - with URL-safe and UTF-8 support.
Let AI write the command for you.
CtrlOps' AI terminal turns plain English into the exact command - curl, systemctl, anything - with an approve-before-run safety gate, right inside a local-first SSH workspace. Your credentials never leave your machine.
✓ Start instantly·✓ No credit card·✓ No sneaky autorenewals

