Turn a curl command into fetch, Axios, Python or HTTPie, and back
cURL Command Generator
Get a curl command with every quote and escape right, without fighting the shell.
Loading tool…
How to use curl command generator
Choose the method and enter the URL.
Add headers, a body (JSON, text, form or multipart) and auth.
Copy the curl command, or switch to fetch, Axios, HTTPie or Python.
What this tool does
- Quotes values safely for bash and zsh, including single quotes inside JSON.
- Uses -u for Basic auth, -F for file uploads and --data-raw so @ in a body is never read as a file.
- Leaves out -X when curl's default method already matches.
- Imports an existing curl command so you can edit it in the form.
How the result is verified
Commands are generated by the same parser-backed writer as the cURL converter, which re-reads its own output to confirm the request is unchanged.
Frequently asked questions
Why --data-raw instead of -d?
-d treats a body starting with @ as a file name to read. --data-raw sends the text exactly as written, which is what you want for JSON.
How do I upload a file?
Choose the Multipart body, add a field, set it to File and type the file path. The command uses -F name=@path, which curl reads from disk when you run it.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
JavaScript fetch() code for any request, with JSON, forms and auth
HTTPie commands for any request, with headers, forms and uploads
Send GET, POST, PUT, PATCH and DELETE requests from your browser