RevealTheme logo

Convertitore da CSV a JSON

Converte i dati CSV in un array JSON di oggetti. La prima riga viene trattata come intestazione.

Come usare questo strumento

  1. 1

    Paste your CSV — make sure the first row holds the column headers.

  2. 2

    Click Convert. Each following row becomes a JSON object keyed by the header names.

  3. 3

    Copy the JSON array, ready to drop into a JavaScript file, API mock, or seed script.

Che cos'è il Convertitore da CSV a JSON?

La conversione da CSV a JSON è l'inverso di quella da JSON a CSV. È utile quando riceve dati da un'esportazione di un foglio di calcolo o di un database e deve usarli in un'applicazione JavaScript. Questo strumento segue la RFC 4180: i campi tra virgolette vengono spacchettati, le virgolette doppie vengono prive di escape e le interruzioni di riga all'interno delle virgolette vengono conservate.

Casi d'uso comuni

  • Turn a clean spreadsheet of products, users, or locations into a JSON array to seed a database or mock an API.

  • Convert exported analytics or CRM data into JSON for a quick chart or dashboard prototype.

  • Build test fixtures from a CSV someone handed you, without writing a parser.

  • Migrate config that lives in a spreadsheet into a JSON file your app reads at build time.

  • Sanity-check a CSV's structure — malformed rows become obvious when the object keys stop lining up.

  • Hand front-end developers ready-to-use JSON instead of a raw export they'd have to parse themselves.

Domande frequenti

Quale separatore usa?
La virgola per impostazione predefinita. Il TSV (separato da tabulazioni) richiede una preelaborazione.
Come vengono gestiti i tipi?
Tutti i valori sono stringhe: JSON ha numeri tipizzati, ma analizzare il CSV senza uno schema è ambiguo. Converta i tipi nella sua applicazione.

Strumenti correlati