为什么用这个工具
03CSV JSON 转换在浏览器本地运行,适合快速处理与复制结果。
CSV JSON 转换适用于日常高频小任务,打开即用。
默认本地处理,便于快速检查与复制结果。
如何使用
02复制前快速检查
03先确认输入格式符合你的预期。
在把结果用于文档、链接、配置或消息前快速扫一眼。
只复制你真正需要的输出。
使用场景
Export a Google Sheets / Excel sheet as CSV, paste it in, and copy the JSON array of objects to send as a request body or seed a development database.
Application logs sometimes ship as CSV. Convert to JSON to inspect specific rows with a JSON viewer's structure, search, and filtering — much easier than reading raw rows.
Some non-developer stakeholders prefer CSV/Excel over JSON. Take the JSON response from your API, paste it in, and hand back a CSV they can open in Excel.
When moving data between systems (DB to DB, SaaS to SaaS), you often need to translate between row-oriented CSV exports and document-oriented JSON imports. This tool handles the round-trip quickly without writing a script.
When mocking up data for a prototype or test, it's faster to type in CSV (or paste from a spreadsheet) than to write JSON by hand. Convert when you're done and use the JSON as a fixture.
使用技巧
- 01Quoting and the comma trap
If your CSV has cells that contain commas (a price like "1,200" or a sentence), those cells must be wrapped in double quotes. Embedded quotes inside a quoted cell use <code>""</code> as the escape. The parser handles both — but if your source data uses single quotes or escaped backslashes instead, those won't decode correctly.
- 02JSON → CSV uses union of all keys
If your JSON array has objects with different shapes, the CSV header includes every key seen anywhere. Missing keys produce empty cells in their column. This is usually what you want — but it can produce surprisingly wide CSVs if your JSON is sparse.
- 03Non-string JSON values get JSON-encoded into cells
Numbers and booleans serialize naturally (e.g., <code>42</code>, <code>true</code>). Nested objects and arrays are JSON-stringified into the cell value (e.g., <code>{"x":1}</code>) so the CSV remains lossless for round-trip. Excel will display the nested JSON as a string.
- 04Round-trip safety
CSV → JSON → CSV is lossless for flat object arrays with simple types. It's NOT lossless if your source has nested objects (they become JSON-encoded strings in the CSV and would re-parse as strings, not objects) or if your CSV uses non-RFC quoting conventions.
常见问题
01
这个工具会上传数据吗?
默认在浏览器本地处理。
相关工具
03JSON 格式化→
格式化、压缩并校验 JSON。
JSON 到 typescript→
JSON 到 typescript,在浏览器中快速完成单项任务。
表格格式互转→
在浏览器里把表格在 CSV、JSON 和 Markdown 三种格式之间互转。