Text to JSON Array

One line becomes one array element, with quotes and escapes handled for you.

How Text to JSON Array works

Turn a list of lines into a valid JSON array of strings. One line becomes one array element, with quotes and escapes handled for you. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.

That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.

One line, one element

Each line becomes a string in a JSON array, in order. Blank lines are dropped rather than becoming empty strings, which is what people want when pasting a list from a document that has spacing between items.

Quotes, backslashes and control characters inside a line are escaped properly, so a value like he said "hi" survives the round trip and still parses.

InputOutput
apple\nbanana["apple","banana"]
a "quoted" line["a \"quoted\" line"]
a\\b["a\\\\b"]
with a blank lineblank entry dropped

What this is for

Turning a pasted list into a fixture for a test, a seed array for a script, or a JSON field for an API that expects an array of strings. Typing the quotes by hand for 50 lines is where mistakes come from.

It does not infer types: every element is a string, so "5" stays a string. Cast afterwards if the consumer needs numbers.

Limits

A line that already contains JSON stays a string rather than being merged as an object — the tool does not guess structure. For an array of objects, build one row of JSON per line and convert with the JSON formatter instead.

Good to know

  • Works offline once loaded, including on flights and in locked-down networks.
  • No file size limit beyond your device's own memory.
  • Free to use, with no account and no usage counter.
  • Results are produced locally, so they are not logged or shared with anyone.

Questions

Is anything uploaded when I use Text to JSON Array?

No. The calculation runs in your browser with JavaScript, so the values you enter never leave your device.

What should I check before relying on the result?

One line becomes one array element, with quotes and escapes handled for you. Treat the output as an estimate and verify anything critical independently.

Does it keep blank lines?

No, they are dropped.

Can it convert the other way?

The JSON array to text page does that.

Keep going

More files tools