JSON Lines Converter

Live

JSON Lines Converter converts JSON Lines (also called NDJSON) to a JSON array, and a JSON array to JSON Lines.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

What is JSON Lines Converter?

JSON Lines Converter converts JSON Lines (also called NDJSON) to a JSON array, and a JSON array to JSON Lines. Numbers with 16 or more digits can lose their last digits, and the page warns you.

How It Works

  1. Enter JSON Lines text or a JSON array, pasted or from a file in the input fields on this page.
  2. Press the button to run JSON Lines Converter.
  3. Read the converted JSON, with an error message that names the line if one is invalid in the result area, and copy or download it.

Common Uses

Good to Know

Choose One line for a compact array.

How it works

To make an array, choose JSON Lines to a JSON array and paste or open the file. Each non-empty line must be one JSON value. Choose an indented or one-line layout for the result.

To go the other way, choose JSON array to JSON Lines. Each item of the array becomes one line. If a line is not valid JSON, the page tells you which line number to fix.

Worked example

80 random sets of items (nested objects and lists, quotes, line breaks, tabs, accents, Japanese text, emoji, true, false and null) were written as JSON Lines with Windows and Unix line endings and blank lines, converted to an array in all four layouts, and compared with Python's json module, text and all. The array converted to lines matched too, and errors named the right line.

Limits

Numbers with 16 or more digits can lose their last digits, so the page warns you when it sees one. A number such as 1.0 is written as 1. Blank lines are skipped. Files up to 30 MB.

Frequently Asked Questions

What is JSON Lines?

A text format with one JSON value on each line, also called NDJSON. It is common for logs and large data exports.

Why does a line show as invalid?

Each line must be complete JSON on its own, so a value spread over several lines is not valid in this format.

Is my data uploaded?

No. It is converted in your browser.

What does JSON Lines Converter do?

JSON Lines Converter converts JSON Lines (also called NDJSON) to a JSON array, and a JSON array to JSON Lines. Numbers with 16 or more digits can lose their last digits, and the page warns you.

What do I need to enter in JSON Lines Converter?

JSON Lines text or a JSON array, pasted or from a file.

Is my data private in JSON Lines Converter?

Nothing is uploaded.

Is MyToolDock JSON Lines Converter free to use?

Yes, MyToolDock JSON Lines Converter is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.

Where can I learn more about JSON Lines Converter and related workflows?

MyToolDock publishes written guides on the topic: CSV to JSON: Simplifying Web Data Imports; Why You Need JSON Formatting and Validation. Each guide links back to the tools it covers.

Related Tools

Remove Blank Lines Remove Duplicate Lines Shuffle Text Lines Sort Text Lines Alphabetically JPG to PNG Converter JSON to CSV

Guides

More in Converter Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!