Skip to contentSkip to navigation

Client-side Text to Array Converter (and back)

Convert plain text to arrays, SQL, JSON, CSV or a line-by-line list

Convert plain text into array formats used by programming languages (JavaScript, Python, PHP), SQL tuples, JSON arrays, CSV lists, or a plain one-per-line list ready to paste into Excel or a database column. This tool runs entirely in your browser. For very large inputs, processing may be slower.

To convert in the opposite direction (array → text), paste your array into the input and click "Array to Text". Insert sample text




|


Trim items
Remove empty
Use quotes for numbers
:

 


 

Examples:
  • Comma-separated: set Split by to Custom and enter ,
  • Tab-separated: set Split by to Regular expression and enter \t
  • Whitespace (any spaces/tabs/newlines): set to Regular expression and enter \s+
  • CSV-like (commas with optional spaces): \s*,\s* (regex)
  • Lines inside a single-line input (use literal newline in the input or regex \n / \r?\n)

Short notes: when entering patterns, do not include the surrounding / / slashes — just the pattern itself.
Escape backslashes in some browsers/inputs by typing \\n if needed.