curl Command Builder

Build an executable curl command from a form, with shell escaping, auth headers and form encoding handled.

Request

Body

Options

Timeout (s)

Generated command

curl -X POST \
  -L \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"Ada","age":36}' \
  https://api.example.com/v1/users

Every argument is single-quoted with inner quotes escaped — the only POSIX shell form where $, backticks and backslashes are not interpreted. An unquoted & in the URL makes the shell run the command in the background, which is the classic "the command returned half a result".

JSON uses --data-raw rather than -d: -d treats a leading at-sign as a filename, so pasting JSON that starts with one fails with a confusing "no such file".

Form mode sends each field with --data-urlencode, so & and = inside values are encoded for you.

Comments

Sign in to join the discussion

No comments yet — be the first to say something