01
A flag owns the next word
Unless it is written with an equals sign or attached to a short flag, the value is the argument after the flag. -H, --header and --header= all set one header, and a cluster such as -sSL is three flags.
Pikkola Request Studio, tool No. 44
Paste a curl command and each flag falls into the part it sets: the method, the address, the query, the headers, the credentials, the body. Change a part and the command is written again, quoting included, or take the same request as code in eight languages. Nothing leaves this tab.
The command
The line is read the way a shell hands it to curl: quoted arguments, a backslash at the end of a line, a value attached to its flag. Each part is then shown where curl would put it.
Quotes, a backslash at the end of a line and a value attached to its flag are all read. A flag this page does not understand is named in the notes rather than guessed at.
Paste a command and its parts appear here.
The builder
Every control here is one part of the request. The command on the right is written from them, quoting included, so it can go back into a terminal as it stands.
The same request
The code is generated from the parts above rather than written by hand: the method, the headers, the credentials and the body arrive in the shape each client expects. Copy it and check it against your own style.
How it is read
01
Unless it is written with an equals sign or attached to a short flag, the value is the argument after the flag. -H, --header and --header= all set one header, and a cluster such as -sSL is three flags.
02
By the time curl sees an argument the quotes are gone. Single quotes keep everything literally, double quotes still expand a variable, and a backslash at the end of a line only joins the next line.
03
A GET with a body quietly sends it as a query string, which is what -G does on purpose. Data or a form makes a POST, an upload makes a PUT, and -X overrides them all even when it contradicts the body.
| Flag | What it sets | In the request |
|---|---|---|
| -X, --request | The method, whatever the body suggests | method |
| -H, --header | One header; a repeated name replaces the earlier one | headers[] |
| -d, --data | The body; repeated values are joined with & | body |
| --data-urlencode | The body, encoded once before it is sent | body |
| --json | The body, with a JSON content type and accept | body, headers[] |
| -F, --form | One multipart part, a text field or a file | body.fields[] |
| -u, --user | Basic credentials | auth |
| -b, --cookie | A Cookie header, or a file of cookies | headers[] |
| -L, --location | Redirects are followed, so the final response is the one you see | flags |
| -k, --insecure | Any certificate is accepted, including one that should not be | flags |
| -I, -G, -A, -e | A HEAD request, data moved into the query, a user agent, a referer | method, query, headers[] |
No. It is read in this tab and the draft is kept in this browser's local storage so a reload does not lose it. The page's own content policy sets connect-src to none, so a request could not leave even if one were attempted.
Order and quoting are normalised, and comments, -v and flags this page does not read are dropped. The request is the same: same method, same address, same headers, same body. --request is left out of a GET because GET is what curl does when nothing is said.
Shell variables, command substitution, a body read from a file with @, --next and config files. They are named in the notes under the parts rather than guessed at. A variable that was already expanded by your shell arrives as its value, which is what curl would have received.
JavaScript fetch, TypeScript fetch, Axios, Python requests, Python httpx, Go net/http, Node undici and HTTPie. Eight, all generated from the same request.
No. Nothing here is fetched. A live request is a test, and a test belongs to the tool you already trust; this page only writes the line and the code.
Because it was in the command. A key written into a command is also written into the shell history and visible in the process list while it runs, so a placeholder or an environment variable is the safer habit. The page cannot tell which string is a secret and which is an id.
-d sends an urlencoded form, which is what most form posts are. -F sends multipart, which is what a file upload needs. The builder keeps them apart because the code for each is different.