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.
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
- Paste CSV where the first row contains headers.
- Use dots for nesting (
address.city) and numbers for arrays (tags.0). - Leave delimiter on auto-detect, or set it manually.
- 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.
Standards and technical references
See the site-wide testing methodology for fixture categories, privacy checks and correction policy.
Frequently asked questions
How does type detection work?
Can it read semicolon or tab separated files?
What about quoted values containing commas?
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.