String to Array Converter
Convert a string to an array online by splitting text into clean values. Use spaces, commas, new lines, tabs, semicolons, or a custom delimiter to control how the string becomes an array.
String to Array Converter
Paste text, choose your delimiter, and copy clean output. The sample below is preset for string to array.
String to Array Converter
Free, private, browser-based conversion for developers and data teams.
// Your converted output will appear here.
How to use the String to Array Converter
1. Add your text or list
Paste it into the clearly labelled input box or load the example to see a working result.
2. Choose the input delimiter and output format
Set the options that match the source data and the result you need.
3. Review and copy
Check the preview and item count, then copy or download the output. Use Reset to start over.
String to Array Converter examples
Use this pattern as a quick reference, then run your own list through the converter above.
Convert a string to a JavaScript array
Input
alpha beta gamma
Output
const words = [ "alpha", "beta", "gamma" ];
Split a pipe-delimited string into JSON
Input
draft|review|published
Output
[ "draft", "review", "published" ]
Supported input and output formats
Choose only the syntax your workflow needs; the preview updates locally in your browser.
- JavaScript arrays
- JSON arrays
- Python lists
- PHP arrays
- SQL IN clauses
- CSV, quoted, or custom-separated output
How to use this string to array tool
Split a string into array items
Use this page when your input starts as one plain string. Split by whitespace for words, commas for CSV-style values, new lines for copied lists, or a custom delimiter for structured text.
Choose output for code or data
Generate JavaScript arrays, JSON arrays, Python lists, PHP arrays, SQL IN clauses, CSV output, quoted lists, or custom-separated text from the same string.
Clean the string before copying
Trim extra spaces, remove empty values, deduplicate repeated words, sort alphabetically, or change case before generating the final array.
Popular text conversion tools
List to Array Converter
Convert a pasted list to JavaScript, JSON, Python, PHP, SQL, or CSV online. Clean duplicates, copy the result, and use it free without signup.
Numbers to Array Converter
Convert number lists to unquoted JSON, JavaScript, Python, PHP, or SQL arrays online. Free, private, and no signup required.
Comma Separated List to Array Converter
Convert comma-separated lists into JavaScript arrays, Python lists, JSON arrays, PHP arrays, SQL IN clauses, CSV, or quoted text.
JSON Array Converter
Convert text, lines, comma-separated lists, or TXT files to a valid JSON array online. Free, private, and ready to copy without signup.
JavaScript Array Converter
Convert strings, text lines, or TXT files to a JavaScript array online. Choose quotes and variable names, then copy or download free without signup.
String to Array Converter FAQs
Ready to use the String to Array Converter?
Paste your text, choose a format, and copy clean output. No signup, no upload, no waiting.