cURL Generator
API & BackendTurn a method, URL, headers and body into a ready-to-run cURL command.
Runs entirely in your browser โ nothing is uploaded
What people do next
Features
- Bash, Windows CMD and PowerShell syntax, each quoted correctly.
- Bearer and Basic authentication headers built for you.
- Any number of custom headers, with a JSON body.
- Copy a command that runs as-is, without editing quotes.
- Built in your browser โ tokens you paste are never uploaded.
How to use the cURL Generator
- 1Choose the method and enter the URL.
- 2Add headers, authentication and a body.
- 3Pick your shell and copy the command.
Frequently asked questions
Why does the Windows command look different?
Because the shells disagree about quoting. Bash and zsh treat single quotes as literal, so a JSON body sits inside them untouched. Windows CMD has no single-quote convention at all and needs double quotes with internal ones escaped; PowerShell treats the backtick as its escape character and parses some arguments differently again. Copying a bash command into CMD is the usual reason a curl example fails on Windows with a cryptic error.
How do I send a JSON body?
Enter it in the body field and the Content-Type: application/json header is added for you. Sending a JSON body without that header is the most common cause of an API returning 400 or 415 for a request that looks correct.
Is it safe to paste a real API token here?
The command is built in your browser and nothing is uploaded, so the token does not leave your machine. Be careful about where it goes next, though โ a curl command containing a bearer token will sit in your shell history, and pasting one into a ticket or a chat is a common way credentials leak.
What is the difference between -d and --data-raw?
With -d, curl strips newlines from the data, which quietly corrupts a formatted JSON body. --data-raw sends exactly what you give it. This generator uses the form that keeps your body intact.
Can I turn a browser request into curl instead?
Yes, and it is often quicker: in your browser's network panel, right-click a request and choose Copy as cURL. Use this tool when you are constructing a request that does not exist yet, or when you need it in a shell other than the one you copied it for.