Turning CSV Rows into Language-Native Array Literals
What this converter does
A CSV file is just rows of values separated by a delimiter, but code needs those same rows as a real array literal. This tool parses CSV or TSV text and rewrites it as source you can paste straight into a project — a two-dimensional array of rows and columns, or an array of objects keyed by the header row. It reads the delimiter, splits each line into fields, and emits the result using the array and string syntax of the language you pick: JavaScript, Python, Java, C#, PHP, Go, Ruby, or Rust.
Conversion also runs the other way. The reverse mode takes an existing array and serialises it back to CSV, so you can move data out of code and into a spreadsheet-friendly file.
When to use it
Reach for it whenever you have tabular data in a CSV export and need it as a literal inside a script — seeding a test fixture, hard-coding a lookup table, or dropping a small dataset into a demo without wiring up a file reader. Because each target language gets its native syntax, the output compiles or runs without hand-editing brackets and quotes.
The object-array mode is the fastest way to turn a spreadsheet into structured records: enable the header option and every row becomes an object whose keys come from the first line, ready to iterate over.
Example: three rows to an array literal
Take the CSV name,age,active on the first line, followed by Alice,30,true and Bob,25,false. As a 2D array in JavaScript it becomes [["name","age","active"],["Alice",30,true],["Bob",25,false]]. Switch to object-array output and you get [{"name":"Alice","age":30,"active":true},{"name":"Bob","age":25,"active":false}] instead. Pick Python and the same data comes back with True, False, and None in place of the JavaScript literals.
Delimiters, quoting, and types
The delimiter is configurable — comma, semicolon, tab, or pipe, plus a custom character for anything unusual — which matters for European exports that use semicolons or for TSV files. Auto type detection decides whether a field like 30 or true stays a bare number or boolean instead of a quoted string, and it can be turned off when you want every value kept as text. On the reverse side, options such as quoting all fields and including the header row control how the CSV is written back. Uploads of up to 5MB (CSV, TSV, or TXT) are parsed the same way as pasted text.