Turn a list of lines, comma or space separated values into a JavaScript array literal with quoting, trimming and de-duplication. List to JS Array is a free online tool from the ToolsRift JavaScript Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
Paste your list, choose the delimiter and quote style, toggle trim / skip-empty / dedupe / multiline, then click Generate Array and copy the literal.
Split by newline, by comma, or by any whitespace. Each resulting item becomes one element of the generated array.
Pick single or double quotes and each item is safely escaped for that quote. Choose None to keep raw values such as numbers or booleans unquoted.
Yes. Enable De-duplicate to keep only the first occurrence of each item, and Skip empty to drop blank lines before building the array.