JSON to CSV Converter
Paste JSON above to build a CSV.
Paste a JSON array of flat objects and get clean CSV instantly. The header row is built from the union of every key across your records, and any field containing a comma, double quote, or line break is quoted and escaped the standard way (RFC 4180). Everything runs client-side, so your data never leaves the browser.
How to use
- Paste a JSON array of flat objects into the JSON input box.
- Pick the line ending you need: CRLF for Excel and Windows, or LF for Unix.
- Read the CSV that appears in the output box, including the header row built from all keys.
- Click Copy CSV to grab the text, or Download to save it as a .csv file.
- If something is off, the status line explains the problem (for example, not an array, or a nested value).
Examples
- Input: [{"name":"Ada","age":36},{"name":"Linus","age":54}] Output: name,age then Ada,36 then Linus,54
- Input with a comma in a value: [{"city":"Paris, France"}] Output: city then "Paris, France" (the value is quoted because it contains a comma).
- Input with uneven keys: [{"a":1,"b":2},{"a":3,"c":4}] Output header a,b,c with empty cells where a key is missing in a row.
FAQs
- What shape does the JSON need to be?
- A single array containing flat objects, for example [{"id":1,"name":"Ada"}]. Each object becomes one CSV row, and the keys become columns.
- How are commas, quotes, and line breaks handled?
- Any field that contains a comma, a double quote, or a line break is wrapped in double quotes. Double quotes inside a field are escaped by doubling them, following the RFC 4180 convention that spreadsheets expect.
- What happens when objects have different keys?
- The header is the union of all keys in the order they first appear. If a row is missing a key, that cell is left empty so every row stays aligned to the header.
- Does it support nested objects or arrays?
- No. This tool is for flat objects, so a value that is itself an object or an array is reported as an error. Flatten or stringify nested values before converting.
- Is my data uploaded anywhere?
- No. The conversion happens entirely in your browser. Nothing is sent to a server, so it is safe for private or sensitive data.
- Why CRLF versus LF line endings?
- CRLF is the safest choice for Microsoft Excel and Windows tools, while LF is common on macOS, Linux, and many data pipelines. Pick whichever your target program expects.
Related tools
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly in your browser.
- Word CounterCount words, characters, sentences, paragraphs, and reading time for any text. Live, private, and free in your browser.
- Slug GeneratorTurn any title or text into a clean, lowercase URL slug. Spaces become hyphens, punctuation is stripped, and repeats are collapsed.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.
- URL EncoderPercent encode and decode text for URLs in your browser. Toggle direction, copy results, and see clear errors on malformed input.