Productivity and Utilities

NDJSON to JSON Converter

Paste NDJSON or a JSON array to convert it to the other form.

One JSON value per line, or a JSON array. Up to 2,000,000 characters.

    Everything runs in your browser and nothing is uploaded. Blank lines are skipped. A line that is not valid JSON stops the conversion and is named by its line number. Numbers beyond about 16 digits lose precision in any JavaScript tool, so keep very large IDs as strings.

    Next step

    How to use the ndjson to json converter

    1. Paste NDJSON (one JSON value per line) or a JSON array.
    2. Choose NDJSON to array or Array to NDJSON.
    3. For the array, choose the layout: indent of 2 spaces, 4 spaces or one line.
    4. Read the result and the count. A line that is not valid JSON stops the conversion and is named by its number. Copy or download the result.

    What NDJSON is

    Newline delimited JSON, also called JSON Lines, puts one complete JSON value on each line, with no commas between lines and no surrounding brackets. It is common for logs, exports and streams, because a program can read one line at a time without loading the whole file. A JSON array holds the same records inside one pair of brackets. Converting between them lets you inspect a log in a formatter or feed an array to a tool that wants lines.

    Going from lines to an array, the page parses each line, skips blank lines and wraps the values in an array with the indentation you choose. Three lines with objects for Ada, Grace and Linus become an array of three objects. Going from an array to lines, each item becomes a compact one-line value, so the array [{"a":1},[1,2],"x",null,3.5,true] becomes six lines.

    Errors and limits

    If any line is not valid JSON, the page stops and names the line, because a silent skip could hide a lost record. Blank lines are allowed and counted. Windows, Unix and old Mac line breaks all work. The values may be objects, arrays, strings, numbers, booleans or null.

    JavaScript reads numbers as 64-bit floating point, so integers beyond about 16 digits lose precision in this and any browser tool. Keep very large identifiers as strings. Key order is preserved, and duplicate keys inside one object keep the last value, as JSON parsers do. The page checks only that the JSON is valid and does not check it against a schema.

    Related tools and privacy

    Tidy the array with the JSON Formatter and Validator, browse it with the JSON Viewer, turn the records into a table with the CSV to JSON Converter or flatten nested records with the JSON Flatten and Unflatten Tool. Everything runs in your browser, and your data is never uploaded, which matters for logs that may hold private details.

    Assumptions and limits

    • Each non-blank line holds one complete JSON value. A value may not span several lines.
    • Up to 2,000,000 characters are read.
    • Numbers beyond about 16 digits lose precision, as in any JavaScript tool.
    • Nothing is uploaded or stored.

    Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

    Frequently asked questions

    How do I convert NDJSON to JSON?

    Paste the lines into the box with NDJSON to array selected. Each line is parsed and the values are wrapped in a JSON array with the indentation you choose.

    What is the difference between NDJSON and JSONL?

    They are the same idea: one JSON value per line. JSON Lines is the name of the format and newline delimited JSON describes it. The page handles both.

    What happens when a line is invalid?

    The conversion stops and the page names the line number and what the parser found, so you can fix it. Nothing is skipped silently.

    Can I convert a JSON array back to lines?

    Yes. Choose Array to NDJSON and each item of the array becomes one compact line. The JSON you paste must be an array at the top level.