Picking request options and getting a cURL command to paste
Writing a cURL command to poke an API means recalling quote placement and option order every time. Enter the method, URL, headers and body, tick the options you need, and a command you can paste straight into a terminal appears. A long command can be split across lines to stay readable.
Every value is wrapped in single quotes, and a single quote inside a value is rewritten by closing the quote, adding an escaped quote and reopening it. That stops the shell from interpreting symbols inside your values. Header names are checked against a whitelist of token characters, and a value holding a line break or control character is rejected because it could split the header. The URL must start with http or https, and spaces are flagged.
A token or cookie placed in a header stays in your shell history file verbatim, so check whether the value may be recorded before pasting. This page builds the command string only: it does not send the request, fetch a response or handle an authentication flow for you. Written as of October 2026.
Frequently asked questions
A shell cannot nest a single quote inside single quotes, so it is rewritten as '\'' : close the quote, add an escaped quote, reopen. Pasting the command still sends the original value.
Headers are separated by line breaks, so a break inside a value can create an extra header you did not intend. This page rejects such input instead of building a command from it.
The command is still built, but a note appears next to the body. Nothing in the specification forbids it, yet servers and intermediaries often ignore or refuse it, so it is not advisable.