Home / Developer tools / JSON to CSV Converter
Browser-native data utility

From JSON
to a clean table.

Validate JSON, choose how nested values are represented, inspect the first rows, and export practical CSV — without sending the source text to a server.

Local parsingTable previewCSV escape rulesCopy or download
Abstract Toolyfi data workspace showing JSON converting into a CSV tableToolyfi

JSON to CSV workspace

Paste valid JSON. The preview and CSV are calculated in this browser.

Runs locally in this browser

JSON input

Ready

CSV output

0 rows · 0 columns

The first 12 converted rows appear here after a valid conversion.

0converted rows
0CSV columns
0CSV characters
JSON to CSV guide

What a JSON to CSV conversion actually changes

JSON and CSV solve different data problems. JSON can represent nested objects, arrays, booleans, numbers, strings, and null values with an explicit structure. CSV is a flat sequence of text rows and columns. A conversion therefore is not a neutral file rename; it is a shaping decision. This Toolyfi converter makes that decision visible. It parses source JSON in the current browser, forms table rows, gathers columns, shows a preview, and builds a CSV text result that can be copied or downloaded. The preview gives you a chance to check the resulting table before it enters a spreadsheet, report, or import workflow.

The simplest source is an array of similar objects. An array containing employee-like records can become one CSV row per object, with keys becoming columns. Real JSON often varies: one record may have an optional field, an object may be nested, or a value may be an array. A good converter should not hide those differences. This page collects keys across rows in first-seen order and leaves a cell empty when that key does not exist in a particular row. When flattening is selected, nested plain-object properties become dotted columns such as contact.city. Nested arrays remain a JSON representation inside one cell so they are not silently exploded into a different number of records.

Start with valid, intentional JSON

JSON is strict. Object keys and string values use double quotes, not single quotes. A comma may separate entries but cannot trail after the final entry. Brackets and braces must balance. Comments are not part of standard JSON. If the source was copied from a JavaScript object, a log, or an API response, it may look close to JSON while still being invalid. The converter reports the browser’s parse error rather than attempting to guess a repair. That boundary protects data meaning: automatic repairs can hide whether a quote or comma came from the original source.

Before converting, ask which part of the source should become the table. An API response may contain metadata at the top and an array of records deeper inside. Pasting the entire response as one object creates one row unless you intentionally select the record array first. A CSV cannot preserve every nested relationship as a set of adjacent cells without a policy. Extract the relevant array or decide that the metadata belongs in the export. Clear selection at this stage avoids a familiar spreadsheet problem: a technically valid file with columns that do not represent the question the reader is trying to answer.

Local-only boundary: JSON parsing, flattening, CSV generation, copying, and browser download happen in the active tab. The tool does not submit, fetch, retain, or store the JSON you paste. Still follow your organization’s own rules for handling confidential data.

How rows and columns are formed

CSV needs a consistent row shape. If the input is a JSON array, each item becomes a candidate row. An object item is copied into a row. A scalar item, such as a number or string, becomes a row with a single value column rather than being discarded. A single top-level object becomes one row. This predictable rule means that the converter’s result can be inspected without guessing which values disappeared. The metric strip reports the number of converted rows and unique columns, while the preview renders up to twelve rows to keep large source data readable.

Keys are not guaranteed to appear in every object. Suppose the first record has id and name, while the second adds department. The output header includes all three keys. The first row receives an empty department cell, and the second receives its department value. That is usually more transparent than dropping a later field to preserve the first record’s shape. It also signals a data-quality question: is the optional field expected, or did the upstream source change? CSV export should preserve information; it should not disguise schema drift.

Flatten nested objects with a stated rule

A nested JSON object can be helpful for the application that produced it but awkward in a spreadsheet. When the “Flatten nested objects” control is enabled, a structure such as {"customer":{"name":"Amina","city":"Lahore"}} becomes columns named customer.name and customer.city. The dot is a column-name convention, not a JSON path guarantee. It makes the source relationship visible while allowing the values to sit in one conventional row. If you turn flattening off, the nested object is written as JSON text inside its parent field, which is better when preserving the original nested value matters more than creating extra spreadsheet columns.

