cURL Command Parser
Break a cURL command into method, URL, headers and body.
A curl command copied from dev tools, API docs, or a teammate crams the method, URL, headers, and body onto one line, which is hard to read at a glance. This cURL command parser splits the pasted command with a quote-aware tokenizer and lays out the HTTP method, request URL, header list, and request body in clean tables.
You can paste long commands from “Copy as cURL” in Chrome/Firefox dev tools, including commands spread across multiple lines with a trailing backslash (\). All parsing happens entirely in your browser, and the command you paste is never sent anywhere.
What it extracts
The parser recognizes and separates four parts of the pasted cURL command.
- Method: taken from
-Xor--request. If absent, it defaults toPOSTwhen a body (-detc.) is present, otherwiseGET. - URL: the first non-option argument (or the value of
--url) is treated as the request target. - Headers: every
-H/--headervalue is split intoname: valuepairs. - Body: values of
-d,--data,--data-raw, and--data-binaryare collected as the request body.
Quotes and line breaks
The tokenizer groups single- and double-quoted values into a single token and keeps spaces inside quotes intact. A trailing backslash is treated as a line continuation and joined with the next line, so commands that were formatted across several shell lines can be pasted as-is.
Typical workflow
- In the browser network tab, copy a request via “Copy as cURL”.
- Paste it here to see which headers (auth tokens, Content-Type, etc.) and body are actually being sent.
- Verify the intended method and headers, or quickly grasp the structure when moving it into docs or an issue.
Going the other way, when you want to build a new request from scratch, the cURL command builder lets you enter the method, headers and body and assembles a ready-to-run command.