{
  "slug": "curl-command-parser",
  "name": "gizza-ai/curl-command-parser",
  "version": "0.1.0",
  "title": "cURL Command Parser — decode a curl command into a structured request — gizza.ai",
  "description": "Paste a curl command to see its method, URL, query params, headers, body, auth, cookies and flags — or rebuild clean curl. Browser-only.",
  "tags": [
    "curl command parser",
    "parse curl command",
    "curl parser",
    "decode curl",
    "curl to structured request",
    "curl headers parser",
    "curl command reader",
    "rebuild curl command"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/curl-command-parser/",
    "markdown": "https://gizza.ai/tools/curl-command-parser/index.md",
    "descriptor": "https://gizza.ai/tools/curl-command-parser/tool.json",
    "deep_link_example": "https://gizza.ai/tools/curl-command-parser/?mode=parse&command=curl%20-X%20POST%20%27https%3A%2F%2Fapi.example.com%2Fv1%2Fitems%27%20-H%20%27Content-Type%3A%20application%2Fjson%27%20-d%20%27%7B%22name%22%3A%22gizza%22%7D%27"
  },
  "cli": "gizza tool curl-command-parser \"...\"",
  "tool": {
    "description": "Parse a curl command line into a structured HTTP request, or rebuild a clean canonical curl command from it. In parse mode (default) set command='curl ...' and get back JSON with the HTTP method (explicit -X wins, otherwise inferred: POST when a body/form is present, HEAD for -I, else GET), the URL, query parameters split out of the URL (percent-decoded), headers (-H), the effective Content-Type, the request body (-d/--data/--data-ascii with newlines stripped, --data-raw/--data-binary verbatim, --data-urlencode percent-encoded), multipart form fields (-F), cookies (-b, parsed to name/value pairs), HTTP basic auth (-u user:password, decoded), user-agent (-A), referer (-e), and the boolean flags insecure (-k), follow-redirects (-L), compressed, head (-I) and get (-G); @file arguments are reported as file references. In rebuild mode set mode='rebuild' to get a tidy multi-line curl command. A robust shell tokenizer handles single/double quotes, backslash escapes and line continuations. Runs locally; nothing is uploaded.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "command": {
          "description": "The curl command to process, e.g. \"curl -X POST 'https://api.example.com/v1/items' -H 'Content-Type: application/json' -d '{\\\"name\\\":\\\"gizza\\\"}'\". Quotes, backslash line-continuations, attached short flags (-XPOST) and combined flags (-sSL) are all handled; a leading 'curl' is optional.",
          "type": "string"
        },
        "mode": {
          "default": "parse",
          "description": "Direction: 'parse' (default) decodes the curl command into a structured request (JSON); 'rebuild' returns a clean, canonical curl command reconstructed from it.",
          "enum": [
            "parse",
            "rebuild"
          ],
          "type": "string"
        }
      },
      "required": [
        "command"
      ],
      "type": "object"
    }
  }
}