Text to JSON Array
Turn one item per line into a quoted JSON string array with trimming, deduplication and sorting.
Text lines to a JSON string array
Items: 0 · Removed: 0 ·
Size: 0 bytes
How to use the Text to JSON Array
- Paste your list with one item on each line.
- Tick trimming, deduplication or sorting to clean the list.
- Copy the escaped JSON string array into your code.
Features
- One quoted JSON string per input line
- Optional trimming and empty line removal
- Duplicate removal and alphabetical sorting
- Correct escaping of quotes and control characters
Advertisement
Frequently Asked Questions
Common questions about the free online text to json array.
Paste one word per line, then copy the generated array. Each line becomes a quoted string
element in the JSON output.
Yes. Quotes, backslashes, tabs and newline characters are escaped automatically, so the
output is always valid JSON.
Identical lines are compared after trimming, and only the first occurrence is kept. The
summary shows how many lines were removed.
Yes. Tick the sort option and the array is ordered alphabetically, ignoring letter case, with
a stable order for equal values.
Pretty print puts each item on its own indented line. Turn it off for a compact single line
array that saves bytes.
Yes. Turn off the drop empty lines option and blank lines are kept as empty strings inside
the array.
No. The list is processed entirely in your browser, so sensitive strings never leave your
device.
Yes. It is ideal for turning keyword lists, tags or spreadsheet columns into an array for
configuration files and code.
Yes. The converter is fully responsive and works on phones, tablets and desktop browsers.
Yes. It is completely free with no account, no sign-up and no limit on the size of your list.
Last updated: October 10, 2026