# Convertitore JSON in CSV > Come trasformi JSON in CSV o CSV in JSON? Converti JSON in CSV e CSV in JSON, con dati annidati distribuiti in colonne, direttamente nel browser. Converti JSON in CSV o CSV in JSON nel browser. Gli oggetti annidati diventano colonne con nomi puntati, le virgolette seguono RFC 4180. Nessun caricamento. A preset of [Convertitore di formati di dati](https://how.box/it/format-converter/). - Page: https://how.box/it/json-csv/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/it/about/terms/ ## Inputs Answer link: https://how.box/it/json-csv/?from={from}&to={to}&text={text}&flat={flat}&header={header}&delim={delim}&sep={sep}&types={types}&indent={indent} - `from` (json, csv, tsv or yaml): The source format: json, csv, tsv or yaml. Example: `json`. - `to` (json, csv, tsv or yaml): The written format: json, csv, tsv or yaml. Example: `csv`. - `text` (text): The text to convert. Example: `[{"a":1}]`. - `flat` (boolean): Flatten nested data to dotted columns, or rebuild it: 1 or 0. Example: `true`. - `header` (boolean): Reading CSV or TSV: the first row holds the names: 1 or 0. Example: `true`. - `delim` (auto, comma, semicolon, tab or pipe): Reading CSV: auto, comma, semicolon, tab or pipe. Example: `auto`. - `sep` (comma, semicolon or tab): Writing CSV: the separator, comma, semicolon or tab. Example: `semicolon`. - `types` (boolean): Reading CSV or TSV: write numbers and booleans as values: 1 or 0. Example: `true`. - `indent` (2 or 4): Writing JSON or YAML: 2 or 4 spaces. Example: `2`. Example answer: https://how.box/it/json-csv/?from=json&to=csv&text=%5B%7B%22a%22%3A1%7D%5D&flat=1&header=1&delim=auto&sep=semicolon&types=1&indent=2 The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `format_converter_convert`: Converts data text between JSON (RFC 8259), CSV (RFC 4180), TSV and YAML (a JSON-compatible subset of YAML 1.2: no anchors, aliases, tags or several documents) in the browser. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"format_converter_convert","arguments":{"from":"json","to":"csv","text":"[{\"a\":1}]","flatten":true,"header":true,"delimiter":"auto","csv_delimiter":"semicolon","infer_types":true,"indent":"2"}}}` - GET: https://how.box/mcp/run/format_converter_convert?from=json&to=csv&text=%5B%7B%22a%22%3A1%7D%5D&flatten=true&header=true&delimiter=auto&csv_delimiter=semicolon&infer_types=true&indent=2 ## How it works CSV è una tabella scritta come testo: un record per riga, campi separati da virgole. Un campo che contiene una virgola, una virgoletta doppia o un a capo viene racchiuso tra virgolette doppie e una virgoletta interna viene raddoppiata (RFC 4180). JSON è un albero di oggetti e array, quindi trasformarlo in tabella richiede una regola per l’annidamento. Lo strumento usa la regola abituale: ogni oggetto in un elenco diventa una riga, ogni chiave una colonna e ogni valore annidato una colonna con il nome del suo percorso. Un oggetto con un nome, un born.year annidato e un elenco di tag ha le colonne name, born.year e tags.0. Le chiavi mancanti da una riga lasciano una cella vuota. Nella conversione inversa, le intestazioni puntate ricostruiscono l’annidamento e un passaggio numerico crea un array. CSV non ha tipi, quindi rileggerlo richiede un’interpretazione. Con il rilevamento dei tipi attivo, 42 diventa un numero, true e false diventano booleani e una cella vuota diventa null; un valore come 007 non è un numero JSON e resta testo, così come gli interi troppo grandi per essere esatti. I file dei fogli di calcolo europei usano spesso il punto e virgola, che lo strumento rileva. In scrittura usa solo le virgole di RFC 4180. ## FAQ **Come viene trasformato in CSV il JSON annidato?** Ogni valore annidato riceve una colonna con il nome del suo percorso, come address.city o tags.0. Disattiva l’opzione per scrivere i valori annidati come testo JSON in una cella. **Il JSON può essere un singolo oggetto?** Sì. Un oggetto produce una riga. Un elenco di oggetti produce una riga per ciascuno. **Gli zeri iniziali, come in un CAP, vengono mantenuti?** Sì. Un valore come 00501 non è un numero JSON valido, quindi resta testo. Disattiva il rilevamento dei tipi per mantenere tutte le celle come testo. **Il mio CSV usa i punti e virgola. Funziona?** Sì. Il separatore viene rilevato dalla prima riga oppure puoi sceglierlo. **I miei dati vengono caricati online?** No. La conversione avviene nel browser. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/it/about/agents/)