cURL Command Builder

We earn commissions when you shop through the links below.

100% Client-Side - Zero Server Uploads. Build and format cURL commands with syntax highlighting. Convert between cURL commands and code snippets (Python, JavaScript, Go, etc.). 100% client-side.

Your data stays in your browser. Requests are built locally and are not uploaded to DevPouch.
Full URL including protocol. Query parameters sync with table below.

Query Parameters

Key Value

Headers

Header Name Value
Will be sent as Authorization: Bearer ***
Will be sent as -u "username:password" (Base64 encoded in code snippets)

Request Body

Content-Type: application/json header added automatically. For Form Data, edit the table below (stays in sync with this JSON).
Key Value
Each row becomes a -F "key=value" flag. Edits sync with JSON tab above.
Content-Type: application/x-www-form-urlencoded header added automatically.
Sent as-is with no automatic Content-Type header.
cURL Command

          
Ready to generate

Understanding cURL Syntax & Flags

Core cURL Flags

Flag Description Example
-X, --request Specify HTTP method (GET, POST, PUT, DELETE, etc.) curl -X POST ...
-H, --header Add request header (can be used multiple times) curl -H "Content-Type: application/json" ...
-d, --data Send data in request body (POST/PUT/PATCH) curl -d '{"key":"value"}' ...
-F, --form Send multipart/form-data (file uploads, forms) curl -F "file=@image.png" ...
-u, --user Basic authentication username:password curl -u "user:pass" ...
-L, --location Follow redirects (3xx responses) curl -L https://example.com
-k, --insecure Ignore SSL certificate validation (dev only!) curl -k https://self-signed.badssl.com
-s, --silent Silent mode (suppress progress meter) curl -s https://api.example.com
-v, --verbose Verbose output (show request/response headers) curl -v https://example.com
-o, --output Write output to file instead of stdout curl -o file.json https://api.example.com
-i, --include Include response headers in output curl -i https://example.com
-I, --head Fetch headers only (HEAD request) curl -I https://example.com
-A, --user-agent Set custom User-Agent string curl -A "MyApp/1.0" ...
--max-time Maximum time in seconds for the whole operation curl --max-time 30 ...
--connect-timeout Maximum time in seconds for connection phase curl --connect-timeout 10 ...

Multiline vs Single-line Format

This builder offers two output formats:

  • Multiline (default): Uses backslash (\) line continuations for readability. Each flag on its own line. Compatible with Bash, Zsh, and most Unix shells.
  • Single-line: Compact format for embedding in scripts, CI configs, or documentation.

Quotation Escaping: Windows vs Unix

cURL commands behave differently across shells:

  • Unix (Bash, Zsh, Fish): Use single quotes for literal strings. Escape single quotes inside with '\''. Example: curl -d '{"name":"O'Reilly"}'
  • Windows Command Prompt (cmd.exe): Use double quotes. Escape double quotes with backslash. Example: curl -d "{\"name\":\"O'Reilly\"}"
  • PowerShell: Use single quotes for literals, double for expansion. Escape with backtick. Example: curl -d '{\"name\":\"O`Reilly\"}'
  • Git Bash / WSL on Windows: Behaves like Unix Bash.

This builder generates Unix-style (single-quoted) commands by default. For Windows, either use Git Bash/WSL or manually adjust quoting.

Frequently Asked Questions

How to Build a cURL Command

  1. Enter the URL. Type the target URL in the URL field (e.g., https://api.example.com/users).
  2. Select HTTP method. Choose GET, POST, PUT, PATCH, DELETE, etc. from the dropdown.
  3. Add headers. Click Add Header to add custom headers like Authorization, Content-Type, etc.
  4. Add body (for POST/PUT/PATCH). Enter JSON, form data, or raw text in the body editor.
  5. Configure options. Set timeout, follow redirects, SSL verification, and output format.
  6. Generate command. Click Generate to produce the cURL command.
  7. Copy or download. Use Copy to copy to clipboard or Download .sh to save as a shell script.

All command building happens locally in your browser. Your request data never leaves your device.

cURL Options Reference

OptionFlagDescription
URL-X / implicitTarget endpoint
Method-X METHODHTTP verb (GET, POST, PUT, etc.)
Header-H "Key: Value"Request header
JSON Body-d '{}' -H "Content-Type: application/json"JSON payload
Form Data-F "key=value"Multipart/form-data
Auth Bearer-H "Authorization: Bearer "Bearer token auth
Timeout--max-time Request timeout
Follow Redirects-LFollow 3xx redirects
Insecure SSL-kSkip certificate verification
Output File-o file / -OSave response to file
Verbose-vDebug output
Silent-sSuppress progress meter
Reserved for AdSense (Horizontal)