Why this matters
JSON Lines (also called NDJSON or newline-delimited JSON) is the de-facto standard for streaming logs, database exports, and event pipelines. Each line is a self-contained JSON object, which makes it trivial to append records without loading the entire file into memory. The tradeoff is that most text editors and JSON formatters expect a single JSON array with commas and brackets, so opening a raw JSONL file in your editor gives you a wall of unformatted text that is painful to read and impossible to validate visually.
This formatter offers four modes in one tool. Beautify expands each line into pretty-printed JSON with proper indentation so you can actually read the structure. Minify collapses each record back to a single line for storage efficiency. The convert-to-JSON-array mode wraps all records into a single valid JSON array, which is what you need when feeding data into visualization libraries, testing frameworks, or APIs that expect traditional JSON. The reverse mode takes a JSON array and splits it back into newline-delimited records. All four modes process your data entirely in the browser.
Four processing modes
| Mode | Input | Output |
|---|---|---|
| Beautify | One JSON object per line | Indented, readable JSON per record |
| Minify | Formatted JSONL | Single-line JSON per record |
| Convert to JSON array | NDJSON | Single `[...]` JSON array |
| Convert to NDJSON | JSON array | One JSON object per line |
How to use it
Select your processing mode: Beautify, Minify, convert to JSON array, or convert to NDJSON.
Paste your JSONL or JSON input into the text area.
Click Run to process.
Copy the output or download it for use in your pipeline or application.
Testing your result
Paste a three-line JSONL input where the first two lines are valid JSON and the third has a missing closing brace. Run Beautify and confirm the tool reports an error on line 3, displaying the problematic content. Fix the line and re-run to verify all three records format correctly. Then switch to Convert to JSON array mode and confirm the output is a single valid JSON array with three elements. Take that array output, paste it into a JSON validator, and switch back to NDJSON mode to confirm it splits correctly into three lines.
Common mistakes
Pasting a standard JSON array into the NDJSON-to-array mode, which would wrap it in another layer of brackets and produce invalid output.
Having trailing blank lines in your JSONL input, which may produce empty entries in the array output.
Assuming the tool handles multi-gigabyte files — it is limited by your browser's available memory, and for very large logs a streaming tool like jq is more appropriate.
Edge cases and limitations
The tool processes the entire input as a single string in memory, so files larger than a few hundred megabytes may cause browser tab crashes depending on your device. Each line must be a complete, valid JSON object — the tool does not support multi-line JSON values within a single record. JSONL and NDJSON refer to the same format (one JSON object per line, no commas or brackets), and this tool handles both identically. All parsing happens in your browser with no data leaving your device.
Real-world use cases
A developer debugging a server log file by beautifying individual JSON records to trace the sequence of API requests and responses.
A data analyst converting a database export from NDJSON to a JSON array for import into a charting library or Jupyter notebook.
A DevOps engineer minifying pretty-printed JSONL before storing it in a version-controlled repository to reduce diff noise.
Frequently asked questions
Q: What is the difference between JSONL and NDJSON?
A: They are the same format — one JSON object per line, no commas or brackets. The tool can convert both to a JSON array and back.
Q: What if a line has invalid JSON?
A: The tool shows an error with the failing line content. Fix the line and re-run.
Q: Is there a size limit?
A: Only your browser's memory. For multi-GB logs, use a streaming tool like jq.
Q: Is my data uploaded?
A: No. Parsing happens entirely in your browser.
Q: Can I convert JSONL to CSV?
A: Not directly — convert to a JSON array first, then use the CSV to JSON Converter or JSON to CSV tool for the final format conversion.
Start using it now
Format, minify, and convert JSON Lines files with the JSONL Formatter. For standard JSON formatting, use the JSON Formatter. Convert between tabular formats with the CSV to JSON Converter or JSON to CSV, and generate schemas from your JSON structures with the JSON Schema Generator.