Typed columns
Column names are checked against your data. A typo or a renamed field is a compile error, not a broken export found in production.
A small, fast, zero-dependency CSV encoder and parser for TypeScript and JavaScript. RFC 4180 correct, checked against your data, and the same core on Node, browsers, Deno, Bun, and edge.
import { stringify } from 'csv-pipe';
type User = { name: string; email: string; age: number };
const users: User[] = [
{ name: 'Alex Johnson', email: 'alex@example.com', age: 29 },
{ name: 'Carlos Herrera', email: 'carlos@example.com', age: 24 }
];
stringify(users);
// name,email,age
// Alex Johnson,alex@example.com,29
// Carlos Herrera,carlos@example.com,24The header comes from the record keys, and a field is quoted only when it needs to be.
import { parse } from 'csv-pipe';
type User = { name: string; email: string; age: number };
const users = parse<User>('name,email,age\nAlex Johnson,alex@example.com,29');
parse is the mirror of stringify, typed and streaming, so encode then parse round-trips your rows. Get started, read why csv-pipe, or see the benchmarks.