Saltar al contenido principal
Z

How to Convert CSV to JSON (Step by Step)

Convert a CSV file or text into JSON in your browser — step by step, with a free CSV to JSON converter.

Turning tabular CSV into nested JSON is a one-step job:

  1. 1

    Open the converter

    Open the CSV to JSON tool.

  2. 2

    Paste your CSV

    Paste your CSV (including the header row) into the input.

  3. 3

    Get JSON

    Each row becomes a JSON object keyed by the header. Copy or download the result.

Do it now

Preguntas frecuentes

¿Qué pasa si mis encabezados tienen espacios o caracteres especiales?

Se reemplazan por guiones bajos, ya que los nombres de elemento XML no pueden contener esos caracteres. Los encabezados que empiezan con un dígito reciben el prefijo `_`.

¿Necesitas una estructura XML diferente (con atributos en lugar de elementos hijos)?

Convierte primero el CSV a JSON con <a class="text-brand-600 hover:underline" href="/csv-to-json">CSV to JSON</a>, edita el JSON y luego usa <a class="text-brand-600 hover:underline" href="/json-to-xml">JSON to XML</a> con un prefijo de atributo (attribute prefix).

¿Puedo dar un formato más elaborado (pretty-print) al resultado?

El resultado ya se genera con sangría. Usa <a class="text-brand-600 hover:underline" href="/xml-formatter">XML Formatter</a> si necesitas otra sangría o quieres minificarlo.