What it does
Fill in a request and get a curl command you can paste into a terminal, a script or an issue. The body's content type header is added automatically for JSON and form bodies unless you set your own Content-Type.
Going the other way
Paste an existing curl command (including one copied from a browser's Network tab as "Copy as cURL") to fill in the method, URL, headers and body above, so you can edit and regenerate it.
Good to know
Everything happens in your browser: no request is actually sent, and a token or secret you type here is not stored or transmitted. Quoting follows POSIX shell rules (single quotes), so the command is safe to paste into bash, zsh or a similar shell; Windows cmd uses different quoting.
Example
The default fields produce a POST to https://api.example.com/users with a Bearer header and a JSON body. Choose an authentication type to have the tool write the header for you: Basic is encoded as Authorization: Basic …, Bearer as Authorization: Bearer …, and an API key goes in a header or in the query string. If the Headers box already sets Authorization, that value wins and the status line says so. The same request is also written as code for JavaScript (fetch or Axios), Python (requests or httpx), Go, PHP, Java and C# in the "Generated code" box.
Checks the tool makes
- A URL without
http://orhttps://, or one containing spaces, is flagged. - With the JSON body type selected, a body that does not parse as JSON is flagged; use the JSON Formatter to find the error.
- Pasted curl options the tool has no field for, such as
-o,--retryor--proxy, are listed. Some are dropped and some are appended to the regenerated command, as the note says.
After you run the command, the response status is explained in HTTP Status Codes and its headers in the HTTP Header Analyzer. To choose a value for Content-Type use the MIME Type Lookup, and when you are setting up the responses of your own server, the Security Headers Generator writes the security headers for it. Remember that -k turns off certificate checks, so use it only against servers you control.
Example
A POST request to https://api.example.com/users with the query parameters page=2 and q=a b, a bearer token, an extra header and a JSON body:
curl \
-X POST 'https://api.example.com/users?page=2&q=a%20b' \
-H 'X-Trace: abc' \
-H 'Authorization: Bearer TOKEN123' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"Ada"}'The query values are percent-encoded (the space became %20), the Authorization header is built from the Auth setting, and the Content-Type header was added automatically because the body type is JSON. The other authentication choices are Basic, an API key in a header and an API key in the query string.
Going the other way: paste a curl command
Paste the command you copied from the browser’s Network tab:
curl 'https://api.example.com/items?id=5' -H 'accept: application/json' -H 'authorization: Bearer abc' --data-raw '{"a":1}' --compressedand press “Parse curl command”. The form is filled in: the method becomes POST because there is a body, the URL and the query parameter id=5 are separated, the Authorization header moves into the Bearer setting, and the options such as --compressed are ticked. You can now edit any field and generate the command again.
Frequently asked questions
Does the tool send the request?
No. It only builds the command text. Nothing is sent, and your token or password is never uploaded.
Why do the quotes look different on Windows?
The command uses single quotes, which Bash and zsh understand. Windows Command Prompt does not treat single quotes as quotes, so run it in Git Bash, WSL or adapt the quoting.
Is it safe to paste a real token?
The page works in your browser, but a command with a real token is a secret. Replace it with a placeholder before you put the command in a ticket, a chat or a repository.
How do I look up what a response code means?
Use the HTTP Status Codes list, and the HTTP Header Analyzer for the response headers.
Privacy
This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server.