JustUtils

cURL command builder

Turn an HTTP request into a curl command for your terminal. Enter a URL, add headers or a request body, then copy the preview. Your draft stays in this tab. Only running the command contacts the endpoint.

Load example

Generated cURL command

Bash · zsh · sh

curl --globoff \
  --request GET \
  --url 'https://example.com/api/items'

How do I add query parameters to a cURL GET request?

Enter one name=value pair per line in Query parameters. Use the original text, including spaces. The builder encodes each pair and appends it to the URL. Repeat a name on another line when the API accepts multiple values for the same parameter.

curl --globoff \
  --request GET \
  --url 'https://example.com/api/items?q=green+tea&limit=10'

How do I POST JSON with a bearer token?

Load the POST JSON example, change the URL and edit the body. The builder validates the JSON and adds its content type. Set API_TOKEN in your terminal before running the command. The shell reads the token at execution time, so the example can be shared with the variable name intact.

curl --globoff \
  --request POST \
  --header "Authorization: Bearer ${API_TOKEN:?Set API_TOKEN}" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "name": "Green tea"
}' \
  --url 'https://example.com/api/items'

Which terminals support these commands?

Use a POSIX-style shell such as Bash or zsh with curl installed. On Windows, use Bash in WSL or Git Bash. Single quotes preserve literal header and body text, and a trailing backslash continues a command onto the next line. Official curl option reference