JSON

JSON ↔ CSV Converter

Flatten a JSON array of objects into CSV, or rebuild JSON from a CSV file — in either direction. Runs entirely in your browser; nothing you paste is ever sent anywhere.

Your JSON
CSV Output
Paste a JSON array of objects on the left to see the CSV result here.

Quick Learn

CSV (Comma-Separated Values) is a flat, tabular format — rows and columns, no nesting — which makes it the format spreadsheets, databases, and data-analysis tools expect. JSON, by contrast, is naturally nested: objects inside objects, arrays of objects, arrays inside arrays. Converting between them means either flattening JSON's nesting into columns, or folding CSV's flat columns back into nested JSON.

This tool flattens nested keys using dot notation — a "tags" array becomes "tags.0", "tags.1", and so on, and a nested "meta.featured" field becomes its own column. Converting back reverses the process, rebuilding the nested structure from those dotted column names. Everything runs locally in your browser; nothing you paste is sent anywhere.

Best Practices

  • •JSON → CSV expects a top-level array of objects (a single object is treated as one row). Deeply nested or highly irregular JSON will produce very wide, sparse CSVs — flatten your data model first if that's not what you want.
  • •An empty CSV cell always becomes a missing key in the JSON output, not an empty string or null — CSV has no way to tell those three apart. If that distinction matters, encode it explicitly (e.g. a literal word) before converting.
  • •Values with leading zeros (zip codes, phone extensions) are intentionally kept as strings, not numbers — converting "07001" to a number would silently drop the leading zero.
  • •If a cell's value itself contains a comma, quote, or line break, wrap it in double quotes when hand-editing CSV — this tool does that automatically on JSON → CSV, but it matters if you're pasting CSV from elsewhere.

More JSON Tools

See all JSON tools

Frequently Asked Questions

Is my data uploaded or stored anywhere?

No. The conversion runs entirely in your browser with plain JavaScript — nothing you paste is sent to a server or stored anywhere.

What happens to nested objects and arrays when converting to CSV?

They're flattened into dot-notation columns — a field like meta.featured or an array item like tags.0 becomes its own column. Converting back rebuilds the original nesting from those column names.

Why do some cells come back empty after converting?

CSV can't distinguish between an empty string, null, and a field that simply isn't present. This tool treats every empty cell as a missing key on the way back to JSON, which is the most common convention and avoids inventing a value that wasn't really there.

Can I convert a JSON object that isn't an array?

Yes — a single top-level object is treated as one row with a one-row CSV. If your JSON is a plain array of objects, each object becomes its own row.

Why did a numeric-looking value stay as a string?

Values with a leading zero (like "0700") are kept as strings on purpose, since converting them to a number would drop the leading zero and change the data. Everything else that looks like a plain integer or decimal is converted to a JSON number, and true/false to a boolean.

Want the engineering deep-dives behind tools like this one?