How to convert an excel csv export to json for javascript
- Step 1Save your Excel sheet as CSV UTF-8 — In Excel, choose 'CSV UTF-8 (Comma delimited) (.csv)' from the Save As format menu.
- Step 2Drop the CSV onto this converter — The first row becomes the JSON keys for every record.
- Step 3Pick 2-space indentation — This output is friendliest in source control diffs and matches Prettier's default.
- Step 4Paste the JSON into your fixture file — Place the array after a const seedData = [...] assignment, save, and import it where you need it.
Frequently asked questions
Why does my JSON have a stray character at the start?+
That is Excel's UTF-8 BOM. This tool detects and removes it during parse, so the first JSON key is clean.
Will accented characters survive?+
Yes — the file is read as UTF-8 in the browser. Names like "Søren" or "José" come through intact.
How do I keep ZIP codes as strings?+
Turn off type inference. Otherwise leading zeros will be stripped because "02115" becomes the integer 2115.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.