Arrays require greater care. A customer can have several tags, a report can have multiple line items, and an event may have several attendees. Turning an array into several CSV rows changes row cardinality and can duplicate parent data. This focused converter keeps arrays as serialized JSON text inside a single cell. That policy is deliberate: it prevents a hidden multiplication of records. If your analysis requires one row per nested item, define a separate transformation with explicit parent identifiers and test the expected result. Conversion is easier to trust when it names the flattening boundary instead of pretending all JSON shapes map naturally to a grid.

Understand CSV escaping before export

CSV looks simple because commas and line breaks are visible, yet cells can contain commas, quotation marks, or their own line breaks. The output here follows the common quoting rule: a value containing the selected delimiter, a double quote, or a line break is enclosed in double quotes, and every embedded double quote is doubled. For example, the text North, "A" becomes a single quoted CSV cell rather than two incorrect columns. The same rule is applied when semicolon or tab is selected as the delimiter. The receiving application still determines how it interprets the file, so preview the import in the destination program when accuracy matters.

Delimiter choice is a compatibility decision. Comma is widely recognized, while semicolon is common in regional spreadsheet settings where commas are used in decimal values. Tab-separated output can be convenient for pasting into a spreadsheet or tool that expects TSV. This page lets you choose one of those forms before conversion. Do not change a delimiter only because the file looks more readable in a text editor; choose the setting required by the next system. A clean CSV is a contract between the exporter and importer, not merely a string of punctuation.

Know what CSV can and cannot preserve

JSON distinguishes a number from a string, a boolean from the word “true,” and null from an absent key. CSV has no universal type grammar. It stores text cells and relies on the importing software or subsequent process to infer types. That can lead to leading zeroes being removed, long identifiers displayed in scientific notation, dates reinterpreted by locale, or strings starting with special characters being treated as formulas by a spreadsheet. The preview proves the CSV text shape; it does not guarantee how a separate application will display or coerce the cells.

For identifiers, codes, phone-like values, and account references, decide whether the downstream spreadsheet needs an explicit text import setting. For dates, use an unambiguous source representation such as an ISO-like date only if it matches the real business format. For null values, this converter writes an empty cell, which is a readable CSV convention but not a perfect round-trip representation. If you require lossless structure, keep the original JSON as the authoritative file and treat CSV as a derived view designed for tabular review or import.

Use the preview as a schema check

Before copying or downloading, scan the preview deliberately. Read the header row aloud in terms of the intended question: are these the columns someone needs to compare? Look for dotted nested keys, unexpected empty cells, array-shaped text, and columns that appear only after a later record. Then inspect representative rows near the beginning and end of the source. A table preview is more useful than a raw CSV block because it makes row boundaries and columns visible even when cell values contain punctuation.

The preview should not be mistaken for authoritative validation. It cannot tell whether a city name is current, whether a user is permitted to export a record, or whether a value is correct in the source system. It checks the local conversion rule. For a formal workflow, compare row counts to the source, retain the source JSON, document the selected delimiter and flattening choice, and review the imported result in the target system. These small checks catch data-shaping mistakes before the CSV is used in a report, upload, or business decision.

Fix parsing and shape errors methodically

When a parse error appears, fix the first structural problem reported and try again. An unterminated string often means a quote is missing or an unescaped quote appears inside a value. An unexpected token can signal a single-quoted key, a trailing comma, or text copied before or after the JSON document. Format the source with Toolyfi’s JSON Formatter if you need a clear indentation view. Avoid editing a large document blindly. Narrow the issue, correct it, and confirm the result parses before deciding how it should become CSV.

A parseable source can still have a table-shape problem. If every value appears in one wide cell, a nested object may need flattening. If one field contains a long bracketed array, decide whether a single JSON-text cell is acceptable. If many columns are empty, the records may represent different entities and deserve separate exports. The right answer depends on the data model, not on the converter. A transparent local tool should expose these choices, while the person who understands the source decides what the columns are meant to represent.

A practical local conversion workflow

Use a repeatable sequence when the CSV will be shared. First, retain the original JSON as an unchanged reference. Second, paste or prepare only the relevant record set. Third, convert with the default comma delimiter and flattening setting, then inspect headers, row count, and several examples. Fourth, adjust delimiter or flattening only when there is a clear destination requirement. Fifth, copy or download the output and import it into the target program using that program’s documented text-import options. This sequence prevents a convenient export from becoming an undocumented source of changes.

