List to JSON Array
Convert a one-item-per-line list into a JSON array of strings and back again. Handles quoting and escaping automatically — useful for turning clipboard lists into API payloads.
How to use the list to json array
Edit the list on the left to see a JSON array of strings on the right. Edit the JSON side, click 'JSON → List' to convert back.
Formula & explanation
Lines map 1:1 to array elements. Trims whitespace and skips blanks.
Examples
["apple", "banana", "cherry"] ⇄ three lines.
Frequently asked questions
- What about non-string items?
- Decoded back as JSON.stringify(value). For numeric arrays, the round-trip will quote each number.
Related list tools tools
- List StatsGet statistics on any list: total count, unique count, min and max line length, average length, and the longest and shortest items. Useful for auditing data before further processing.
- List Set OperationsPerform set operations on two lists: union, intersection, difference, A-only, B-only, and symmetric difference. Paste two lists and choose the operation — results update instantly.
- List FilterKeep or remove lines matching a plain-text substring or regular expression. Useful for filtering log output, cleaning data, or extracting matching lines from large lists.
- Comma to Lines ConverterConvert between comma-separated values and one-item-per-line format. Handles quoted fields, trims whitespace, and removes duplicates. Paste CSV data, get a clean list — and back.
- Prefix / Suffix WrapperWrap every line with a custom prefix and suffix. Useful for building SQL IN clauses ('value'), quoting shell arguments, wrapping HTML tags, or generating code from a list.
- Number Sequence GeneratorExpand range patterns like 1..100 or 0,2,4..20 into complete numeric lists. Supports step size, comma-separated output, and custom separators — great for test data and scripting.