CSV to Hierarchical JSON

Convert flat CSV to nested JSON

This tool transforms CSV data into a nested hierarchical structure based on specified columns.

Specify the column names to use for the hierarchy (in order from top to bottom). You can use:
  • Space-separated: Database Table Column (for columns without spaces)
  • Comma-separated with quotes: Database, "Table Name", "Column Name" (for columns with spaces)
Note: Column names must exactly match those in your CSV file, including spaces and capitalization.
When checked, repeated values will be merged instead of overwritten.
Example
Sample Input/Output

CSV Input:

Database,Table,Column,DataType,Nullable
SalesDB,Customers,CustomerID,INT,NO
SalesDB,Customers,Name,VARCHAR,YES
SalesDB,Orders,OrderID,INT,NO

Hierarchy: Database Table Column

JSON Output:

{
  "SalesDB": {
    "Customers": {
      "CustomerID": { "DataType": "INT", "Nullable": "NO" },
      "Name": { "DataType": "VARCHAR", "Nullable": "YES" }
    },
    "Orders": {
      "OrderID": { "DataType": "INT", "Nullable": "NO" }
    }
  }
}