JSON Lines (also called NDJSON) is one JSON value per line. A JSON array is one JSON value that contains many items. This converter turns a JSON Lines file into a JSON array, and a JSON array into JSON Lines. It runs in the browser. Nothing is uploaded.
That is a different job from pretty-print. A formatter rewrites whitespace inside one JSON document. JSON Lines is a stream format used in logs, analytics exports, and some APIs. Each line must be a complete JSON value. A pretty-printed object that spans several lines is not JSON Lines.
Empty lines are skipped. A broken line names its line number and the parse error. JSON to JSON Lines needs a JSON array; a root object is refused. Each array item is written with JSON.stringify on one line.
{"id":1,"name":"Ada"}
{"id":2,"name":"Tom"}
{"id":3,"name":"Nia"}
JSON Lines to JSON becomes a three-item array. JSON to JSON Lines on that array returns compact lines again. Pretty-print inside a line is not required; the converter always emits compact lines.
Use JSON Lines when a log shipper or an OpenSearch-style bulk file gives you one record per line and you want an array for the JSON to CSV tool or for a test fixture. Use the other direction when you have an array and a tool that only reads NDJSON. If you only need to indent one object, use the JSON Formatter.
A line may be any JSON value: object, array, string, number, boolean, or null. Mixing those in one file is legal JSON Lines and becomes a mixed JSON array. That mixed array may then be refused by JSON to CSV, which wants rows. Conversion here still succeeds; the next tool may not.
JSON to JSON Lines always emits compact lines. It does not preserve the original spacing of the array you pasted. Numbers stay numbers. A string that contains a newline is still one JSON Line because JSON.stringify escapes that newline. Do not split those escaped lines by hand.
If line 12 is missing a comma inside an object, only line 12 fails. Earlier lines are not kept as a partial array. Fix the line, or validate a single record by pasting that line into the JSON Validator.
The shape difference is explained in JSON vs JSON Lines.
Parse and conversion run in this browser. Log lines are not sent to YallaSolve for this tool.
JSON Lines is one JSON value per line (NDJSON). Empty lines are skipped. JSON to JSON Lines needs a JSON array. This is not a log parser.
No. JSON Lines requires one complete JSON value on each line. A pretty-printed object that spans lines is a single JSON document, not NDJSON.
They are skipped. They do not become null items.
No. JSON to JSON Lines needs a JSON array. Wrap the object in an array if you want one line.
No. Each non-empty line must be JSON by itself. Extra prefixes fail parse for that line.