Category: Developer tools

cURL Command Generator

System ideaMissing a tool?

Build a curl command from a method, URL, headers and body

Fill in a request method, URL, headers and body, and get a ready-to-run curl command with each part safely quoted for the shell. Everything is assembled locally in your browser.

Output
curl \
  -H 'Content-Type: application/json' \
  'https://api.example.com/v1/items'

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Writing a curl command by hand means getting quoting right for every header and the body, which is easy to get subtly wrong. This tool takes the request apart into a method, a URL, one header per line and an optional body, and reassembles them into a single quoted command you can paste straight into a terminal.

How to use it

  1. Enter the request URL and pick a method.
  2. Add headers, one per line as Name: value.
  3. Add a body if the request needs one, then copy the command.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is the request actually sent anywhere?
No. This only builds the command text; nothing is sent until you run it yourself.
How is quoting handled?
Headers, the body and the URL are each wrapped in single quotes with any embedded single quote escaped, which is a safe default for most POSIX shells.
Does it add -X GET for a plain GET request?
No. curl already defaults to GET, so the -X flag is only added for other methods to keep the command short.