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
- Choose the method and enter the URL. Add query parameters in the Params section.
- Add headers, and pick the body type: JSON, text, form, multipart or a file.
- Set authentication and any options, such as following redirects or a timeout.
- Choose your shell and whether to put each option on its own line.
- 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?
What is the difference between -d and --data-urlencode?
Are my tokens and passwords stored?
What does -X POST do, and do I need it?
How do I send JSON with curl?
Why do quotes look different on Windows?
Related tools
HTTP Status Code Lookup
Look up any HTTP status code: meaning, causes and how to fix it.
HTTP Header Analyzer
Paste HTTP headers to see what each means and what to fix.
HTTP Header Generator
Generate security, CORS, cache and CSP headers for your server.
User-Agent Parser
Identify the browser, OS, device or bot behind a User-Agent.