glunty

Curl Command Parser

Read a curl command as a structured HTTP request.

What this tool does

Parses a curl command into its component parts: HTTP method, URL, headers, body, basic auth, cookies. Handles the common curl flags: -X / --request, -H / --header, -d / --data / --data-raw / --data-binary, -u / --user, --cookie. Quoted strings (single or double) are respected, and backslash-newline continuations are joined. Everything is parsed locally; your command is not transmitted.

How to use it

Paste a curl command into the input. Browser dev tools usually offer a "Copy as curl" option on any network request; that is the most common way to get one. Press Parse. The output table shows method, URL, each header on its own row, the body (formatted as JSON if it looks like JSON), and any auth or cookie data the command carried. Press Try an example for a starter command.

Common use cases

  • Reading a curl command from a teammate's reproduction steps without running it.
  • Translating a curl command to another HTTP client (Postman, fetch, axios) by reading off the parsed pieces.
  • Debugging an API call by separating the URL, headers, and body into distinct fields.
  • Confirming the body of a "Copy as curl" matches what your backend expected.
  • Spotting a typo in a header name or a missing content type.

Common pitfalls

  • Shell quoting. Bash and PowerShell quote escape rules differ. A curl command copied from one shell may need adjustment to paste cleanly into another. The parser handles single and double quotes per shell-like rules; it does not understand PowerShell's backtick escapes.
  • Multipart form data. Commands using -F or --form for file uploads parse the field names but not the file contents. The full multipart body is constructed by curl at send time, not in the command string.
  • Implicit method. If -X is omitted but the command has a body (-d), curl uses POST. If the command has no body and no method flag, curl uses GET. The parser applies these defaults.

Frequently asked questions

Why is "Copy as curl" not always portable across shells?
Bash and PowerShell quote different characters: bash uses single quotes, PowerShell uses backticks for line continuation and different quote rules. A curl command from Chrome "Copy as curl (bash)" pasted into PowerShell often breaks on quoting. The parser handles single and double quotes per shell-like rules; it does not interpret PowerShell backticks. Paste the bash form, or use Chrome "Copy as curl (cmd)" for Windows.
What flags does this parser handle?
-X / --request (method), -H / --header (one header), -d / --data / --data-raw / --data-binary / --data-ascii (body), -u / --user (basic auth), -b / --cookie, -F / --form (counted; multipart contents are not shown since they are constructed at send time), -A / --user-agent, -e / --referer. Common no-arg flags (-L, -k, -s, -v, --compressed) are recognized and skipped. Unknown flags are skipped along with their value when it does not look like a URL.
Why does my POST without a -X flag still parse as POST?
When -X is omitted, curl uses POST if there is a body (-d / --data) and GET otherwise. The parser applies the same defaults so the parsed request matches what curl actually sends.
Can this generate a fetch() or axios call from the parsed output?
Not yet. The current version shows the structured request so you can read off the parts. Translating to fetch / axios / http.request from the parsed table is straightforward by hand. A future enhancement could emit code directly.
What about multipart file uploads with -F?
The parser counts -F flags but does not show file contents. The actual multipart body is built by curl at send time from the file paths and field values; it is not a single string in the command. To inspect the actual body, log the request server-side or use a proxy like mitmproxy.
Is my pasted command stored or sent anywhere?
No. Parsing is local; nothing leaves your browser. Even commands containing API keys or auth headers stay on your machine. Still, redact secrets before pasting commands into any shared tool, especially screenshots or pair-programming sessions.

Embed this tool

Free for any use; attribution appreciated. Paste this on your site:

The embed runs the same tool that lives at this URL. No tracking; no ads inside the embed. Resize height as needed for your layout.

Cite this tool

For academic, journalistic, or technical references. Pick a format:

Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.

Embedded tool from glunty.com