Developer Tools
cURL Command Builder - Build and Copy cURL Commands
Visually build cURL commands without memorising flags. Set the HTTP method, URL, headers, body (JSON, form, raw), and authentication, then copy the ready-to-run command.
curl \ -L \ -X GET \ 'https://api.example.com/endpoint'
cURL Command Reference
cURL is a command-line tool for making HTTP (and other protocol) requests. Common flags used
by this builder: -X sets the method, -H adds a header,
--data sets the request body, -u provides Basic credentials, and
-L follows redirects.
Most common curl recipes
| Task | Command |
|---|---|
| GET request | curl https://api.example.com/data |
| POST JSON | curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com |
| POST form data | curl -X POST -d "name=Alice&age=30" https://example.com/form |
| Bearer token auth | curl -H "Authorization: Bearer TOKEN" https://api.example.com |
| Basic auth | curl -u username:password https://example.com |
| Follow redirects | curl -L https://example.com |
| Save to file | curl -o output.json https://api.example.com/data |
| Ignore SSL errors (dev only) | curl -k https://self-signed.badssl.com |
curl vs. wget
curl: Transfers data to/from a server. Supports many protocols (HTTP, FTP, SMTP). Better for APIs and single requests. Output goes to stdout by default.
wget: Downloads files from the web. Supports recursive downloads (entire websites). Automatically resumes interrupted downloads. Better for bulk file downloads. Output saves to disk by default.
Debugging tips
-
-v(verbose): Show request headers, response headers, and SSL handshake details. -
--trace/--trace-ascii: Full protocol dump (binary or ASCII). Very detailed. -I/--head: Fetch headers only, no body.-
-w(write-out): Print timing stats like total time, DNS lookup time, connect time:-w "@curl-format.txt" -
--compressed: Request and decompress gzip/deflate responses automatically.
Platform differences
Linux/Mac: Use single quotes around JSON strings to prevent shell interpretation:
curl -d '{"key":"value"}'
Windows PowerShell/cmd: Single quotes are treated as literal characters. Use double
quotes and escape inner quotes with backslashes:
curl -d "{\"key\":\"value\"}" or use @file.json to read from
a file.
Security Note
Credentials entered here never leave your browser. However, avoid sharing generated commands that contain real tokens or passwords in logs or public issue trackers.