JSON to JSON Lines Format
Turn a JSON array into JSON Lines: one compact value per line, ready for a log pipeline or a streaming importer.
What converting JSON to JSON Lines does
The top-level array is required: each element becomes one line of compact JSON, and the line order is the array order. A document that is not an array is refused with a message instead of being wrapped in a one-element array, because a silent wrapper changes the meaning of the data. Compact output has no spaces, so one record is exactly one line even when the values contain nested objects.
How to use it
JSON to JSON Lines Format: paste the JSON into the box above, and press Run to get the JSON Lines below.
Worked example
Input:
[
{ "id": 1, "name": "Ada" },
{ "id": 2, "name": "Linus" }
]
Output:
{"id":1,"name":"Ada"}
{"id":2,"name":"Linus"}
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns JSON Lines; reloading the page discards both.
The top-level array is required: each element becomes one line of compact JSON, and the line order is the array order. A document that is not an array is refused with a message instead of being wrapped in a one-element array, because a silent wrapper changes the meaning of the data. Compact output has no spaces, so one record is exactly one line even when the values contain nested objects.
Turn a JSON array into JSON Lines: one compact value per line, ready for a log pipeline or a streaming importer.
How to use it
JSON to JSON Lines Format: paste the JSON into the box above, and press Run to get the JSON Lines below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON and returns JSON Lines; reloading the page discards both.
What to Expect
Best for
- Converting JSON to JSON Lines when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
[ { "id": 1, "name": "Ada" }, { "id": 2, "name": "Linus" } ]
Sample output
{"id":1,"name":"Ada"} {"id":2,"name":"Linus"}
Frequently asked questions
How do I use the json to json lines format?
JSON to JSON Lines Format: paste the JSON into the box above, and press Run to get the JSON Lines below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.