CSV to Nested JSON

Turn CSV with dot-notation headers back into nested JSON objects and arrays — with automatic type detection.

Tool input is processed locally in your browser and is not submitted to CodeNimbleTools. Avoid pasting production secrets into any device or website you do not fully trust.

Nested JSON

  

About this tool

This is the reverse of flattening: headers like user.name and tags.0 become real nested objects and arrays. The parser is fully quote-aware, auto-detects your delimiter, and can convert numbers, booleans and null into proper JSON types.

Perfect for promoting spreadsheet-maintained data into structured JSON your app can consume.

How to use it

  1. Paste CSV where the first row contains headers.
  2. Use dots for nesting (address.city) and numbers for arrays (tags.0).
  3. Leave delimiter on auto-detect, or set it manually.
  4. Copy or download the resulting JSON.

Useful ways to apply it

  • Letting non-developers maintain data in a spreadsheet, then exporting to JSON.
  • Rebuilding structured objects from a flattened CSV export.
  • Converting lookup tables into JSON fixtures.
  • Migrating CSV product feeds into API-ready payloads.

Worked example

Example input

user.name,user.contact.email,score\nAda,ada@example.com,9.5

Expected output

[{"user":{"name":"Ada","contact":{"email":"ada@example.com"}},"score":9.5}]

Edge cases to check

  • Quoted fields may contain delimiters, line breaks and escaped double quotes.
  • Column path segments such as __proto__, prototype and constructor are rejected to avoid unsafe object assignment.
  • Automatic number/boolean/null coercion can be undesirable for identifiers with leading zeros or values that only look numeric.

Known limitations

Nested-column naming is a convention, not part of the CSV standard. Review coercion and path separators before using generated JSON as a schema source.

How this tool was reviewed

Reviewed with quoted cells, embedded delimiters/newlines, nested dot paths, array-like numeric segments, empty cells and unsafe path names.

Last reviewed: September 3, 2026 · Maintainer: William

Standards and technical references

Frequently asked questions

How does type detection work?
Values like 42, 3.14, true, false and null convert to real JSON types. Everything else stays a string. You can turn this off to keep all values as strings.
Can it read semicolon or tab separated files?
Yes — auto-detect samples the first row, or you can pick the delimiter explicitly.
What about quoted values containing commas?
The parser is RFC-4180 aware: quoted cells, escaped double quotes and embedded newlines are all handled correctly.

Privacy

Tool input is processed locally in your browser and is not submitted to CodeNimbleTools. Avoid pasting production secrets into any device or website you do not fully trust.