Skip to content
Free developer tool

JSON Lines to JSON converter

This converter switches between JSON Lines, where each line holds one JSON value, and a regular JSON array. Data engineers and developers use it for log files, machine learning datasets, database exports and API batch files.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

87 characters

Direction

Result

[
  {
    "id": 1,
    "name": "Ada"
  },
  {
    "id": 2,
    "name": "Grace"
  },
  {
    "id": 3,
    "name": "Linus",
    "tags": [
      "kernel"
    ]
  }
]

The short answer

JSON Lines puts one complete JSON value on each line, which makes large files easy to stream and append to. Converting to a JSON array wraps the lines in brackets with commas between them. Going the other way writes each array item on its own line.

FormulaJSON Lines: one JSON value per line; JSON array: [line1, line2, ...]

Worked exampleThe 3 lines for Ada, Grace and Linus become one JSON array of 3 objects with 2-space indentation, and only the third object, Linus, has a tags array holding kernel.

Example

Input
{"id":1,"name":"Ada"}
{"id":2,"name":"Grace"}
{"id":3,"name":"Linus","tags":["kernel"]}
Result
[
  {
    "id": 1,
    "name": "Ada"
  },
  {
    "id": 2,
    "name": "Grace"
  },
  {
    "id": 3,
    "name": "Linus",
    "tags": [
      "kernel"
    ]
  }
]

How to use the json lines to json converter

  1. Paste JSON Lines or a JSON array into the box.
  2. Choose a Direction: JSONL to JSON, or JSON to JSONL.
  3. The result updates as you type (Run also works). Use Copy result or Download to save it.

How it works

Each nonblank line must be one complete JSON value. Blank lines are skipped, and both LF and CRLF line endings work.

The first invalid line stops the conversion and is reported with its line number and column.

The JSON array is printed with 2-space indentation. In the other direction, each array item is written compactly on its own line.

Numbers keep their exact digits and key order is kept, so large IDs are not rounded.

Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.

Questions and answers

What is the difference between JSONL and JSON?

A JSON file holds one value, often an array. JSON Lines holds one value per line, so programs can read or append one record at a time.

Are .jsonl and .ndjson the same?

They are very close. Both put one JSON value on each line, separated by line breaks.

Can a JSON Lines record span several lines?

No. Each record must fit on one line, so line breaks inside strings must be written as \n.

Is my data uploaded?

No. It runs in your browser, and nothing you paste is sent to a server.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools