RH
Tool

CSV to JSON

Convert CSV data to JSON format

Client-side processing

CSV a JSON

Convierte datos en formato CSV a un array de objetos JSON. Perfecto para importar datos de hojas de cálculo a aplicaciones web o APIs.

Info

Convert CSV to JSON Online - Turn Spreadsheets into a JSON Array

Why convert CSV to JSON?

CSV is universal for spreadsheets and tabular data, but modern applications work in JSON. You need this conversion when importing spreadsheet data into a web application, seeding a NoSQL database, transforming exports from legacy systems, preparing data for REST APIs that expect JSON, and migrating from file-based systems to web applications. This tool parses CSV intelligently, working out both the structure and the data types.

Automatic type and structure detection

A CSV is only text, but this tool infers types: "42" becomes the number 42, "true" becomes a boolean, recognisable ISO dates are detected, and empty values become null. The header row becomes the object keys. Column names containing dots, such as user.name, can rebuild nested objects. Quoted values keep their spaces and special characters. Type detection can be switched off when you want everything as strings.

Handling CSV files from different sources

CSV files vary by origin: some spreadsheet locales export with semicolons and Windows-1252 encoding, Google Sheets exports commas and UTF-8, and legacy systems may use pipes or tabs. This tool detects the delimiter automatically by analysing the first line, and you can also set it by hand. It handles quoted multiline values, escaped quotes written as doubled quotes, the Excel BOM, and both LF and CRLF line endings, so parsing works regardless of where the file came from.

If you work with this tool, you will probably also find these useful JSON Formatter, YAML/JSON Converter, Fake Data Generator, JSON to CSV.

Frequently asked questions

Why are some numeric values converted as strings?

Values such as postal codes, phone numbers or IDs that begin with a zero are kept as strings so the leading zeros survive. If you need them as numbers, post-process the resulting JSON. The detection is deliberately conservative: when in doubt, it preserves the string.

How do I handle CSVs with no header row?

Enable the no-headers option and the tool generates generic keys such as col1, col2 and col3. You can also supply your own column names. Some legacy formats omit headers entirely or carry several metadata rows before the real data begins.

What about special characters and accents?

If you see mangled characters, the CSV is probably encoded in Windows-1252 or Latin-1 but is being read as UTF-8. Switch the encoding in the options. Files exported by older spreadsheet versions often need that correction, while modern exports from Google Sheets or web applications are usually UTF-8 already.

Can I convert only some columns of the CSV?

This tool converts the whole file. To pick specific columns, filter the resulting JSON, for example data.map(row => ({ name: row.name, email: row.email })). Alternatively, delete the columns you do not need from the CSV before converting.

© 2026
Roberto Hernando
|