CSV para JSON
Transforme arquivos CSV em JSON estruturado com detecção automática de cabeçalhos.
Roda no seu navegador; seus dados nunca saem do seu dispositivoGrátis, sem cadastro
JSON output
The JSON output will appear here.
Como funciona
The CSV is parsed with a proper state machine that understands quoted fields, escaped quotes, embedded line breaks and CRLF endings. The first row becomes the JSON keys and every following row becomes an object.
With auto-detect enabled, the delimiter (comma, semicolon, tab or pipe) is inferred from the data and shown to you, so you can confirm or override it.
Recursos
- RFC 4180 parsing: quoted fields, escaped quotes, embedded newlines
- Automatic delimiter detection (comma, semicolon, tab, pipe) with manual override
- Optional type conversion for numbers, booleans and null
- Duplicate header names deduplicated automatically
- Copy, download, upload and clear actions
- 100% client-side processing
Como usar
- Paste CSV or upload a .csv/.tsv/.txt file.
- Let the delimiter auto-detect, or choose it manually. Optionally enable type conversion.
- Press Convert to JSON.
- Copy the JSON or download it as
converted.json.
Exemplo
Input:
name,age,city
John,30,"New York"
Sarah,25,LondonOutput (with type conversion on):
[
{ "name": "John", "age": 30, "city": "New York" },
{ "name": "Sarah", "age": 25, "city": "London" }
]Perguntas frequentes
- How does delimiter auto-detection work?
- The tool counts candidate delimiters (comma, semicolon, tab, pipe) outside quoted sections over the first ten lines and picks the most frequent. You can always override it manually if the guess is wrong.
- Are quoted fields and escaped quotes supported?
- Yes. Fields wrapped in double quotes may contain delimiters and line breaks, and doubled quotes (") inside a quoted field become a single quote, exactly per the CSV standard (RFC 4180).
- Why are all values strings by default?
- CSV has no types: 30 might be a number, an ID, or a product code. Keeping everything as strings is lossless. Enable 'Convert numbers, booleans & null' if you want numeric-looking cells parsed as JSON numbers (leading-zero strings like 007 stay strings to avoid corrupting IDs).
- Is my CSV uploaded to a server?
- No. Parsing and conversion happen entirely in your browser. Nothing is transmitted or stored.
- My CSV has no header row: can I still convert it?
- This tool expects the first row to be the header, since column names are needed to build JSON objects. If your file has no header, add one (e.g. column_1,column_2) before converting.