Arrow back to browser scan More tools Arrow

Array Converter

All processing happens locally in your browser. Nothing is sent to any server.
Quote style:
Variable:

Input (one value per line)

0 items

What is the Array Converter?

The Array Converter transforms a plain list of values into properly formatted array syntax for multiple programming languages. Paste a list with one item per line and instantly get output for JavaScript, Python, PHP, Perl, and comma-separated values (CSV). It handles quoting, escaping, and language-specific syntax automatically so you don't have to format arrays by hand.

When is this useful?

Converting lists to code arrays is a common task when working with spreadsheet data, database exports, configuration values, or API payloads. Instead of manually adding quotes, commas, and brackets, paste your raw data and copy the formatted result. The tool supports toggling between single and double quotes, optionally leaving numeric values unquoted, and adding a custom variable name for the assignment.

Supported languages and formats

Output is generated for JavaScript arrays (square bracket notation), Python lists, PHP arrays (using the array() syntax), Perl arrays (using parentheses with @ sigil), and plain CSV. Quotes inside values are automatically escaped with backslashes to produce valid syntax. All conversion happens live in your browser as you type. Nothing is sent to a server.

Incogniton Logo

Level up your privacy

Arrow