The Next JSON Toolbox

List to Array Converter

Chars:0Tokens:0
Total Items:0

Options

Sort Order
Sort items alphabetically

Output Formats

Single Quotes

No output yet

Double Quotes

No output yet

Without Quotes

No output yet

Single Quotes (Parentheses)

No output yet

Double Quotes (Parentheses)

No output yet

Without Quotes (Parentheses)

No output yet

JSON Tools

How It Works

See how NextJSON can convert your lists to arrays with different quote styles.

Convert List to Array

Generate array online with different quote styles

Input
apple
banana
orange
grape
watermelon
pineapple
mango
strawberry
Output
[
  "apple",
  "banana",
  "orange",
  "grape",
  "watermelon",
  "pineapple",
  "mango",
  "strawberry"
]

Space-Separated Line to Array

Convert a space-separated line to an array

Input
red blue green yellow purple pink
Output
[
  "red",
  "blue",
  "green",
  "yellow",
  "purple",
  "pink"
]

Comma-Separated Line to Array

Convert a comma-separated line to an array

Input
red,blue,green,yellow,purple,pink
Output
[
  "red",
  "blue",
  "green",
  "yellow",
  "purple",
  "pink"
]

Mixed Format Array to Array

Convert a list with mixed formats (newlines and spaces) to an array

Input
Monday Tuesday
Wednesday Thursday
Friday Saturday Sunday
Output
[
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday"
]

Numbers Array with Sum and Average

Convert a list of numbers into an array, and calculate both the sum and average

Input
1 2 3 4 5 6 7 8 9 10
Output
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Remove Duplicates from List

Enable "Remove Duplicates" to automatically filter out duplicate items from your list

Input
apple
banana
apple
orange
banana
grape
orange
apple
Output
[
  "apple",
  "banana",
  "orange",
  "grape"
]

Remove Duplicates with Ignore Case

Enable both "Remove Duplicates" and "Ignore Case" to remove duplicates while ignoring letter case differences

Input
Apple
APPLE
banana
Banana
ORANGE
orange
Grape
grape
Output
[
  "Apple",
  "banana",
  "ORANGE",
  "Grape"
]

Sort Items in Ascending Order

Select "A → Z" in Sort Order to arrange items alphabetically from A to Z

Input
zebra
apple
mango
banana
cherry
grape
Output
[
  "apple",
  "banana",
  "cherry",
  "grape",
  "mango",
  "zebra"
]

Sort Items in Descending Order

Select "Z → A" in Sort Order to arrange items alphabetically from Z to A

Input
zebra
apple
mango
banana
cherry
grape
Output
[
  "zebra",
  "mango",
  "grape",
  "cherry",
  "banana",
  "apple"
]

Frequently Asked Questions

What can I convert to an array?

Paste a list of items—one per line—and the tool converts it to a JSON array. You can choose different quote styles: double quotes, single quotes, or no quotes.

What are the quote style options?

Double quotes produce standard JSON (e.g., ["a","b"]). Single quotes and no quotes are useful when you need the output in a specific format for other tools or templates.

Can I remove duplicates from my list?

Yes! The tool can deduplicate your list, keeping only unique items. Useful when merging lists or cleaning up data.

What about sum and average?

If your list contains numbers, the tool can calculate the sum and average of those values—handy for quick data analysis.

Does this site store my data in the cloud?

No, this site does not store or share your data in the cloud. Your data remains private and is kept locally on your broswer.

This site lacks some useful features that I need. Can you add them?

Yes, we welcome all suggestions! Please feel free to share your feedback using the link at the bottom of the page.