{
  "slug": "html-form-field-extractor",
  "name": "gizza-ai/html-form-field-extractor",
  "version": "0.1.0",
  "title": "HTML Form Field Extractor — List Every Input, Type & Rule — gizza.ai",
  "description": "Paste HTML and get every form field: name, id, type, label, required flag, default value, and validation rules, as JSON, Markdown, or CSV. Runs in your browser.",
  "tags": [
    "html form fields",
    "extract form inputs",
    "form field list",
    "parse html form",
    "form audit",
    "required fields",
    "input attributes",
    "form to csv"
  ],
  "category": "text",
  "urls": {
    "page": "https://gizza.ai/tools/html-form-field-extractor/",
    "markdown": "https://gizza.ai/tools/html-form-field-extractor/index.md",
    "descriptor": "https://gizza.ai/tools/html-form-field-extractor/tool.json",
    "deep_link_example": "https://gizza.ai/tools/html-form-field-extractor/?html=%3Cform%20action%3D%22%2Fregister%22%20method%3D%22post%22%3E%0A%20%20%3Clabel%20for%3D%22email%22%3EEmail%3C%2Flabel%3E%0A%20%20%3Cinput%20type%3D%22email%22%20id%3D%22email%22%20name%3D%22email%22%20required%3E%0A%3C%2Fform%3E&format=json&form_index=-1&include_buttons=true&include_hidden=true&include_labels=true"
  },
  "cli": "gizza tool html-form-field-extractor '<form action=\"/register\" method=\"post\">\n  <label for=\"email\">Email</label>\n  <input type=\"email\" id=\"email\" name=\"email\" required>\n</form>'",
  "tool": {
    "description": "Enumerate every <form> in pasted HTML and list every control it contains. Each field reports its tag, effective type, name, id, resolved label, required flag, default value, placeholder, state flags (disabled/readonly/checked/multiple), validation attributes (pattern, min, max, step, minlength, maxlength, accept, autocomplete), and — for <select> — every option with its value, label, optgroup, and selected state; each form reports its action, method, id, name, and enctype. format='json' (default), 'markdown', or 'csv'. form_index picks one form (0-based; -1 = all). include_buttons (default false) adds submit/reset/button controls; include_hidden (default true) keeps hidden inputs; include_labels (default true) resolves label text. Controls outside any <form> are grouped into a final extra form. Caps at 2000 fields.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "form_index": {
          "default": -1,
          "description": "Which form to report, 0-based in document order. -1 (default) reports every form. Controls that sit outside any <form> are grouped into a final extra form.",
          "minimum": -1,
          "type": "integer"
        },
        "format": {
          "default": "json",
          "description": "Output shape: json (default, forms each with a nested fields array), markdown (one table per form, plus option lists), or csv (one flat row per field, spreadsheet-ready).",
          "enum": [
            "json",
            "markdown",
            "csv"
          ],
          "type": "string"
        },
        "html": {
          "description": "The raw HTML containing the form(s), e.g. a page's source or a <form> snippet. Parsed with a real HTML parser, so unquoted attributes and unclosed tags are fine.",
          "type": "string"
        },
        "include_buttons": {
          "default": false,
          "description": "Include submit, reset, button, and image controls (and every <button>). Default false — they are actions, not data fields.",
          "type": "boolean"
        },
        "include_hidden": {
          "default": true,
          "description": "Include <input type=\"hidden\"> fields such as CSRF tokens and tracking ids. Default true.",
          "type": "boolean"
        },
        "include_labels": {
          "default": true,
          "description": "Resolve each control's visible label text from <label for>, a wrapping <label>, aria-label, or title. Default true; set false to drop the label column.",
          "type": "boolean"
        }
      },
      "required": [
        "html"
      ],
      "type": "object"
    }
  }
}