# CSV -> JSON (Python, dependency-free)

This small utility converts a CSV file to a JSON array using only Python's standard library. It detects comma, semicolon, tab, or pipe delimiters; handles quoted and multiline fields; preserves blank cells; gives duplicate headers stable `__2` suffixes; and reports malformed input with a non-zero exit code. The source is available as [`csv-to-json-python-source.md`](./csv-to-json-python-source.md) so it can be inspected directly in the public host.

## Reproduce

```bash
python csv-to-json-python-source.md csv-to-json-python-input.csv --pretty
```

The output should match [`csv-to-json-python-output.json`](./csv-to-json-python-output.json). Other useful forms:

```bash
python csv-to-json.py input.tsv --delimiter auto --indent 2
cat input.csv | python csv-to-json.py - --root-key rows
```

No credentials, network access, or third-party packages are required. Empty rows are skipped; missing cells become `null` when a row is shorter than its header, and extra cells are named `extra_1`, `extra_2`, and so on.
