ZROW

ZROW is CSV-as-a-programming-language, made by Christopher Shelley. It lets you write individual records alongside instructions that generate rows. Use it for application fixtures, import tests and repeatable sample datasets, then export the result as CSV or JSON.

Open the editor · Read the documentation · Source code and issues

Generate a customer list

Paste this into the editor. The first line declares two columns. The next gives each customer a sequential identifier and uses that identifier in the name. The final instruction produces three rows.

# ZROW 0.4
(cols id:int,name)
(id=seq(),name="Customer {id}")
(rows 3)

The CSV output is:

id,name
1,Customer 1
2,Customer 2
3,Customer 3

Change the row count to produce a larger dataset. Keep literal CSV rows when you need exact records, such as an administrator account or an unusual input that previously caused a bug. Generated and handwritten rows can appear in the same document.

Keep test data repeatable

Random values are useful for testing different quantities, prices and coordinates. A seed makes repeated runs produce the same random choices. Date helpers can use a fixed reference time so a test does not change when the calendar does. Explicit column types validate values and preserve numbers and booleans when exporting JSON.

Work with related tables

A document can contain named tables such as customers and orders. Generate customers first, then use their identifiers in orders. Reference checks catch orders pointing to nonexistent customers. Export an individual table as CSV, or export all named tables together as a JSON object.

Bring existing data

The editor can convert supported CSV and JSON into literal ZROW. This preserves the records; it cannot recover the formulas that originally generated them. JSON records need consistent scalar columns. Unsupported values such as nested objects or null are rejected rather than silently discarded.

Choose how to run it

The browser editor runs compilation locally, without an account. The open-source JavaScript package is available as zrow-js, with the zrow command-line tool. An HTTP conversion API is available for other languages. The public API limits requests to 64 KiB and 30 requests per minute per IP, and compilation to 10,000 rows and 250,000 cells.

Use ordinary CSV when all you need is a finished table of values. ZROW is useful when you want to edit the instructions that produce those values. It is not a database or a replacement for general-purpose data analysis.

Browse examples · API documentation · Discord