CSV to JSON Converter
v1.0.0Convert CSV ↔ JSON bidirectionally with file upload, formatting control, clipboard copy, download output, swapping, and keyboard shortcuts.
CSV Input
Bridge spreadsheets and APIs by converting tabular CSV and structured JSON with explicit control over delimiters and headers.
Read the full guide →Frequently Asked Questions
- Which encoding should I use for CSV files?
- Prefer UTF-8 with a BOM only if Excel compatibility forces it; otherwise UTF-8 without BOM for web and JSON pipelines. Latin-1 misread as UTF-8 produces mojibake. If characters look wrong after conversion, fix encoding at the source before mapping columns.
- How do I choose delimiters and quote rules?
- Comma is standard in locales that use period as decimal separator; semicolon or tab is common in Europe or TSV exports. RFC 4180-style quoting wraps fields that contain delimiters, quotes, or newlines. Mismatched rules split rows incorrectly—align parser options with the producer.
- Can I get nested JSON objects from a flat CSV?
- Not automatically without a schema or naming convention. Flat CSV maps naturally to an array of objects with top-level keys per header. Nesting requires either dotted column names (`user.name`), multiple passes, or a template. Plan structure before conversion rather than hoping the tool infers hierarchy.
- How should CSV headers be handled?
- First row as header is typical; trim whitespace and enforce unique, stable names for downstream code. Missing headers or duplicate columns break JSON property assumptions. For headerless files, generate synthetic keys (`col1`, `col2`) or reject the file—silent misalignment is worse than a hard error.
- What about JSON arrays of primitives vs objects?
- CSV implies rows and columns; arrays of strings or numbers in JSON do not map cleanly without a second dimension. Either normalize to single-column CSV or represent JSON arrays as delimited strings in one cell—document the escape rules if you choose that path.