curl Command Builder
Build curl commands visually. Set method, URL, headers, body, auth, and options — copy the ready-to-run curl command.
Headers
Authentication
Request Body
How to Use curl Command Builder
- 1Enter the request URL and select the HTTP method.
- 2Add custom headers and request body as needed.
- 3Configure authentication (Basic or Bearer token).
- 4Copy the generated curl command to run in your terminal.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
JSON Formatter & ValidatorFormat, validate, and beautify JSON data with syntax highlighting and error detection.
JWT DecoderDecode and inspect JWT tokens. View header, payload, and verify signatures.
Base64 Encode/DecodeEncode text to Base64 or decode Base64 back to text. Supports UTF-8 and binary data.
URL Encode/DecodeEncode or decode URL components. Handle special characters, query strings, and full URLs.
Frequently Asked Questions
What is curl?▾
curl (Client URL) is a command-line tool and library for transferring data with URLs. It supports HTTP, HTTPS, FTP, WebSocket, and many other protocols. curl is pre-installed on macOS, Linux, and Windows 10+. Developers use it to test APIs, debug HTTP responses, download files, and automate requests in scripts. curl is used by engineers worldwide and handles billions of requests daily in scripts and automation.
What are the most important curl flags?▾
-X (or --request) sets the HTTP method. -H (or --header) adds a request header. -d (or --data) sets the request body (implies POST if no -X). -L (or --location) follows redirects. -v (or --verbose) shows request and response headers. -k (or --insecure) skips TLS certificate verification. -o (or --output) saves to a file. --compressed requests gzip encoding. -u (or --user) sets Basic auth. -b (or --cookie) sends cookies.
How do I send JSON data with curl?▾
Use -H "Content-Type: application/json" and -d with your JSON body: curl -X POST https://api.example.com/endpoint -H "Content-Type: application/json" -d '{"key": "value"}'. On Windows use double quotes outside and escaped quotes inside: -d "{\"key\": \"value\"}". Alternatively use @filename to read JSON from a file: -d @data.json. For multipart form data use -F "field=value" or -F "file=@path/to/file".
How do I authenticate with curl?▾
Basic auth: -u username:password (curl will Base64-encode it into the Authorization header). Bearer token: -H "Authorization: Bearer your_token_here". API key in header: -H "X-API-Key: your_key". API key in query string: append ?api_key=your_key to the URL. OAuth 2.0: obtain a token first, then use Bearer auth. For client certificates: --cert client.pem --key client.key.
How do I see the full HTTP response headers with curl?▾
Use -v (verbose) to see request and response headers along with the body. For just the response headers without the body, use -I (HEAD request) — note this changes the method to HEAD. To see headers alongside the body, use -D - (dump headers to stdout) followed by the body: curl -D - https://example.com. To get just the HTTP status code: curl -o /dev/null -s -w "%{http_code}" https://example.com.