JSON Lines to JSON Converter
Move between one-record-per-line JSON and arrays without hiding malformed records.
For JSON Lines input, keep each complete JSON value on one physical line.
Record handling
Output choices
The line break is part of the format
JSON Lines is not a JSON array with the brackets removed. Each non-blank physical line is its own complete JSON value. That makes records convenient to stream, append, grep, or process one at a time, but it also means a pretty-printed multi-line object is not one valid JSON Lines record.
A final newline is normal and is not counted here as an empty record. Blank lines inside the data are different: the JSON Lines documentation says each line must contain a JSON value, so an internal blank line is either skipped or deliberately converted to null according to the policy you choose.
Conversion should not silently rewrite valid-looking data
JavaScript's JSON parser can collapse duplicate object member names and can round numbers that carry more precision than its number type can represent exactly. A formatter that parses and serializes such input can therefore change the data even though parsing appears to succeed. Before conversion, each record is checked for duplicate decoded member names, negative zero normalization, non-finite conversion, excessive nesting, and precision-sensitive numeric tokens.
RFC 8259 recommends unique object member names and discusses the interoperability limits of numbers beyond common IEEE 754 binary64 precision. If a long numeric identifier must retain every digit, store it as a JSON string rather than relying on a generic JavaScript-number round trip. RFC 8259
Stopping and continuing mean different things
Stopping on malformed input keeps the converter from presenting a partial array as though it represented the whole source. Continue mode is useful when you are diagnosing a large export and deliberately want the valid subset, but the result is marked as partial and the rejected lines stay visible in the inspection report.
Adding source-line metadata is also explicit because it changes every record from its original value into an object containing a line number and value. That can be useful during debugging, but it should not be mistaken for a lossless representation of the source data model.
From an array back to JSON Lines
Array-to-lines mode serializes every array element as one compact JSON value. A single non-array JSON value becomes one output line rather than being rejected. Objects, arrays, strings, numbers, booleans, and null are all JSON values; downstream systems sometimes impose a stricter object-only rule, so check the receiving system before assuming every valid JSON Lines value is accepted there.
Format notes worth keeping nearby
The JSON Lines documentation specifies UTF-8, one valid JSON value per line, and a line terminator convention. It also says a UTF-8 BOM must not be included. This page treats a BOM at the beginning of the first record as an error rather than quietly stripping it. JSON Lines format notes
Browser limits are deliberate
The page caps pasted input at 2,000,000 characters, 20,000 physical lines, and 100 nested JSON levels. Those limits keep accidental multi-megabyte pastes or deeply nested records from turning a quick inspection into a frozen tab. Large production streams are better handled incrementally with a streaming parser or command-line pipeline.
