Paste a plain list —one item per line —and get it as a JavaScript, Python, PHP, Ruby, or JSON array instantly. Choose single or double quotes and copy the result.
Text List to Array converts a plain text list —one item per line —into an array literal in the programming language of your choice. It supports JavaScript, Python, PHP, Ruby, and JSON, with options for quote style and whitespace handling.
JavaScript, Python, PHP, Ruby, and JSON. The array syntax differs slightly between languages —for example Python and JavaScript use the same bracket syntax but PHP and Ruby differ.
Yes. Use the Quote dropdown to switch between single and double quotes. JSON always uses double quotes regardless of the setting.
By default empty lines are skipped. Uncheck 'Skip empty lines' to include them as empty string items.
Yes. Quotes and backslashes inside items are automatically escaped for the selected language.