Text, CSV and lists to code

Paste or load your data, choose a format, then convert. Your input is processed in your browser and is never uploaded.

CSV supports quoted commas, escaped quotation marks and line breaks inside fields.
UTF-8 text files up to 10 MB. Loaded text uses the same parser as pasted text.
Your converted result appears here.

Ready to convert.

Transformations (2 enabled)

Cleanup runs before encoding, duplicate handling and sorting. Output escaping is applied last.

Cleanup
Encoding
Duplicates and ordering
Counts use count:value. Counting groups duplicates and preserves their original frequency.
Saved presets

Formats and transformations are remembered on this browser. Named presets can also save a particular setup.

Input is saved on this device only when this box is checked. Saved data remains until you delete or overwrite its preset.

Convert strings, lists and CSV files into arrays

ArrayCat is a free tool for converting text into PHP, JavaScript, Python, Go, Delphi and Pascal arrays, JSON arrays, MySQL inserts or plain lists. Paste your input or load a UTF-8 file, select a column if needed, then copy or download the result.

Clean up your data

Remove duplicates and empty items, count repeated values, sort lists, remove diacritics, change letter case, fix quotation marks, normalize whitespace, encode HTML entities or convert values to UTF-8 Base64. Expand Transformations to choose which operations to apply.

Choose how values are represented

JSON keeps values as strings by default. Type detection can turn values such as 42, true and null into JSON numbers, booleans and null. Values with leading zeros, unsafe integers and numbers that would lose precision stay as strings. The row length setting wraps arrays between values and keeps individual values intact. Pascal and Delphi output uses UTF-8 source and fixed UnicodeString arrays, which require at least one value.