OneWebDesk

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 -X or --request. If absent, it defaults to POST when a body (-d etc.) is present, otherwise GET.
  • URL: the first non-option argument (or the value of --url) is treated as the request target.
  • Headers: every -H / --header value is split into name: value pairs.
  • Body: values of -d, --data, --data-raw, and --data-binary are 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

  1. In the browser network tab, copy a request via “Copy as cURL”.
  2. Paste it here to see which headers (auth tokens, Content-Type, etc.) and body are actually being sent.
  3. 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.

Frequently asked questions

Is the command I paste sent to a server?
No. All parsing runs purely in your browser's JavaScript, and the cURL command—including its tokens, headers, and body—is never transmitted to any server.
How is the method determined?
It uses the value given by -X or --request. If neither is present, it infers POST when a -d/--data-style body option exists, and GET otherwise.
Do multi-line commands work?
Yes. A trailing backslash (\) is treated as a line continuation and joined automatically, so the multi-line commands emitted by dev tools can be pasted directly.
What about options it doesn't support?
It only interprets the options needed to extract the method, URL, headers, and body. Other flags such as --compressed, -L, or --insecure are ignored while the rest is parsed.
What if the command doesn't start with curl?
If the command does not begin with curl (or curl.exe), it is treated as not a valid cURL command and flagged with a danger state. Paste starting from the curl part.

Related tools

HTTP / API