JSON para CSV
Converta arrays JSON para o formato CSV.
Como usar JSON para CSV
- 1Cole seu array JSON
- 2Clique em Converter para CSV
- 3Copie ou baixe a saída CSV
Sobre JSON para CSV
O conversor JSON para CSV recebe um array JSON de objetos e o transforma em formato CSV. Os nomes de propriedade do primeiro objeto são extraídos e usados como cabeçalhos de coluna.
Principais recursos de JSON para CSV
- Convert a JSON array of objects to CSV format instantly
- Automatically extracts column headers from the first object's keys
- Properly quotes fields containing commas, newlines, or double quotes
- Handles missing properties in some objects (outputs empty cells)
- RFC 4180-compliant CSV output — compatible with Excel and Google Sheets
- Works entirely in-browser — no server upload required
- Copy or download the CSV output with one click
- Handles large JSON arrays efficiently
Formatos suportados
Formatos de entrada
Formatos de saída
Espera um array plano de objetos. Objetos aninhados são serializados como strings JSON na célula CSV.
Exemplos
Convert API response data to CSV for a spreadsheet
Export a JSON array from an API into a format ready for Excel or Google Sheets.
Entrada
[{"name":"Alice","role":"Admin","active":true},{"name":"Bob","role":"User","active":false}]Saída
name,role,active Alice,Admin,true Bob,User,false
Convert a JSON product catalog to CSV for bulk import
Prepare product data from a JSON file for bulk import into an e-commerce platform.
Entrada
[{"sku":"ABC-1","title":"Widget","price":9.99},{"sku":"ABC-2","title":"Gadget","price":24.50}]Saída
sku,title,price ABC-1,Widget,9.99 ABC-2,Gadget,24.50
Casos de uso comuns
- Exporting API response data into a spreadsheet for non-technical stakeholders
- Converting database JSON exports to CSV for bulk import into other systems
- Preparing JSON data for analysis in Excel or Google Sheets
- Generating CSV reports from JSON log or event data
- Converting JSON configuration arrays to CSV for data validation workflows
- Sharing structured data with colleagues who prefer spreadsheet tools
Solução de problemas
Only the first object's keys appear as headers
Solução
The tool derives column headers from the first object in the array. If different objects have different keys, only the first object's keys will become columns. Normalize your data so all objects have the same keys.
Nested objects appear as [object Object] in the CSV
Solução
Nested objects are serialized as JSON strings. For cleaner output, flatten your JSON structure before converting, or post-process the nested fields after import.
CSV does not open correctly in Excel
Solução
Ensure Excel is configured to use commas as the delimiter. In some regions, Excel defaults to semicolons. Open the CSV using the Data > Text Import Wizard to specify the comma delimiter explicitly.
Perguntas frequentes
What JSON structure is expected?
The tool expects a JSON array of objects, for example: [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Each object becomes a row, and the keys of the first object become the CSV headers.
Are nested objects supported?
Nested objects and arrays are serialized as JSON strings (using JSON.stringify) in the CSV cell. For fully flat output, flatten your JSON structure before converting.
What if some objects are missing certain keys?
If an object is missing a key that exists in other objects, the corresponding CSV cell will be empty. The tool uses the first object's keys as the definitive set of columns.
Can I import the CSV into Excel?
Yes. The output is RFC 4180-compliant CSV which Excel can open directly. If Excel misinterprets the delimiter, use Data > From Text/CSV to specify the comma as the delimiter manually.
How does the tool handle commas inside values?
Values containing commas, double quotes, or newlines are automatically wrapped in double quotes per the CSV standard. Inner double quotes are escaped by doubling them.
Is there a size limit for the JSON input?
There is no server-imposed size limit. The practical limit depends on your browser's available memory. Arrays with thousands of objects typically convert in under a second.
Is my data sent to a server?
No. All processing is done entirely in your browser using JavaScript. Your JSON data never leaves your device and is not stored or logged anywhere.
What happens if my JSON is invalid?
The tool will display an error message if the JSON cannot be parsed. Validate your JSON using the JSON Validator tool first to identify and fix any syntax issues.