Skip to content
Free Tool Arena

Developer Utilities · Free tool

cURL Command Builder

Build a complex cURL command with headers, auth, and a JSON body using a simple online form. Copy it for instant use, free and no signup.

Updated June 2026
Query params

None.

Headers

curl command

Found this useful?EmailBuy Me a Coffee

Advertisement

What it does

curl is the universal command-line HTTP client — created by Daniel Stenberg in 1996, shipped on virtually every Unix system, macOS, modern Windows, embedded in countless scripts and Docker images. Building curl commands by hand is error-prone because the flag system is dense (-X for method, -H for headers, -d for body, -u for basic auth, -G for GET-with-data, -k for skip-cert-check, --data-urlencode for URL encoding, -L for follow redirects, etc.) and quoting bugs are common across shells (bash, zsh, PowerShell, cmd all handle quotes differently). The builder produces correctly-quoted curl commands from a structured form, so you don't fight quote-escaping when copying to a terminal or CI script.

The builder accepts: URL, HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS), headers (key-value pairs — Authorization, Content-Type, Accept, custom), query parameters (auto-URL-encoded), request body (JSON, form-data, raw text, or file upload), authentication (basic auth user:password, bearer token, custom Authorization header), and options like timeout, follow-redirects, ignore-cert-errors, output to file. Output: a copy-pasteable curl command in your shell flavor (bash/zsh, PowerShell, cmd, or format-on-multiple-lines for readability).

Common use cases: testing API endpoints (most APIs have curl examples in their docs), one-off API calls before writing formal client code, sharing a debug command with teammates (curl is universal), embedding API calls in CI / cron scripts, troubleshooting webhooks (replay incoming webhooks via curl), and capturing requests from browser DevTools (Network tab → Right- click → Copy as cURL — the tool can also parse this format and let you tweak it). Beware: curl commands often contain sensitive data (auth tokens, API keys) — treat as secret, don't paste in public channels without redacting first.

Embed this tool on your siteShow snippet

Paste this snippet into any page. Loads on-demand (lazy), no tracking scripts, and sized to most dashboards. Replace the height to fit your layout.

<iframe src="https://freetoolarena.com/embed/curl-command-builder" width="100%" height="720" frameborder="0" loading="lazy" title="cURL Command Builder" style="border:1px solid #e2e8f0;border-radius:12px;max-width:720px;"></iframe>
Embed docs →

How to use it

  1. Enter the URL.
  2. Pick the HTTP method (GET, POST, etc.).
  3. Add headers (Authorization, Content-Type, custom).
  4. Add query parameters (auto-URL-encoded) and request body if needed.
  5. Set authentication (basic auth or bearer token).
  6. Pick shell flavor (bash, PowerShell, cmd) and copy the result.

When to use this tool

  • Testing API endpoints quickly without writing client code.
  • Reproducing browser-DevTools requests outside the browser.
  • Sharing debug requests with teammates (curl is universal across systems).
  • Embedding HTTP calls in CI / cron / shell scripts.
  • Webhook replay — capturing an incoming webhook and replaying via curl to test handlers.

When not to use it

  • Production application code — use a proper HTTP library (axios, fetch, requests, OkHttp) for real apps.
  • GraphQL — better tooling exists (GraphQL Playground, Apollo, Insomnia) than crafting curl by hand.
  • Long-running streaming requests (SSE, WebSocket) — curl can but it&apos;s painful; use dedicated tools.
  • When you need a GUI-friendly REST client — Postman, Insomnia, Bruno, Hoppscotch are better for exploratory API work.

Common use cases

  • Verifying a number or output before passing it on
  • Quick generation during a typical workday
  • Pre-decision sanity-check on inputs and outputs
  • Educational use &mdash; demonstrating the underlying concept

Frequently asked questions

What's the difference between -d and --data-urlencode?
-d sends the data as-is in the request body. --data-urlencode URL-encodes the data first (replacing spaces with +, special chars with %XX). For form posts (application/x-www-form-urlencoded), --data-urlencode is correct because spaces and = signs need encoding. For JSON bodies, -d is correct because JSON has its own encoding. The builder picks the right flag based on your content-type.
Why does my curl command fail in PowerShell?
Quote-escaping differs across shells. Single quotes work in bash/zsh but PowerShell treats them differently. PowerShell aliases &ldquo;curl&rdquo; to Invoke-WebRequest by default — different syntax entirely. Two fixes: (1) use real curl.exe (modern Windows ships it; just use `curl.exe ...` or full path). (2) Generate the command in PowerShell flavor, which uses the right quoting style. The builder offers shell-flavor selection.
How do I pass JSON as the body?
Three options: (1) -d &apos;{`{"key":"value"}`}&apos; — single quotes around JSON in bash/zsh. (2) --data-binary @file.json — read JSON from a file (avoids quote-escaping pain). (3) Use --data-raw &apos;...&apos; to ensure curl doesn&apos;t try to interpret the data. Always include `-H &quot;Content-Type: application/json&quot;` header so the server parses correctly.
How do I auth with a bearer token?
Add `-H &quot;Authorization: Bearer YOUR_TOKEN_HERE&quot;`. Don&apos;t use `-u` (that&apos;s basic auth — sends user:password Base64-encoded, different mechanism). For API keys in custom headers: `-H &quot;X-API-Key: yourkey&quot;`. Always treat tokens as secret — don&apos;t paste them in public bug reports or shared scripts. Use environment variables (`$TOKEN`) in shell scripts.
Can I follow redirects?
Yes, add `-L`. Without `-L`, curl returns the 3xx response without following. With `-L`, it follows up to 50 redirects (configurable with --max-redirs). For testing, sometimes you DON&apos;T want to follow (you want to inspect the redirect chain) — leave -L off and you&apos;ll see each intermediate response.
How do I save the response to a file?
`-o filename` to save to a specific name; `-O` to save with the URL&apos;s filename. For large downloads, `-C -` resumes interrupted transfers. For verbose debugging, `-v` shows headers and connection details. Combine: `curl -v -o output.txt -L -H &quot;Authorization: ...&quot; https://api.example.com/data`. The builder generates these patterns for common use cases.

Advertisement

Learn more

Explore more developer utilities tools

100% in-browserNo downloadsNo sign-upMalware-freeHow we keep this safe →

Found this useful?

The tools stay free thanks to readers who chip in or spread the word.

Buy Me a Coffee