Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
JSONLines (also called NDJSON or JSONL) is a text format where every line contains one independent JSON object. Unlike a monolithic JSON array, JSONLines files can be read line-by-line — making them ideal for log processing, machine learning datasets, database imports, and streaming pipelines defined by the jsonlines.org specification.
The CSV to JSONLines Converter on A.Tools transforms any CSV or TSV file into newline-delimited JSON in seconds. Choose between object mode (header-as-keys) or array mode (values-only), control indentation, and optionally parse embedded JSON strings — all in the browser, with zero data leaving your device.
Object mode uses the CSV header row as property keys:
{"name": "Alice", "age": "30", "city": "New York"}
{"name": "Bob", "age": "25", "city": "London"}
Array mode outputs each row as a flat JSON array:
["Alice", "30", "New York"]
["Bob", "25", "London"]
Object mode produces self-describing data suitable for APIs and databases. Array mode produces compact output ideal for bulk imports and ML pipelines.
| Option | Output |
|---|---|
| Minified | Single-line per object: {"name":"Alice","age":"30"} |
| 2 Spaces | Pretty-printed with 2-space indent |
| 4 Spaces | Pretty-printed with 4-space indent |
| Tab | Pretty-printed with tab indentation |
Minified output minimizes file size. Pretty-printed output improves readability during development and debugging.
Enable Parse JSON to let the tool detect JSON strings embedded in cells and parse them into native JSON structures.
Without Parse JSON:
{"name": "Alice", "tags": "[\"admin\",\"user\"]"}With Parse JSON enabled:
{"name": "Alice", "tags": ["admin", "user"]}This detects JSON arrays, nested objects, booleans, and numbers within cell values and converts them from strings to their proper JSON types.
Edit your data in-browser before converting:
Undo / Redo — Full edit history.
Add / Delete Rows & Columns — Expand or trim the table.
Transpose — Swap rows and columns.
Delete Empty — Remove empty rows and columns.
Deduplicate — Remove duplicate rows.
ABC / abc / Abc — Batch case conversion.
Find & Replace — With regex support.
First Row as Header — Toggle header treatment for Object mode keys.
All processing runs client-side via the browser File API. Files are never uploaded, transmitted, or stored. No server-side logging of data content. Safe for production data, PII, and sensitive datasets.
Upload a .csv or .tsv file by dragging it onto the upload area, or click to browse. Alternatively, click Enter Data to type or paste data directly into the built-in table editor.
Use the toolbar to refine your data before conversion:
Add, insert, or delete rows and columns.
Transpose the table.
Remove empty rows/columns or duplicate rows.
Change text case (UPPERCASE, lowercase, Capitalize).
Find and replace values (supports regex).
Toggle First Row as Header to define column names for Object mode.
In the Properties panel on the right:
Data Format — Choose Object (header-as-keys) or Array (values-only).
Indent — Select Minified for smallest file size, or 2 Spaces / 4 Spaces / Tab for readability.
Parse JSON — Toggle on to auto-detect and parse JSON strings, booleans, and numbers in cells.
Click the Convert button. The JSONLines output appears in the Output Data panel.
Click Copy to Clipboard to paste into your application, or click Download File (Premium) to save as a .jsonl file.
Input CSV:
timestamp,level,message
2026-05-07T10:15:00Z,INFO,Server started
2026-05-07T10:15:01Z,WARN,High memory usage detected
2026-05-07T10:15:02Z,ERROR,Connection timeout to db.example.com
Settings: Object mode, Minified
Output:
{"timestamp":"2026-05-07T10:15:00Z","level":"INFO","message":"Server started"}
{"timestamp":"2026-05-07T10:15:01Z","level":"WARN","message":"High memory usage detected"}
{"timestamp":"2026-05-07T10:15:02Z","level":"ERROR","message":"Connection timeout to db.example.com"}
Input CSV:
label,features
positive,"[0.8, 0.3, 0.1]"
negative,"[0.1, 0.2, 0.9]"
Settings: Object mode, Minified, Parse JSON: On
Output:
{"label":"positive","features":[0.8,0.3,0.1]}
{"label":"negative","features":[0.1,0.2,0.9]}
Without Parse JSON enabled, features would remain a string: "features":"[0.8, 0.3, 0.1]".
Input CSV:
id,name,email
1,Alice,[email protected]
2,Bob,[email protected]
3,Carol,[email protected]
Settings: Array mode, 2 Spaces indent
Output:
[
"Alice", "[email protected]"
][
"Bob", "[email protected]"
][
"Carol", "[email protected]"
]
| Aspect | JSON Array | JSONLines (NDJSON) |
|---|---|---|
| Structure | [obj1, obj2, obj3] | obj1\nobj2\nobj3 |
| Memory usage | Must load entire file | Read line-by-line |
| Append support | Rewrite entire array | Append one line |
| Parallel processing | Complex | Easy (split by newline) |
| Error isolation | One bad object breaks parsing | Only one line affected |
| File extension | .json | .jsonl or .ndjson |
Log aggregation — Each log entry is a self-contained JSON object.
Machine learning datasets — Each training example is one line.
Database imports/exports — MongoDB mongoexport, Elasticsearch _bulk API, and BigQuery all use JSONLines.
Streaming pipelines — Kafka, Apache Beam, and AWS Kinesis commonly use NDJSON encoding.
Large datasets — Files that don't fit in memory can be processed incrementally.
CSV cells are inherently strings. A cell containing true is stored as the string "true", not the boolean true. The Parse JSON option performs intelligent type inference:
"true" / "false" → true / false (boolean)
"42" → 42 (number)
"[1,2,3]" → [1,2,3] (array)
'{"a":1}' → {"a":1} (nested object)
This produces semantically correct JSONLines output without manual post-processing.
No. All file processing happens entirely in your browser using JavaScript. Your CSV data is never uploaded, transferred, or stored on any server.
JSONLines (also called NDJSON or JSONL) is a format where each line of a file contains one independent JSON object. It is defined at jsonlines.org. Unlike a JSON array, JSONLines supports streaming and incremental parsing.
Object mode uses the first row as keys: {"name": "Alice", "age": "30"}. Array mode outputs plain arrays: ["Alice", "30"]. Use Object mode for self-describing data; use Array mode for compact bulk imports.
When enabled, the tool detects JSON values inside cells (arrays, objects, booleans, numbers) and converts them from strings to their proper JSON types. For example, the cell "[1,2,3]" becomes the actual array [1,2,3] in the output.
The tool accepts .csv (comma-separated values) and .tsv (tab-separated values) files. You can also enter data manually through the built-in table editor.
Processing is entirely client-side. The practical limit depends on your browser and device memory. Files up to several megabytes (tens of thousands of rows) typically work without issue.
JSONLines allows line-by-line reading and writing. You can append records without rewriting the file, process data in parallel, and isolate errors to individual lines. A JSON array requires loading the entire file into memory before parsing.