Data cleaning before converting CSV (fast checklist)

TL;DR: Fix delimiter/quotes first, then convert CSV to JSON locally (no upload).

Most conversion “bugs” are messy inputs. Use this checklist to clean CSV quickly so CSV → JSON succeeds on the first run—without uploading your file.

1) Confirm delimiter

Decide whether the file is comma, semicolon, or tab-separated. If the wrong delimiter is used, columns will shift and rows won’t match the header.

2) Verify header row

  • Header should be the first non-empty row.
  • Empty header cells should be renamed (e.g. col_3).
  • Duplicate headers lead to overwritten keys—rename them if possible.

3) Check quotes and embedded newlines

Values containing delimiters or line breaks must be quoted. A single stray quote can break parsing for the rest of the file. If a specific row fails, inspect that row first.

4) Watch encoding (UTF‑8/BOM)

Weird characters or a BOM can corrupt the first header cell. If your first key looks “odd”, re-save as UTF‑8 and re-test.

Practical checklist (fast)

If you’re stuck, use this quick checklist to narrow the problem before you try “random fixes”. Start by validating the input format (syntax first), then confirm shape expectations (array vs object, headers vs rows). Convert a small sample, inspect the output, and only then export the full result.

  • Validate: confirm the input is strict JSON/XML/CSV (no stray characters).
  • Confirm shape: arrays vs objects; headers vs row lengths; repeated tags vs arrays.
  • Test a sample: first 20–50 rows/items are enough to detect parsing issues.
  • Export: copy/download the output and re-check it in the consumer (script/spreadsheet/API).

This workflow is privacy-first by design: All processing happens locally in your browser. Files are never uploaded.

FAQ

Why does row N have a different number of columns? It’s usually delimiter/quotes. Fix the row and re-run conversion.

Can I clean data without uploading? Yes—local tools let you iterate safely on sensitive files.

Trust note: All processing happens locally in your browser. Files are never uploaded.

Local verification snippet

Run a quick local check before export/convert:

import csv
from io import StringIO

sample = text[:50000]  # keep first chunk for fast local triage
rows = list(csv.reader(StringIO(sample)))
print('rows:', len(rows), 'columns(first row):', len(rows[0]) if rows else 0)
Privacy & Security
All processing happens locally in your browser. Files are never uploaded.