JSON ⇄ JSONL Converter
Convert between JSON arrays and NDJSON (one JSON per line) in both directions, validating line by line and flagging bad line numbers; handles large text with a 10MB batching hint.
>_ USAGE GUIDE
NDJSON (newline-delimited JSON) — one JSON object per line — is common in log pipelines and streaming APIs. This tool converts both ways and validates line by line.
Typical steps:
- Paste content: a JSON array or several NDJSON lines; direction defaults to "Auto"
- Choose direction: in Auto, a leading
[means array→NDJSON, otherwise NDJSON→array; you can also force a direction - Pretty toggle: for NDJSON→JSON, tick "pretty output" to get an indented array, otherwise a single compact line
- View result: output shows the conversion; bad lines are flagged red with their line numbers, and one bad line never spoils the rest
>_ FAQ
Q1 · What is NDJSON?
NDJSON (Newline-Delimited JSON) puts one independent JSON object per line, separated by newlines — easy to stream and process line by line, common in logs and big-data pipelines.
Q2 · How are bad lines handled?
Each line is parsed independently. When a line is invalid JSON, its number is recorded and flagged red in the message area, while every other valid line still converts.
Q3 · What about very large text?
Conversion runs locally on strings only — zero upload. Above 10MB a "batching recommended" hint appears; true streaming is not implemented yet, so split huge files and convert in chunks.
Q4 · Can I override the auto direction?
Yes. Auto detects by default, but you can switch to "JSON → JSONL" or "JSONL → JSON" to force a direction before converting.
Q5 · Does conversion alter values?
No. Conversion only changes the "array wrapping / newlines" presentation; field names and values are preserved — cross-check against the output.