cURL Command Builder & Parser

Stop hunting through man curl. Fill in the request you want and get a correct, copy-ready command — or paste a command from docs or a bug report and see exactly what it does.

Why curl?

curl is installed on practically every Linux, macOS and modern Windows machine, works in CI pipelines and SSH sessions, bypasses browser CORS restrictions, and is the lingua franca for sharing an HTTP request in documentation and issue trackers. Getting the flags right by hand, though — quoting a JSON body, adding -H for every header, remembering -L for redirects — is error-prone. The builder generates the command; the parser reads one back.

The flags that matter

-X sets the method (often implied: -d implies POST). -H 'Name: value' adds a header; repeat it per header. -d / --data / --data-raw sends a body (this builder emits --data); --data-urlencode form-encodes a field. -u user:pass adds Basic auth. -L follows redirects, -i includes response headers, -s silences the progress bar, -v shows the full exchange for debugging, -k skips TLS verification (development only), and --max-time sets a timeout so scripts never hang.

Quoting across shells

Bash and zsh use single quotes to protect JSON bodies, so a literal single quote inside must be written '\''. Windows cmd.exe has no single quotes — the builder's Windows mode only changes the line continuation to ^ instead of \; the body is still wrapped in single quotes, so rewrite the quoting with double quotes (escaping inner ones as \") by hand for cmd.exe. PowerShell is different again (curl there is an alias for Invoke-WebRequest; use curl.exe).

How to use it

  1. Pick the method and enter the URL, then add query params, headers and a body in the form fields.
  2. Choose an auth type and toggle flags such as follow redirects, verbose or include headers.
  3. Copy the generated command in multiline, one-liner or Windows format — or paste an existing command into Import to populate the fields.

Generated command

A JSON POST with a bearer token, formatted for Bash:

curl -X POST -L -s --max-time 30 \
  -H "Authorization: Bearer eyJhbGciOi…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{"customerId":"c_8f2a","items":[{"sku":"ABC-1","qty":2}]}' \
  "https://api.example.com/v1/orders"

Pasting that back into the Import box restores the method, URL, headers and body, which is handy when a colleague sends you a command and you want to change one header. Flags such as -L, -s, -v, -k and --compressed are not restored as checkboxes, so tick them again, and -F multipart uploads cannot be parsed.

Common use cases

A worked example and what the importer ignores

Choose POST, set the URL to https://api.example.com/users, add the header Content-Type: application/json, use the Raw / JSON body type with {"name":"Ada"}, leave -L Follow redirects ticked (it is on by default), tick -s Silent, and enter 10 in the --max-time box. The multiline output is:

curl -X POST -L -s --max-time 10 \
  -H "Content-Type: application/json" \
  --data '{"name":"Ada"}' \
  "https://api.example.com/users"

Flags are always emitted in a fixed order, and the body is sent with --data. The Windows (^) format only changes the line continuation to ^; the body still uses single quotes, which cmd.exe does not understand, so rewrite the quoting by hand there. The importer restores the method, URL, headers, body and basic or bearer authentication, but it skips flags such as -L, -v and --compressed and does not understand -F uploads. Re-tick the checkboxes after importing.

Frequently asked questions

Does the builder execute the request?

No. It only generates or parses the command text. To send a request from the browser, use the REST API Tester; to run curl, paste the command into your terminal.

Why is -X POST sometimes unnecessary?

curl switches to POST automatically when you pass -d/--data. Specifying -X POST is harmless, but -X GET with a body is almost always a mistake.

How do I upload a file with curl?

Use -F 'file=@/path/to/file' for multipart form uploads, or --data-binary @file to send raw file contents as the body.

Can it parse commands copied from Chrome DevTools?

Partly. Header (-H), body (--data-raw and -d), method and URL are read, but flags such as --compressed are ignored and multipart -F uploads are not understood.

Does importing a command restore every option?

No. Method, URL, headers, body and authentication are restored. Flags like -L, -v, -k and --compressed are not turned back into checkboxes, so set them again.

Related tools

Explore all developer tools →