CSV To JSONLines

Login

Email
Password

Don't have an account yet?

Go to Sign up

{{ workbook ? 'Online Table Editor' : 'Input Data' }}
Change File Enter Data
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert CSV to JSONLines online — paste, edit, and download JSONLines.

Data Format:
Object Array
Each row as a JSON object or array
Indent:
Minified 2 Spaces 4 Spaces Tab
Parse JSON:
Intelligently parse JSON strings in cells into objects
Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is the CSV to JSONLines Converter?

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.


Core Features

Object Mode vs. Array Mode

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.

Indentation Control

OptionOutput
MinifiedSingle-line per object: {"name":"Alice","age":"30"}
2 SpacesPretty-printed with 2-space indent
4 SpacesPretty-printed with 4-space indent
TabPretty-printed with tab indentation

Minified output minimizes file size. Pretty-printed output improves readability during development and debugging.

Smart JSON Parsing

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.

Online Table Editor

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.

Privacy & Security

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.


How to Use the CSV to JSONLines Converter

Step 1 — Load Your Data

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.

Step 2 — Edit Your Data (Optional)

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.

Step 3 — Configure Output Options

In the Properties panel on the right:

  1. Data Format — Choose Object (header-as-keys) or Array (values-only).

  2. Indent — Select Minified for smallest file size, or 2 Spaces / 4 Spaces / Tab for readability.

  3. Parse JSON — Toggle on to auto-detect and parse JSON strings, booleans, and numbers in cells.

Step 4 — Convert

Click the Convert button. The JSONLines output appears in the Output Data panel.

Step 5 — Copy or Download

Click Copy to Clipboard to paste into your application, or click Download File (Premium) to save as a .jsonl file.


Practical Examples

Example 1: Server Logs Export

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"}

Example 2: ML Training Dataset with Nested JSON

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]".

Example 3: Database Seed Data (Array Mode)

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]"

]


Understanding JSONLines (NDJSON)

JSONLines vs. JSON Array

AspectJSON ArrayJSONLines (NDJSON)
Structure[obj1, obj2, obj3]obj1\nobj2\nobj3
Memory usageMust load entire fileRead line-by-line
Append supportRewrite entire arrayAppend one line
Parallel processingComplexEasy (split by newline)
Error isolationOne bad object breaks parsingOnly one line affected
File extension.json.jsonl or .ndjson

When to Use JSONLines

  • 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.

The Parse JSON Feature in Depth

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.


Frequently Asked Questions (FAQ)

  • Is my CSV data uploaded to a server?

    No. All file processing happens entirely in your browser using JavaScript. Your CSV data is never uploaded, transferred, or stored on any server.

  • What is JSONLines (NDJSON)?

    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.

  • What is the difference between Object and Array output?

    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.

  • What does Parse JSON do?

    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.

  • What file formats are supported?

    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.

  • Is there a file size limit?

    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.

  • Why use JSONLines instead of a JSON array?

    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.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.