Conversor de CSV a JSON gratuito
El conversor de CSV a JSON analiza una tabla CSV en un array JSON de objetos, usando la primera fila como cabeceras. Maneja correctamente campos entrecomillados, comillas escapadas y comas dentro de los valores.
The reverse direction is the JSON to CSV Converter, and the table can be rearranged with the Text Column Formatter. To load the same rows into a database instead, the CSV to SQL Converter handles it.
Cómo usar CSV a JSON
- 1 Paste your CSV, or load a file. The first row is treated as the header.
- 2 Choose the delimiter if it is not a comma — semicolons and tabs are common.
- 3 Set whether values should be typed as numbers and booleans, or left as strings.
- 4 Copy or download the JSON array.
Cómo usarlo
Pega datos CSV (con una fila de cabecera) y haz clic en Convertir. El array JSON aparece a la derecha.
- La primera fila se convierte en las claves de los objetos
- Maneja valores entrecomillados y comas incrustadas
- Las filas vacías se omiten
Preguntas frecuentes
How are data types handled?
CSV has no types — every cell is text. The converter either keeps everything as strings, which is lossless and predictable, or infers numbers and booleans, which produces cleaner JSON but can misinterpret a value. A telephone number or a postal code with a leading zero should always stay a string.
What happens with a quoted field containing a comma or a newline?
It is handled correctly, provided the field is properly quoted. CSV's rule is that a field containing the delimiter, a quote or a line break must be wrapped in quotes, with internal quotes doubled. A file that does this is parsed correctly; a file that does not is genuinely ambiguous and will be misread.
Why does my output have an empty key?
Because the header row had a trailing delimiter or an empty column name, and a row had a value in that position. Renaming the column in the source, or removing the trailing delimiter, resolves it. Empty headers are a frequent artefact of spreadsheets exported from a selection that included an extra column.
Herramientas para desarrolladores relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con CSV a JSON: