JSONConvert JSON Converter

JSON to CSV, SQL, YAML and XML: What Each Conversion Changes

JSONConvert Guides · Updated 2026-10-30 · All guides

JSON is a tree with typed leaves. Each target format drops something. This page lists what, per converter on this site.

TargetKeepsLoses or rewrites
CSV (home)Scalar values of the first object's keysKeys that only appear in later objects; nested structure becomes JSON text in a cell; no quoting rules for commas or newlines beyond JSON string escaping
SQL (home)Strings (quotes doubled), numbers, booleansKeys from later objects; nested values print as [object Object]; null and a missing key both print as nothing, giving VALUES (1, , true), which is not valid SQL
Flat JSONEvery leafStructure becomes path text; a source key containing . can collide with nesting and is counted
YAMLEverything JSON can expressNothing, provided the reader parses it back; strings that look like another type are quoted so they stay strings
XMLValuesTypes (everything is text); keys that are illegal XML names are rewritten; arrays become repeated elements, so a one-element array reads back as a single element

Nulls in the SQL output

[{"a":1,"b":null,"c":true}] becomes INSERT INTO records (a, b, c) VALUES (1, , true);. The empty slot is a syntax error in every SQL dialect. This is existing behaviour of the home-page SQL converter and is documented here rather than hidden; replace null with a value (or edit the statement to read NULL) before running it.

Ragged data

Objects in an array rarely share keys. The home converters take the first object's keys, so a field that first appears in row 40 is not in the output. Flatten the data and check the distinct-path count in the footer; if it is larger than the first row's key count, the first-row converters will drop columns.

Nested data into CSV or SQL

Run it through flatten first. Then each dotted path is one column. Array positions become part of the name (tags[0], tags[1]), so records with different array lengths produce different column sets.

Type fidelity

JSONCSV cellYAMLXML
"007""007""007" (quoted)007
007 is not valid JSON---
nullnullnullempty element
truetruetruetrue as text

XML cannot tell the string "true" from the boolean true. If the consumer cares, the schema has to say which.

Developer Sponsor / Partner
Copied to clipboard!