{"id":474,"date":"2026-10-16T12:00:03","date_gmt":"2026-10-16T12:00:03","guid":{"rendered":"https:\/\/html-editor-online.com\/blog?p=474"},"modified":"2026-10-16T12:00:03","modified_gmt":"2026-10-16T12:00:03","slug":"transform-json-to-csv-flatten-nested","status":"publish","type":"post","link":"https:\/\/html-editor-online.com\/blog\/transform-json-to-csv-flatten-nested\/","title":{"rendered":"How to Transform JSON to CSV: Flatten Nested Objects and Pick a Delimiter"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To transform JSON to CSV, paste a JSON array of objects into the <a href=\"https:\/\/html-editor-online.com\/tools\/json_to_csv\" title=\"JSON to CSV\">JSON to CSV tool<\/a>, keep Header row and Flatten objects enabled, pick a delimiter, click Convert, then copy the result or download <code>data.csv<\/code>. Each object becomes one data row, and nested objects become dotted columns such as <code>address.city<\/code>. This guide uses a small input with a nested object and an array, shows the exact output shape, explains which delimiter suits comma or semicolon spreadsheet settings, and finishes with import checks for Excel and Google Sheets. Tool behavior and import steps were checked on October 7, 2026.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li class=\"\"><a href=\"#what-json-shape-lets-you-transform-json-to-csv-cleanly-1\">What JSON shape lets you transform JSON to CSV cleanly<\/a><\/li><li class=\"\"><a href=\"#check-the-json-before-you-convert-it-2\">Check the JSON before you convert it<\/a><\/li><li class=\"\"><a href=\"#a-worked-example-nested-address-and-a-tags-array-3\">A worked example: nested address and a tags array<\/a><\/li><li class=\"\"><a href=\"#steps-to-transform-json-to-csv-in-the-tool-4\">Steps to transform JSON to CSV in the tool<\/a><\/li><li class=\"\"><a href=\"#choose-the-right-delimiter-for-your-spreadsheet-5\">Choose the right delimiter for your spreadsheet<\/a><\/li><li class=\"\"><a href=\"#open-the-csv-in-excel-or-google-sheets-6\">Open the CSV in Excel or Google Sheets<\/a><\/li><li class=\"\"><a href=\"#verify-the-csv-and-treat-untrusted-cells-with-care-7\">Verify the CSV and treat untrusted cells with care<\/a><\/li><li class=\"\"><a href=\"#frequently-asked-questions\">Frequently asked questions<\/a><\/li><li class=\"\"><a href=\"#next-steps\">Next steps<\/a><\/li><li class=\"\"><a href=\"#sources\">Sources and further reading<\/a><\/li><\/ul><\/nav><\/div>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-1-438-1-e189cc39cff5c325-1024x576.jpg\" alt=\"Illustration of nested containers being sorted into tidy rows to transform JSON to CSV\" class=\"wp-image-487\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-1-438-1-e189cc39cff5c325-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-1-438-1-e189cc39cff5c325-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-1-438-1-e189cc39cff5c325-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-1-438-1-e189cc39cff5c325.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"what-json-shape-lets-you-transform-json-to-csv-cleanly-1\">What JSON shape lets you transform JSON to CSV cleanly<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Any JSON convert to CSV job starts with one question: which part of the document is the list of records? The converter accepts these shapes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>An array of objects.<\/strong> Each object becomes one data row. This is the cleanest input.<\/li>\n\n\n\n<li><strong>A single object.<\/strong> You get one row.<\/li>\n\n\n\n<li><strong>An array of arrays.<\/strong> Each inner array is written as a row, in order.<\/li>\n\n\n\n<li><strong>An array of plain values.<\/strong> You get one column.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A typical API response wraps the records in an outer object. That wrapper is not the records array, so paste only the array that holds the records:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{ &quot;data&quot;: &#091; { &quot;id&quot;: &quot;0042&quot; }, { &quot;id&quot;: &quot;0043&quot; } &#093;, &quot;meta&quot;: { &quot;page&quot;: 1 } }<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">From that response, paste <code>&#091; { \"id\": \"0042\" }, { \"id\": \"0043\" } &#093;<\/code>, not the whole object. If you paste the wrapper, you get a single row instead of one row per record. I cover that symptom in my guide on a <a href=\"https:\/\/html-editor-online.com\/blog\/json-to-csv-only-one-row\/\" title=\"JSON to CSV Only One Row\">JSON export that returns only one row<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your array-of-arrays input needs column names, put them in the first inner array yourself. The Header row checkbox does not generate names for that shape.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-2-438-2-71457ed76c07b023-1024x576.jpg\" alt=\"Magnifying glass inspecting a bracket-shaped data structure before conversion\" class=\"wp-image-489\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-2-438-2-71457ed76c07b023-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-2-438-2-71457ed76c07b023-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-2-438-2-71457ed76c07b023-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-2-438-2-71457ed76c07b023.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"check-the-json-before-you-convert-it-2\">Check the JSON before you convert it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Standard JSON, as defined in <a href=\"https:\/\/www.rfc-editor.org\/info\/rfc8259\/\" title=\"https:\/\/www.rfc-editor.org\/info\/rfc8259\/\" target=\"_blank\" rel=\"noopener\">RFC 8259<\/a> (published December 2017), requires double-quoted keys and strings, and it does not allow trailing commas or comments. A paste that breaks those rules will fail before it ever reaches a spreadsheet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/html-editor-online.com\/tools\/json_validator\" title=\"JSON Validator\">JSON Validator<\/a> checks syntax with the browser&#8217;s <code>JSON.parse<\/code> and returns a normalized copy. The <a href=\"https:\/\/html-editor-online.com\/tools\/json_formatter\" title=\"JSON Formatter\">JSON Formatter<\/a> pretty-prints a large payload so you can find the records array by eye. Neither one proves that the array you selected has the shape you want in a spreadsheet, so look at the structure yourself after validating.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the input is broken, <a href=\"https:\/\/html-editor-online.com\/tools\/json_repair\" title=\"JSON Repair\">JSON Repair<\/a> can fix common formatting mistakes, but a repair can change meaning. Compare the values against the source and fix whatever produces the bad JSON in the first place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep long numeric identifiers as strings in your source. <code>JSON.parse<\/code> can round large integers, which is why <a href=\"https:\/\/html-editor-online.com\/blog\/json-validator-changes-large-integer-id\/\" title=\"JSON Validator Changes Large Integer Id\">large integer IDs can change<\/a> when a validator normalizes them. Quoting an ID in the source is the safe choice.<\/p>\n\n\n<div class=\"wp-block-image heo-auto-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ad2b187bb265&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ad2b187bb265\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-3-438-3-fcf05788fc7fd9d9-1024x576.jpg\" alt=\"Branching nested data flattening into a single row of columns\" class=\"wp-image-491\" srcset=\"https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-3-438-3-fcf05788fc7fd9d9-1024x576.jpg 1024w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-3-438-3-fcf05788fc7fd9d9-300x169.jpg 300w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-3-438-3-fcf05788fc7fd9d9-768x432.jpg 768w, https:\/\/html-editor-online.com\/blog\/wp-content\/uploads\/2026\/10\/transform-json-to-csv-image-3-438-3-fcf05788fc7fd9d9.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"a-worked-example-nested-address-and-a-tags-array-3\">A worked example: nested address and a tags array<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This input has two records. The first has a nested <code>address<\/code> object and a <code>tags<\/code> array. The second is missing <code>postcode<\/code> and has <code>score<\/code> set to <code>null<\/code>. All data is fictitious.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&#091;\n  {\n    &quot;id&quot;: &quot;0042&quot;,\n    &quot;name&quot;: &quot;Ana Silva&quot;,\n    &quot;address&quot;: { &quot;city&quot;: &quot;Lisbon&quot;, &quot;postcode&quot;: &quot;01234&quot; },\n    &quot;tags&quot;: &#091;&quot;admin&quot;, &quot;beta&quot;&#093;,\n    &quot;score&quot;: 4.5\n  },\n  {\n    &quot;id&quot;: &quot;0043&quot;,\n    &quot;name&quot;: &quot;Ben Okoye&quot;,\n    &quot;address&quot;: { &quot;city&quot;: &quot;Leeds&quot; },\n    &quot;tags&quot;: &#091;&quot;trial&quot;&#093;,\n    &quot;score&quot;: null\n  }\n&#093;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With Flatten objects on and a comma delimiter, expect output shaped like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">id,name,address.city,address.postcode,tags,score\n0042,Ana Silva,Lisbon,01234,&quot;&#091;&quot;&quot;admin&quot;&quot;,&quot;&quot;beta&quot;&quot;&#093;&quot;,4.5\n0043,Ben Okoye,Leeds,,&quot;&#091;&quot;&quot;trial&quot;&quot;&#093;&quot;,<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact column order and spacing inside the <code>tags<\/code> cell may differ, so compare against your real output. Several things are worth noticing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Columns come from the keys found across all rows, so the missing <code>postcode<\/code> and the <code>null<\/code> score both become empty cells.<\/li>\n\n\n\n<li>The array stays as JSON text in one cell, whether flattening is on or not. It does not create extra rows. The cell is quoted because it contains quotes, and the embedded quotes are doubled.<\/li>\n\n\n\n<li>With flattening off, the whole <code>address<\/code> object would stay as JSON text in one cell instead of becoming two columns.<\/li>\n\n\n\n<li>An empty nested object produces no column. A literal key that contains a dot can collide with a flattened path, and the converter says the later value silently wins.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Because missing and null both turn into empty cells and CSV keeps no value types, this conversion is not reliably reversible. The IDs here are text like <code>0042<\/code>, which matters later in the spreadsheet, as the case of <a href=\"https:\/\/html-editor-online.com\/blog\/why-zip-code-02134-becomes-2134-csv-to-json\/\" title=\"Why Zip Code 02134 Becomes 2134 CSV to JSON\">ZIP code 02134 becomes 2134<\/a> shows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"steps-to-transform-json-to-csv-in-the-tool-4\">Steps to transform JSON to CSV in the tool<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the JSON to CSV tool and paste your JSON array, or import it from a file.<\/li>\n\n\n\n<li>Choose a delimiter. Use comma unless the receiving spreadsheet expects something else (see the next section).<\/li>\n\n\n\n<li>Tick <strong>Header row<\/strong> when the input is an array of objects, so the keys become the first line.<\/li>\n\n\n\n<li>Leave <strong>Flatten objects<\/strong> enabled if nested properties should get their own columns, such as <code>address.city<\/code>.<\/li>\n\n\n\n<li>Click <strong>Convert<\/strong> and read the output before you use it.<\/li>\n\n\n\n<li>Copy the CSV, or download it as <code>data.csv<\/code>.<\/li>\n\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This works because the converter walks each record, collects the keys across all rows into a column list, and writes one line per record. It quotes any cell that contains the delimiter, a quote or a line break, doubles embedded quotes, and ends rows with CRLF. Those quoting rules match the comma-separated convention in <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc4180.html\" title=\"https:\/\/www.rfc-editor.org\/rfc\/rfc4180.html\" target=\"_blank\" rel=\"noopener\">RFC 4180<\/a>, published in October 2005.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The downloaded file is UTF-8 without a byte-order mark. That detail matters for Excel, which I cover below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"choose-the-right-delimiter-for-your-spreadsheet-5\">Choose the right delimiter for your spreadsheet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A delimiter is the character that separates cells on each line. The choice depends on what will read the file.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Delimiter<\/th><th>Pick it when<\/th><th>Watch for<\/th><\/tr><\/thead><tbody><tr><td>Comma<\/td><td>The import expects conventional CSV.<\/td><td>Cells containing commas are quoted, which is normal.<\/td><\/tr><tr><td>Semicolon<\/td><td>The spreadsheet expects semicolons, often where a decimal comma is used.<\/td><td>Verify in the import preview; regional installations differ.<\/td><\/tr><tr><td>Tab<\/td><td>A downstream importer specifies tab-separated text.<\/td><td>This is delimiter-separated text, not RFC 4180 CSV.<\/td><\/tr><tr><td>Pipe<\/td><td>A downstream importer specifies pipes.<\/td><td>Same caveat as tab.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Semicolon changes only the separator. A number such as <code>4.5<\/code> in the JSON stays <code>4.5<\/code> in the output; the tool does not turn it into <code>4,5<\/code>. If your spreadsheet expects a decimal comma, check how the numbers land in the preview and adjust the column type or locale on import.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When in doubt, convert with comma, open the import dialog, and look at the preview. If everything lands in one column, re-import with a different separator or convert again with another delimiter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"open-the-csv-in-excel-or-google-sheets-6\">Open the CSV in Excel or Google Sheets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Excel, import the file instead of double-clicking it. Use <strong>Data &gt; From Text\/CSV<\/strong> and check the delimiter, the encoding and the column types in the preview. Microsoft documents that a UTF-8 CSV without a byte-order mark <a href=\"https:\/\/support.microsoft.com\/en-us\/excel\/opening-csv-utf-8-files-correctly-in-excel\" title=\"https:\/\/support.microsoft.com\/en-us\/excel\/opening-csv-utf-8-files-correctly-in-excel\" target=\"_blank\" rel=\"noopener\">may need import rather than direct opening<\/a>, and the downloaded file has no BOM. Accented characters are the thing to look for. The general steps are in Microsoft&#8217;s guide to <a href=\"https:\/\/support.microsoft.com\/en-us\/excel\/get-started\/import-or-export-text-txt-or-csv-files?ad=US&amp;rs=en-US&amp;ui=en-US\" title=\"https:\/\/support.microsoft.com\/en-us\/excel\/get-started\/import-or-export-text-txt-or-csv-files?ad=US&amp;rs=en-US&amp;ui=en-US\" target=\"_blank\" rel=\"noopener\">importing or exporting text and CSV files<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set identifier and postal code columns to text during import so leading zeros such as <code>0042<\/code> survive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Google Sheets, use <strong>File &gt; Import &gt; Upload<\/strong> and select the separator type in the import options. Google&#8217;s page on <a href=\"https:\/\/support.google.com\/docs\/answer\/12236443?hl=en\" title=\"https:\/\/support.google.com\/docs\/answer\/12236443?hl=en\" target=\"_blank\" rel=\"noopener\">importing files into Sheets<\/a> describes the dialog. Product pages do not promise identical behavior in every app version, so trust the preview over assumptions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"verify-the-csv-and-treat-untrusted-cells-with-care-7\">Verify the CSV and treat untrusted cells with care<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A clean conversion is not proof the data is right. After import, check these things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The column count matches the header you expected.<\/li>\n\n\n\n<li>The row count matches the number of records in your array.<\/li>\n\n\n\n<li>Accented characters and decimals look correct.<\/li>\n\n\n\n<li>Identifiers kept their leading zeros.<\/li>\n\n\n\n<li>Array cells still hold readable JSON text.<\/li>\n\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Be careful with untrusted data. The converter writes values that begin with <code>=<\/code>, <code>+<\/code>, <code>-<\/code> or <code>@<\/code> unchanged, and some spreadsheets can treat such values as formulas. Review that kind of input before you import it or share the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can load the CSV back with the <a href=\"https:\/\/html-editor-online.com\/tools\/csv_to_json\" title=\"CSV to JSON\">CSV to JSON tool<\/a> as a rough sanity check, but expect differences: nulls and missing keys are both empty, and CSV carries no JSON value types, so numbers, booleans and nulls will not reliably return as they were. The CSV round trip in my longer guide, <em><a href=\"https:\/\/html-editor-online.com\/blog\/convert-csv-to-json\/\" title=\"How to Convert CSV to JSON: The Complete Guide for Developers\">How to Convert CSV to JSON: The Complete Guide for Developers<\/a><\/em>, shows how those choices go the other way. If you still need to edit the JSON itself, the <a href=\"https:\/\/html-editor-online.com\/editors\/json\" title=\"JSON Editor\">JSON Editor<\/a> offers syntax validation and format or minify, with no tree view or JSON Schema validation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-1\">How to convert a JSON to CSV?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Paste a JSON array of objects into the JSON to CSV tool, choose a delimiter, tick Header row, leave Flatten objects on if you have nested objects, click Convert, then copy the output or download data.csv. Inspect the result before importing it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-2\">How do I change JSON to CSV when the objects are nested?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Keep Flatten objects enabled. A nested property such as address.city becomes its own column named address.city. With flattening off, the nested object stays as JSON text in a single cell.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-3\">What happens to arrays inside a record?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">They stay as JSON text in one cell, with or without flattening, and do not create extra rows. If you need one row per array item, restructure the data first so that array is the records array.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-4\">Which delimiter should I use for my regional spreadsheet settings?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use comma for conventional CSV. Use semicolon if your spreadsheet expects it, which is often the case where a decimal comma is used. Check the import preview rather than assuming, because installations vary. Semicolon does not change decimal numbers in the output.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-5\">Why did the leading zeros disappear in Excel?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Excel guesses column types and may treat 0042 as a number. Import through Data &gt; From Text\/CSV and set identifier and postal code columns to text. The CSV itself keeps the zeros as long as the JSON value was a string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-6\">Can I convert the CSV back into the same JSON?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not reliably. Missing keys and null both become empty cells, CSV keeps no value types, and arrays are stored as text. A dotted key can also collide with a flattened path, with the later value winning.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"faq-7\">Is it safe to open a converted CSV that came from untrusted JSON?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Review it first. Values beginning with =, +, &#8211; or @ are written unchanged, and some spreadsheets can interpret such values as formulas. Check or sanitize suspicious cells before importing or sharing the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"next-steps\">Next steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To transform JSON to CSV reliably, start from a records array, validate the syntax, convert with Header row and Flatten objects set deliberately, pick a delimiter that matches the importing app, and inspect the spreadsheet. Next, try the small example above in the converter, change the delimiter to a semicolon, and import both versions so you can see which one your spreadsheet reads correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Related tools and resources on HTML Editor Online:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/html-editor-online.com\/tools\/json_to_csv\">JSON to CSV<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/blog\/json-to-csv-only-one-row\/\">JSON to CSV Only One Row<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/tools\/json_validator\">JSON Validator<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/tools\/json_formatter\">JSON Formatter<\/a><\/li>\n\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sources\">Sources and further reading<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.rfc-editor.org\/info\/rfc8259\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.rfc-editor.org\/info\/rfc8259\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc4180.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.rfc-editor.org\/rfc\/rfc4180.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.microsoft.com\/en-us\/excel\/opening-csv-utf-8-files-correctly-in-excel\" target=\"_blank\" rel=\"noopener\">https:\/\/support.microsoft.com\/en-us\/excel\/opening-csv-utf-8-files-correctly-in-excel<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.microsoft.com\/en-us\/excel\/get-started\/import-or-export-text-txt-or-csv-files?ad=US&amp;rs=en-US&amp;ui=en-US\" target=\"_blank\" rel=\"noopener\">https:\/\/support.microsoft.com\/en-us\/excel\/get-started\/import-or-export-text-txt-or-csv-files?ad=US&amp;rs=en-US&amp;ui=en-US<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.google.com\/docs\/answer\/12236443?hl=en\" target=\"_blank\" rel=\"noopener\">https:\/\/support.google.com\/docs\/answer\/12236443?hl=en<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/html-editor-online.com\/tools\/json_to_csv\">JSON to CSV &#8211; Free Online JSON to CSV Converter | HTML Editor Online<\/a><\/li>\n\n\n<\/ul>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A beginner-friendly walkthrough for turning a JSON array into a spreadsheet-ready CSV: check the input, flatten nested objects, set the header row, choose a delimiter and verify the import in Excel or Google Sheets.<\/p>\n","protected":false},"author":1,"featured_media":486,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[128,129,127,130,47,131],"class_list":["post-474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-json-tools","tag-csv-delimiter","tag-excel-csv-import","tag-flatten-nested-json","tag-google-sheets-import","tag-json-to-csv","tag-json-tools"],"_links":{"self":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":5,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/474\/revisions"}],"predecessor-version":[{"id":492,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/posts\/474\/revisions\/492"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media\/486"}],"wp:attachment":[{"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/media?parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/categories?post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-editor-online.com\/blog\/wp-json\/wp\/v2\/tags?post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}