Line to Array Converter
Turn copied columns, log excerpts, keyword lists, and TXT files into arrays.
Convert the lines
Lines and delimited text to array builder
// Your converted output will appear here.
New Line is the default and handles Windows CRLF or Unix LF endings; you can also split by commas, semicolons, spaces, tabs, or a custom delimiter.
How to use the Line to Array Converter
Paste or drop a TXT file
Drag a .txt file onto the input box and it is read in your browser — nothing is uploaded.
Choose how the input is split
Keep New Line for one value per line, or choose comma, semicolon, space, tab, or a custom delimiter. Empty values are removed by default.
Copy the array
JSON by default. Switch formats from the row above the preview.
Line to Array Converter examples
A copied column
Input
SKU-1001 SKU-1002 SKU-1003
Output
[ "SKU-1001", "SKU-1002", "SKU-1003" ]
Blank lines between groups
Input
first second
Output
[ "first", "second" ]
Turn off Remove empty values to keep the blanks as empty strings.
Working with line to array
CRLF, LF, and the invisible carriage return
Windows ends lines with a carriage return and a line feed; Unix and macOS use the line feed alone. Splitting on the line feed only leaves a trailing carriage return on every value from a Windows file — invisible on screen, and enough to make a value fail to match its twin forever. This tool splits on either, so no carriage returns survive.
Trailing whitespace from copied columns
Spreadsheet cells often carry trailing spaces you cannot see. Trim spaces is on by default, which is almost always what you want. It also means a line of nothing but spaces becomes empty and is then dropped by Remove empty values.
Comma, semicolon, tab, space, and custom delimiters
New Line remains the fastest choice for copied columns and TXT files. Choose another delimiter when the values share one line, including a custom character such as a pipe. For word, character, or regular-expression splitting, use the String to Array Converter.
Lines with bullets or numbering
If your lines start with a dash, an asterisk or a number, they are a formatted list rather than plain values. The List to Array Converter strips those markers; this page keeps them as part of each value.
Popular text conversion tools
List to Array Converter
Paste a bulleted or numbered list and get a clean array. Strips dashes, asterisks, bullets and 1., a) or roman markers so only the values remain.
Numbers to Array Converter
Convert a list of numbers into an unquoted numeric array, sort it numerically, drop non-numeric values, and read the count, min, max, sum, mean and median.
SQL IN Clause Generator
Turn a list of IDs or values into a SQL IN clause with correct apostrophe escaping, an optional WHERE and column name, NOT IN, and numeric detection.
Text to JSON Array Converter
Use this free online text to JSON array converter to turn lines, lists, TXT files, or delimited values into valid pretty-printed or minified JSON.
Line to Array Converter FAQs
Turn lines or delimited text into the output you need
Paste or upload the source, choose its delimiter, and copy the result in your preferred format. For advanced word, character, or regular-expression splitting, use the String to Array Converter. To turn an existing array back into lines, use the Array to Text Converter.