Skip to content
hateitall

cURL Command Generator

Get a curl command with every quote and escape right, without fighting the shell.

Processed locallyIn: URL, JSON, TextOut: Shell

Loading tool…

How to use curl command generator

  1. Choose the method and enter the URL.

  2. Add headers, a body (JSON, text, form or multipart) and auth.

  3. 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.

Turn a curl command into fetch, Axios, Python or HTTPie, and back

cURL · JavaScript→ JavaScriptLight on device

JavaScript fetch() code for any request, with JSON, forms and auth

URL · JSON · cURL→ JavaScriptLight on device

HTTPie commands for any request, with headers, forms and uploads

URL · JSON · cURL→ ShellLight on device

Send GET, POST, PUT, PATCH and DELETE requests from your browser

URL · JSON · Text +→ ResponseModerate on device