Browser-local conversion is especially practical for small and medium datasets, developer debugging, documentation examples, and one-off spreadsheet preparation. Very large inputs can use substantial memory in a browser, so a desktop or scripted workflow may be more suitable for high-volume production work. Never treat a “downloaded successfully” message as proof that a data pipeline is correct. Confirm counts, verify columns, retain the source, and use access controls where the data is sensitive. The goal is a useful table with a documented relationship to its JSON origin.

Choose related tools by the actual task

JSON conversion is often one step in a wider information workflow. If the source text needs validity or readable indentation first, use the JSON Formatter. If a field contains encoded URL components, inspect it with the URL Encoder & Decoder rather than changing the characters during CSV preparation. If a value is Base64 text, use the Base64 Encoder to decode or encode it deliberately. Each utility has a narrower responsibility, which makes the result easier to understand and review.

That separation is also an accuracy habit. Do not use CSV export to “clean” a broken JSON document or to infer a hidden schema. Convert only after the input is valid and the desired row model is understood. A spreadsheet-friendly table is valuable, but it is not a replacement for original records, domain validation, or permission checks. By keeping the transformation local, visible, and reversible through the retained source, you reduce the chance that a convenient copy-and-paste action becomes an unexplained data change.

Prepare the destination import, not only the export

A CSV file is only one side of a transfer. Before sending it to a spreadsheet, database import, or reporting service, read the destination's field requirements. Does it expect a particular delimiter, header spelling, line ending, character encoding, or date format? Does it treat an empty cell as a missing value, a null, or an instruction to overwrite an existing field? These questions cannot be solved by a converter alone. They belong to the contract of the importing system, and answering them before export is faster than correcting a partially imported dataset later.

A useful habit is to import a small representative sample into a non-production area first. Confirm that the header names map as intended, accents display correctly, leading zeroes survive, and multi-line cells remain one cell. Then compare the imported row count to the local preview. If a recipient needs a different delimiter or explicit text columns, make that choice in the export and record it with the source. An export is reliable only when both the CSV text and the receiver's interpretation are known.

Treat header names as a data interface

Column headers are not cosmetic labels. They are the names by which a human or import mapping identifies fields. The first-seen key order in this converter is predictable, but the upstream JSON may use technical field names, mix naming styles, or contain optional keys that appear late. Read the generated header row before downloading. A dotted name such as contact.city tells a reviewer that the value originated inside a nested object; a vague name such as value may signal that the source was scalar rather than record-shaped.

If a target system needs renamed headers, perform that mapping deliberately in a documented transformation rather than manually editing a downloaded file without a record. Manual edits can be appropriate for a one-off report, but they break a repeatable workflow when the next export arrives. Keep the original JSON keys, conversion settings, and any renamed column map together. That gives a later reviewer a way to understand how a human-friendly column relates to the source field.

Distinguish missing, empty, and null values

JSON can express several different states that look similar in a spreadsheet. A key may be absent, a key may be present with null, or a key may hold an empty string. CSV has less room for that distinction, so this converter represents null and missing values as an empty output cell. That is practical for a broad table preview, but it is not a lossless statement of the original data. Preserve the JSON whenever a receiving process needs to distinguish those cases.

Before an import, ask how the destination treats an empty cell. Some systems ignore it, some clear a value, and some reject it for a required field. A blank cell might mean “not provided” to one team and “unknown” to another. If that difference matters, create an explicit data rule before exporting, such as a separate status column or a carefully chosen literal marker permitted by the target system. Do not let a file format's limitation silently decide business meaning.

Be careful with spreadsheet interpretation

Spreadsheet applications can automatically coerce cell content. A string beginning with an equals sign, plus sign, minus sign, or at sign may be interpreted as a formula in some workflows. Long numeric identifiers may be shown in scientific notation, and leading zeroes can disappear. This converter exports the textual values it receives; it does not claim to neutralize every destination application's formula or type behavior. Review the import settings and data-handling rules used by the recipient.

For an operational export, use a controlled import path rather than opening an unfamiliar CSV with defaults and immediately saving it again. Set sensitive identifier columns to text where appropriate. Confirm that columns containing dates, codes, or account-like values display exactly as expected. If a file comes from another party, treat it as data rather than executable content and follow your organization's security procedures. CSV is simple text, but the application that opens it can attach additional behavior to that text.

