</> ConvertAtlas Developer Tools
Converters

Lines to JSON Array

Turn lines into a JSON string array.

Instant 100% in-browser Free

This tool turns each line of text into a quoted, comma-separated JSON array element — ready to paste into code, in your browser.

How to use it

  1. Paste one item per line.
  2. Each becomes a quoted element.
  3. Copy and wrap in [ ] for an array.

About Lines to JSON Array

Turning a plain list into a JSON or JavaScript array means quoting and comma-separating each item. This tool wraps every non-empty line in double quotes, escapes inner quotes, and joins them with commas so you can drop the result into an array literal. It runs entirely in your browser.

FAQ

Does it add the surrounding brackets?

It outputs quoted, comma-separated elements; wrap them in [ ] to complete the array.

Are inner quotes escaped?

Yes — double quotes inside a line are escaped so the JSON stays valid.

Are blank lines included?

No, empty lines are skipped.