About this tool
curl is the universal way to share and reproduce an HTTP request, in bug reports, API docs, CI scripts and chats. Getting the quoting right is the hard part: one stray quote in a JSON body breaks the command. Fill in the request here and copy a curl command with correct quoting for Bash (macOS, Linux, Git Bash, WSL) or the Windows Command Prompt.
Common curl options
| Option | Meaning |
|---|---|
-X POST | HTTP method (implied as POST when a body is sent) |
-H 'Name: value' | Add a request header |
--data-raw '…' | Send the body exactly as written |
-F 'file=@photo.jpg' | Multipart form field or file upload |
-u user:password | Basic authentication |
-L / -k | Follow redirects / skip TLS verification (testing only) |
-i / -sS | Show response headers / hide the progress bar but keep errors |
Windows notes
Windows 10 and 11 include real curl as curl.exe. In PowerShell, curl may be an alias for Invoke-WebRequest, so type curl.exe; and because PowerShell can strip double quotes from JSON passed to native programs, use the cmd output here in Command Prompt, or use the PowerShell code from the API Request Builder.
FAQ
How do I send JSON with curl?
Use -H "Content-Type: application/json" with --data-raw and your JSON in single quotes (Bash). Recent curl versions also have --json, which sets the headers for you.
How do I add a bearer token to curl?
Add -H "Authorization: Bearer YOUR_TOKEN". Choose “Bearer token” above to have it added.
Why does my curl command fail on Windows?
Single quotes don’t work in cmd. Choose Windows cmd above for double-quoted output, or run the Bash version in Git Bash or WSL.
How do I upload a file with curl?
Choose Multipart and add a line like file=@photo.jpg. curl reads the file and sends it as form data.