{
  "slug": "csv-json-convert",
  "name": "gizza-ai/csv-json-convert",
  "version": "0.1.0",
  "title": "CSV to JSON & JSON to CSV Converter — gizza.ai",
  "description": "Convert CSV to JSON or JSON to CSV in your browser — auto-detects direction, infers types, handles quoted fields and custom delimiters. Free, no upload.",
  "tags": [
    "csv to json",
    "json to csv",
    "csv converter",
    "json converter",
    "csv parser",
    "tabular data",
    "tsv",
    "data conversion"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/csv-json-convert/",
    "markdown": "https://gizza.ai/tools/csv-json-convert/index.md",
    "descriptor": "https://gizza.ai/tools/csv-json-convert/tool.json",
    "deep_link_example": "https://gizza.ai/tools/csv-json-convert/?data=name%2Cage%0AAlice%2C30%0ABob%2C25&direction=auto&delimiter=%2C&headers=true&pretty=true&flatten=true"
  },
  "cli": "gizza tool csv-json-convert \"name,age\nAlice,30\nBob,25\"",
  "tool": {
    "description": "Convert tabular data between CSV and JSON in either direction. direction='auto' (default) detects the input format (text starting with '[' or '{' is JSON -> CSV, otherwise CSV -> JSON); set 'csv-to-json' or 'json-to-csv' to force it. csv->json yields an array of objects keyed by the header row (headers=true, default) or an array of arrays (headers=false), inferring numbers/booleans/null from cell text. json->csv accepts an array of objects (header row from the union of keys) or an array of arrays. delimiter is a single char or 'tab'/'comma'/'semicolon'/'pipe'. pretty=true indents JSON output. flatten=true (json->csv) expands nested objects/arrays into dot-notation columns.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "description": "The CSV or JSON text to convert.",
          "type": "string"
        },
        "delimiter": {
          "default": ",",
          "description": "CSV field delimiter -- a single character, or the word 'tab', 'comma', 'semicolon', or 'pipe'. Default ','.",
          "type": "string"
        },
        "direction": {
          "default": "auto",
          "description": "Conversion direction. 'auto' (default) detects the input: text starting with '[' or '{' is treated as JSON (-> CSV), otherwise CSV (-> JSON).",
          "enum": [
            "auto",
            "csv-to-json",
            "json-to-csv"
          ],
          "type": "string"
        },
        "flatten": {
          "default": false,
          "description": "json->csv only: expand nested objects/arrays into dot-notation columns (e.g. {\"addr\":{\"city\":\"NYC\"}} becomes column 'addr.city'). When false, nested values are written as compact JSON strings. Default false.",
          "type": "boolean"
        },
        "headers": {
          "default": true,
          "description": "Treat the CSV's first row as field names. csv->json: true gives an array of objects, false an array of arrays. json->csv: true emits a header row from the object keys. Default true.",
          "type": "boolean"
        },
        "pretty": {
          "default": false,
          "description": "Pretty-print (indent) JSON output. Only affects csv->json. Default false.",
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  }
}