Saltar al contenido principal

Convertidor CSV a JSON

Convierte datos CSV a un array JSON de objetos al instante en tu navegador.

Input
0 chars | 0 bytes
Output
0 chars | 0 bytes

CSV is the lowest common denominator for data exchange — every tool exports it — but most modern application code expects JSON. Converting a CSV export to a JSON array unlocks it for use in JavaScript front-ends, Node.js scripts, REST API mock data, and NoSQL databases that store documents rather than rows.

This converter reads a CSV with a header row, maps each subsequent row to a JSON object keyed by the header values, and outputs a clean JSON array. It is the fastest way to turn a spreadsheet export into seed data for a database, a fixture for a test suite, or a payload for a bulk API import — without writing a throwaway script.

Cómo convertir CSV a JSON online

  1. 1

    Pega tu CSV

    Pega texto CSV en la entrada. La herramienta detecta automáticamente el delimitador (coma, punto y coma, tabulación o barra vertical).

  2. 2

    Asigna encabezados a claves

    La primera fila se convierte en claves de objeto JSON por defecto. Activa 'Sin fila de encabezado' para generar claves numéricas.

  3. 3

    Copia la salida JSON

    Copia la salida JSON con formato legible o usa el botón de intercambio para abrir el resultado en el Visor JSON.

How CSV-to-JSON Conversion Works

The parser reads the first row as column names and then maps each subsequent row positionally. Extra columns beyond the header are discarded; missing columns at the end of a short row produce null values rather than throwing an error. The challenge lies in type inference: should `"42"` become the number `42` or the string `"42"`? This converter performs conservative type coercion — plain integers and floats become JSON numbers, `"true"` and `"false"` become booleans, and everything else stays a string.

Quoted fields are unescaped per RFC 4180, including doubled double-quotes and embedded newlines. The output array is pretty-printed by default so it is immediately readable and diffable in version control, with an option to compact it for smaller file size when the result is destined for an API payload.

¿Por qué usar CSV a JSON de FileCrank?

  • ✓ Detecta automáticamente el delimitador con opción de anulación manual.
  • ✓ La primera fila se convierte automáticamente en claves JSON.
  • ✓ Salida con formato legible lista para pegar en código.
  • ✓ Funciona completamente en tu navegador, sin enviar datos a ningún servidor.

Características y Especificaciones

Tamaño máx. de archivo
Hasta 100 MB
Privacidad
Archivos eliminados tras aproximadamente una hora
Precio
Gratis, sin registro
Procesamiento
100% en el cliente
Soporte de portapapeles
One-click copy to clipboard
Tus datos nunca salen de tu navegador — todo el procesamiento es local.No se requiere cuenta ni registro.Gratis sin límites de uso.

Preguntas frecuentes

¿La primera fila de mi CSV se convierte en las claves JSON?

Sí. Por defecto la primera fila se trata como la fila de encabezado y se convierte en los nombres de clave en cada objeto JSON. Si tu CSV no tiene fila de encabezado, activa la opción 'Sin fila de encabezado' y la herramienta generará claves numéricas (col_0, col_1, etc.).

¿Qué ocurre si las filas de mi CSV tienen diferentes números de columnas?

Las filas con menos columnas que el encabezado tendrán valores null para las claves faltantes. Las filas con más columnas que el encabezado ignorarán los valores extra con una advertencia.

¿Cómo manejo un CSV que usa punto y coma en lugar de comas?

La herramienta detecta automáticamente el delimitador. Si la detección automática falla, abre las opciones de delimitador y selecciona punto y coma manualmente.

¿La salida JSON está minificada o con formato legible?

La salida está con formato legible por defecto. Puedes copiar la salida y minificarla usando la herramienta Visor JSON si necesitas una versión compacta en una sola línea.

Browser Converter vs. Python csv Module vs. Dedicated ETL

Python's `csv` module combined with `json.dumps` gives you full control but requires writing and running code. Dedicated ETL tools add scheduling and monitoring that are overkill for a one-time conversion. Spreadsheet macros can do it but produce inconsistent output depending on locale settings. A browser-based converter is the fastest path from a CSV file to a valid JSON array when you need the result immediately and reproducibility is not a requirement.

El Convertidor CSV a JSON de FileCrank convierte filas CSV en un array JSON de objetos, detectando delimitadores automáticamente y mapeando la primera fila como claves, en tu navegador.

Advertisement

Ad