cURL Command Builder

Build a ready-to-run cURL command from a URL, method, headers, and body. Quoting is handled for Bash, Windows Command Prompt, and PowerShell.

Updated
Only builds the command. Nothing is sent from this page.
Headers

Options
Shell
cURL command

    

How to use the cURL Command Builder

  1. Enter the URL and pick the Method. Add Headers with the plus button.
  2. Choose the Auth type and the Body type, then fill them in. Tick any Options you need.
  3. Pick your Shell and copy the command from cURL command.

How it works

The builder only writes text. It never sends the request, so it works for internal and localhost URLs too.

  • -X is added only when the method isn't implied: GET is the default, and a body implies POST.
  • Each header becomes -H 'Name: value'. A JSON body adds Content-Type: application/json unless you set it yourself.
  • A JSON or raw body is sent with --data-raw, so a leading @ isn't read as a file name. Form fields use --data-urlencode, one per field.
  • Basic auth uses -u user:password, and a Bearer token becomes an Authorization header.
  • Values are quoted for the shell you pick: single quotes in Bash, double quotes with "" escaping in CMD, and single quotes with '' escaping in PowerShell, which calls curl.exe so the built-in curl alias isn't used.

Examples

POST https://api.example.com/users with a Bearer token and the JSON body {"name":"Ada"}, for Bash:

curl 'https://api.example.com/users' \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"Ada"}'

The same request for Windows Command Prompt:

curl "https://api.example.com/users" ^
  -H "Authorization: Bearer TOKEN" ^
  -H "Content-Type: application/json" ^
  --data-raw "{""name"":""Ada""}"

Common cURL options

OptionWhat it does
-LFollow redirects
-iShow the response headers with the body
-vVerbose: show the full request and response exchange
-sSilent: hide the progress bar
-kSkip TLS certificate checks (testing only)
--compressedAsk for a compressed response and decode it
-m 30Give up after 30 seconds

Limitations

  • File uploads (-F [email protected]) are not built. Add them to the command by hand.
  • Cookies, proxies, and client certificates are not covered.
  • The command isn't run, so the builder can't tell you whether the server accepts it.

Frequently asked questions

Does this tool send my request?

No. It only writes the command. You run it yourself in a terminal, so tokens and passwords you type stay on your device.

Why does PowerShell need curl.exe?

In Windows PowerShell 5.1, curl is an alias for Invoke-WebRequest, which takes different arguments. Calling curl.exe runs the real cURL that ships with Windows 10 and 11.

What is the difference between -d and --data-raw?

Both send a request body. With -d, a value that starts with @ is read from a file. --data-raw always sends the text as it is.

How do I send JSON with cURL?

Add -H 'Content-Type: application/json' and pass the JSON with --data-raw. Choose JSON as the body type and the builder does both.

Often used together with the cURL Command Builder.