Skip to content
TabBench

cURL Command Generator

Fill in the method, URL, headers, body and auth and get a correct curl command for Bash, PowerShell or cmd, with warnings about risky options. Convert to code in one click.

Runs in your browser. Nothing you add is uploaded.

What the cURL Command Generator does

curl can do almost anything over HTTP, which also means its flags are easy to forget: -d or --data-raw, -H for every header, -F for files, -u for passwords, and different quoting rules for Bash, PowerShell and Windows cmd. Fill in the request here and get a correctly quoted command for your shell, with plain-language warnings when an option is risky. It also works in reverse: paste an existing command to edit it in the form.

How to generate a curl command

  1. Choose the method and enter the URL. Add query parameters in the Params section.
  2. Add headers, and pick the body type: JSON, text, form, multipart or a file.
  3. Set authentication and any options, such as following redirects or a timeout.
  4. Choose your shell and whether to put each option on its own line.
  5. Copy the command. The same request is shown below as fetch, Axios or Python if you need code instead.

The cURL Command Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use it

Documenting an API

A curl example is the clearest way to show how an endpoint is called. Build it once with correct quoting and paste it into your README.

Testing from a terminal or server

Run the generated command on a server or in CI, where a browser is not available and CORS does not apply.

Moving from Linux to Windows

Switch the shell to PowerShell or cmd and get the same request with the quoting those shells require.

Good to know

  • Use --data-raw or a file for JSON so that a leading @ is not treated as a file name.
  • Add -i to see response headers, and -v to see the whole exchange.
  • Passwords in a command are visible in shell history. Prefer environment variables or --netrc.
  • -L follows redirects; without it curl prints the redirect response and stops.
  • -k disables certificate checks. Use it only against servers you control.

Frequently asked questions

Why does PowerShell use curl.exe?

In Windows PowerShell 5, curl is an alias for Invoke-WebRequest, which takes different options. Calling curl.exe runs the real curl that ships with Windows 10 and later.

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

-d sends the text exactly as written, which is right for JSON. --data-urlencode percent-encodes a value for you, which is right for form fields. The generator picks the correct one for the body type.

Are my tokens and passwords stored?

No. The form is not saved anywhere and nothing is sent to a server. Be careful pasting the finished command into chat or tickets, because it contains your credentials.

What does -X POST do, and do I need it?

It sets the method explicitly. You do not need it when you use -d, -F or --json, because curl switches to POST by itself. The generator leaves it out when it is implied.

How do I send JSON with curl?

Add -H 'Content-Type: application/json' and pass the body with -d. Without the header curl labels the body as form data, which most JSON APIs reject. Newer curl versions also have --json, which sets both headers for you.

Why do quotes look different on Windows?

cmd.exe only understands double quotes and treats % specially, while PowerShell uses single quotes and doubles them to escape. The generator quotes for the shell you choose.