JSON to JSONL Converter
Convert a JSON array of records to JSONL, with one compact JSON object on each line.
JSON input
Up to 10 MB of UTF-8 input. Primitive values, null, primitive array members and BOM are not accepted.
JSONL output
Converted records appear here.
Why convert JSON records into lines?
One record on each line
A JSON array wraps records in brackets and separates them with commas. JSONL writes each object as its own complete JSON line. That shape helps tools process records one at a time instead of parsing an entire array. Conversion preserves parsed fields and values, but normal JSON parsing can resolve duplicate keys. Compare the result with the original before importing it elsewhere.
A file you can inspect
See the output and its record count before downloading a .jsonl file. Compare the first and last records with the source to catch an unexpected input shape. Every nonempty export ends with a newline, which makes concatenating files easier. The newline is recommended, not required by the JSON Lines specification. No blank lines are inserted between records.
Browser-side preparation
Conversion runs in your browser rather than posting the document to a conversion endpoint. A saved file still travels wherever you later upload or share it. Avoid putting customer secrets in an example URL or a shared link, and inspect where downstream systems store the resulting data. This page does not fetch a document from a remote URL.
What is JSONL?
JSON Lines, also called newline-delimited JSON or NDJSON, is UTF-8 plain text. Each physical line holds a complete JSON value. The format itself permits objects, arrays, strings, numbers, booleans and null. This converter deliberately accepts only object records: one top-level object or an array whose every member is an object. A blank line is not a valid JSON value, and an output file has no UTF-8 byte order mark.
For example, [{"id":1},{"id":2}] is one JSON array. Its JSONL output has {"id":1} on the first line and {"id":2} on the second, without outer brackets or commas between records. A newline inside an object string is escaped during serialization, so it does not split the record. Parsing first matters: splitting the original input at commas would break strings and nested objects. Empty [] gives zero records and an empty result, not a fake download.
Format and input rules
- InputA JSON array of objects, or one JSON object. Null, a primitive, and arrays containing non-objects are rejected.
- EncodingDownloaded bytes are UTF-8 without a BOM. Unicode names and symbols remain valid JSON strings.
- Line endingsEach nonempty output record ends with LF (\n); no pretty-printed physical lines.
- LimitInput is limited to 10 MB of UTF-8 bytes. Larger documents need a local streaming tool.
Common Use Cases
Batch imports
When a loader expects one object per line, remove the array wrapper without changing the record values. Check whether that particular loader also imposes field or size rules.
Log fixtures
Make a small collection of event objects easy to compare line by line. An empty source array stays empty rather than turning into a blank record.
Shell inspection
Sample or filter records with line-oriented commands after export. Use a UTF-8-aware command, and do not confuse the original array line number with an output record number.
Four-step conversion check
Paste source JSON
Enter an array of object records or a single object. Use the example button only if you want a harmless sample.
Convert
Press Convert to JSONL. If parsing or record validation fails, correct the source; your input remains available while old output is cleared.
Inspect the result
Read the record count and compare the first and last lines with the source. An empty array has zero records and no download.
Copy or download
Copy a small result, or download the actual UTF-8 .jsonl file. If clipboard access is denied, select the visible output manually.
What changes and what stays?
No array wrapper
Brackets and commas between top-level objects disappear. Nested arrays inside an object remain part of that object and serialize on one physical line.
Explicit record policy
The JSON Lines format permits any JSON value, but this page is for object records. It rejects primitive array members rather than silently discarding them.
Predictable export
The downloaded filename ends in .jsonl, with UTF-8 bytes and a final LF for each nonempty record. Copy and download use the same displayed result.
Tips for downstream use
- •Check your loader. Valid JSONL is not necessarily valid input for every destination. Some loaders expect specific object fields or maximum sizes.
- •Preserve Unicode. Accented names and non-Latin text are encoded as UTF-8. Keep that encoding when opening or transmitting the saved file.
- •Avoid blank lines. An empty physical line is not a JSON value. This converter does not add blank separators between records.
- •Check sensitive data. Browser conversion does not control where you later store, upload, paste, or share the output. Verify each handoff separately.
Make a line-oriented export
Paste records above, convert, then inspect count and sample lines before exporting. Keep the original source available until you confirm that the destination reads the file as intended. If an error appears, fix the source instead of reusing a stale export. Browse the hub to format and convert data.
If you want readable indentation without changing structure, validate and format JSON. For a spreadsheet source, first convert CSV into JSON records; for a YAML source, convert YAML to JSON. This page is intended for object-record export, not for turning every JSON value into a separate line.
Related tools
Frequently Asked Questions
Is JSONL the same as NDJSON?
JSON Lines and newline-delimited JSON (NDJSON) both describe JSON values separated by lines. This converter writes one object per line and a final LF after each record.
Does input need an array?
No. A single JSON object becomes one record. An array must contain only objects; an empty array produces zero records and no downloadable file.
Are empty lines valid JSONL?
No. A blank physical line is not a JSON value. A final LF terminates the last record but does not create another blank record.
Will keys or data types change?
Normal JSON parsing and serialization retain parsed values and Unicode text, but may resolve duplicate keys and do not preserve original spacing or numeric spelling. Inspect the output before importing it.