DevTools Logo

CSV to JSON Converter

CSV to JSON Converter

Paste CSV data and get pretty-printed JSON — supports delimiters, header toggle, and value trimming

Input & Settings

Try a sample:

Examples

CSV with headers → array of objects

name,age,city
Alice,30,New York
Bob,25,Boston

// Output:
[
  { "name": "Alice", "age": "30", "city": "New York" },
  { "name": "Bob",   "age": "25", "city": "Boston"  }
]

With the 'First row is header' toggle on, each subsequent row maps to a JSON object whose keys come from the header row.

Headerless CSV → array of arrays

Alice,30,New York
Bob,25,Boston

// Output:
[
  ["Alice", "30", "New York"],
  ["Bob",   "25", "Boston"]
]

With headers disabled, every row becomes a plain array of strings, preserving the original column order.

Details

This tool uses the PapaParse library to reliably parse CSV text in your browser. When 'First row is header' is enabled, each data row becomes a JSON object keyed by the header names. When disabled, rows become plain arrays. Auto-delimiter detection picks the right separator automatically, or you can force comma, semicolon, or tab. The trim option strips leading and trailing whitespace from every value before serialisation. All processing happens locally — your data never leaves your browser.

    About this tool

    CSV to JSON Converter runs entirely in your browser on DevTools — no signup, no upload.

    What this tool does not do

    • CSV to JSON Converter is a free in-browser utility, not a hosted API, and keeps no server-side history.

    How to use this tool

    1. Using CSV to JSON Converter

      Open CSV to JSON Converter, enter or paste your input, and copy the result.