Array Tools

Convert a text list to JS, Python, PHP, Perl, SQL IN, and JSON arrays.

One item per line. Also accepts comma-separated values or JSON arrays.

5 items

Raw

Comma-separated values

"apple", "banana", "cherry", 123, "hello world"

JavaScript

const array_name = [...]

const array_name = ["apple", "banana", "cherry", 123, "hello world"];

Python

list_name = [...]

array_name = ["apple", "banana", "cherry", 123, "hello world"]

PHP

$array_name = [...]

$array_name = ["apple", "banana", "cherry", 123, "hello world"];

Perl

@array_name = (...)

@array_name = ("apple", "banana", "cherry", 123, "hello world");

SQL IN

Use inside WHERE col IN (...)

("apple", "banana", "cherry", 123, "hello world")

SQL VALUES

One row per line: (value)

("apple"),
("banana"),
("cherry"),
(123),
("hello world")

JSON

Valid JSON array

[
  "apple",
  "banana",
  "cherry",
  123,
  "hello world"
]

Free Online Array & List Converter

Turn a plain-text list into the array syntax your project needs. Dokall supports JavaScript, Python, PHP, Perl, SQL IN clauses, and JSON arrays — perfect when you have column data from a spreadsheet and need code-ready output.

Paste one item per line and copy the formatted result. No manual quoting or bracket-wrapping required.