Keep source provenance with the export

A CSV becomes difficult to audit when nobody can say where it came from, when it was produced, which source records were selected, or which transformation settings were used. Store the original JSON separately from the CSV, give each file a meaningful name, and record a brief note about the relevant array, delimiter, header choice, and flattening choice. This is useful even for internal analysis because it lets another person reproduce the table rather than treating it as an unexplained snapshot.

Provenance does not require a complicated platform for a small workflow. A dated folder, a README note, or a documented script can be enough. The important part is that the export remains traceable to source data and a known conversion rule. When data changes, repeat the same process rather than altering an old CSV in place. This protects the distinction between a refreshed report and a manually modified artifact.

Choose the right workflow for large data

Browser-local tools are convenient because they keep an ordinary conversion close to the person doing it. However, a very large JSON document can use substantial browser memory while it is parsed, flattened, rendered as a preview, and turned into one CSV string. If the page becomes slow, do not assume the data is damaged. Consider a dedicated local script, database query, or streaming transformation that is designed for the size and repeatability of the job. The correct tool depends on the volume, sensitivity, and recurrence of the export.

For large recurring exports, define limits and automated checks. Count source records, count output rows, verify a required column set, log errors, and retain a checksum or version identifier for the source. These checks move the work from an ad-hoc manual conversion toward a dependable pipeline. This page is intentionally focused on clear, browser-native inspection and export. It is not presented as an enterprise bulk-data engine, and transparent limits are part of an honest tool boundary.

Think about reversibility before sharing

Converting JSON to CSV often loses hierarchy, type distinctions, and some differences between missing and null values. That is why the original JSON should remain the system of record. You can create a new JSON structure from a CSV later, but it may not recreate the exact nested structure that existed before. A row with a dotted header is a useful convention, not an intrinsic JSON object. An array written inside one CSV cell is text that must be parsed again, not a relational table by itself.

Reversibility is a planning question. If another team needs to modify data and return it, agree on which columns are editable, which keys identify records, how blanks are handled, and whether nested arrays are in scope. Do not rely on an implicit round-trip through a spreadsheet. Use a defined import process, validate the returned data, and keep source versions. Clear boundaries make a simple CSV handoff safer for everyone involved.

Finish with a small quality checklist

Before you share an export, verify five things. First, the source JSON parses without repair. Second, the selected record set is the intended one. Third, the headers and row count in the preview are plausible. Fourth, nested-object and array handling match the purpose of the file. Fifth, the delimiter and import behavior suit the destination. These checks take less time than investigating a misaligned spreadsheet after it has been distributed. They also make a conversion decision explainable to a teammate.

The best outcome is not merely a CSV that opens. It is a table that represents source data honestly, carries enough context for the next user, and can be recreated when new source records arrive. Use local conversion for clarity, retain the original for fidelity, and treat each flattening or delimiter setting as a visible data-model choice. That approach turns a quick utility into a more reliable step in your work.

Practical questions

JSON to CSV Converter FAQ

Does this converter upload my data?

No. Parsing, shaping, export, copying, and download operate in the current browser tab without a submission step.

What JSON input shapes are accepted?

JSON arrays, objects, and scalar JSON are accepted. An array of objects is the most natural input for table output.

How are CSV columns chosen?

Keys found across the converted rows become columns in their first-seen order. Missing row values remain empty cells.

What does flatten nested objects mean?

It turns nested object properties into dotted headers such as customer.name. Arrays stay as JSON text in one cell.

Are commas and quotes escaped?

Yes. Cells containing a delimiter, quote, or line break are quoted and embedded quotes are doubled.

Can I use tab or semicolon output?

Yes. Select comma, semicolon, or tab before converting so the output aligns with the importing application.

Why do I see a JSON parse error?

JSON needs double quotes, valid nesting, and no trailing commas. The browser error points to a syntax issue to fix.

Will nested arrays become multiple rows?

No. This tool keeps an array as JSON text in one cell because exploding it changes the source record model.

Can CSV preserve JSON types exactly?

No. CSV is text-oriented; importing software may infer types. Keep original JSON when lossless structure matters.

Does the preview validate my data?

It validates the local table shape, not source authority or business correctness. Check source and destination separately.