# Output formats

> What a run can write: CSV, JSON, SQL and nested documents from the CLI and SDK, plus fixed-width files for recipes that declare a layout.

Section: Generate · Type: reference · Last updated: 2026-09-14

The same rows can be written as CSV, JSON, SQL or a nested document from a root entity; a recipe that declares a fixed-width layout writes byte-positional records.

## The picture

Rows (one run) → --format (csv · json · sql · nested) → File (or stdout)

## Formats

- csv — the default; one file per table from bundle, or the root table from generate.
- json — an array of row objects.
- sql — INSERT statements.
- nested — one document from a root entity (--root), children embedded; also generateNested in the SDK.
- A referential slice — --slice N keeps N root rows and everything they point at; generateSlice in the SDK.
- fixed — byte-positional records for recipes whose output block declares a skeleton and overlay; exportFixedWidth in the SDK.

> **Two decimals, one canonical form** — Decimal numbers are written with exactly two places and values in one standard form; locale formatting (decimal comma, thousands separators) is not generated. See Limitations.

## Related

- [Generate](https://theworklens.com/docs/cli/generate): worklens generate — recipe → data. Read from the CLI’s own header, with every option it accepts.
- [Configuration](https://theworklens.com/docs/cli/configuration): Every option the generate, prove and bundle commands accept, and what each one changes about a run. There is no config file.
- [SDK API](https://theworklens.com/docs/reference/sdk-api): Every function the Node.js SDK exports — generate, prove, inspect, read a file, manage packs — with what each returns.

_← Previous: [Seeds & determinism](https://theworklens.com/docs/generate/seeds) · Next: [Packs](https://theworklens.com/docs/packs) →_

_Canonical: https://theworklens.com/docs/generate/output-formats · This copy: https://theworklens.com/docs/generate/output-formats.md_
