Lines to JSON Array
Lines to JSON Array: Turn a plain-text list into a properly escaped JSON string array.
Lines to JSON Array
Lines to JSON Array: Paste items on separate lines, choose whether to retain blank lines, and convert into a valid JSON array of strings.
Loading the tool...
✓ Your inputs stay in this browser
How to use Lines to JSON Array
Paste items on separate lines, choose whether to retain blank lines, and convert into a valid JSON array of strings.
Example
apple followed by banana becomes ["apple","banana"] when formatted.
What to know
All items are strings, even if they look numeric. Blank lines are omitted by default; surrounding spaces are preserved.