utilitypot

Part of ModePot · Created by Tugrul Guner

CSV to nested JSON

Group repeated rows into nested JSON. Paste a CSV and choose a grouping column.

CSV rows

Add your data

Example: three rows → two customer groups: 001 has two items, 002 has one.

Group by a parent key. Other columns become child rows; values stay text.

Output structure and custom field mapping

Paste your source or load an example. Local actions stay in your browser.

JavaScript is required to run tool actions. Your source stays in this browser.

Try it, review it, reuse it

  1. Paste CSV text or upload a CSV, then choose the column that identifies each parent.
  2. Review which columns stay on the parent and name the child array. Build the JSON and inspect every group.
  3. Copy or download the result. Keep identifiers as strings when importing elsewhere.

Example: For Customer,SKU rows 001,A and 001,B, grouping by Customer gives one parent with two child rows. A second customer becomes a separate parent.

Keep this page bookmarked for your next task. Inputs are not saved for return visits.

How this tool works & limits

Group CSV rows without writing a transformation script

A flat converter creates one JSON object per row. This tool also supports grouping a parent record and collecting child records into one array. The default path needs only your CSV and a grouping column. It keeps the original column names in child rows. Advanced custom mapping can instead use one representative parent object as the desired shape; each leaf becomes an editable source-column mapping.

Example: one customer, several items

Repeated Customer values such as 001 become one parent. Map SKU to items[].sku and Qty to items[].quantity. Every child row is retained, including duplicates. Conflicting parent values and blank grouping keys are rejected rather than silently dropped.

Scope and limits

Up to 20 columns, 10,000 rows, nested objects and one child-array path. All values remain strings: quantities are not coerced, and leading-zero identifiers remain intact. Constants, arbitrary scripts, multiple child arrays, automatic deduplication and general schema inference are not supported. Grouping and field mappings are explicit settings; conversion stays in your browser without AI or uploading your CSV.