L LocalUse Source

CSV to Types

Drop a CSV and get types for the language you actually use. Columns with blanks become nullable in each language’s own way — a pointer in Go, Option in Rust, str | None in Python — because that is the difference between a clean load and a crash on row 4,000.

Language
Row type name
Delimiter
Row limit
CSV
Output

Output appears here as you type.

Runs entirely in your browser. Nothing you paste here is uploaded or stored.

Questions

Is my file uploaded anywhere?

No. Parsing happens in your browser as a pure function, and the page is served with a Content-Security-Policy of connect-src ‘none’, so the browser refuses to let it open a network connection at all. That is what makes it safe to drop a real export — the kind with customer names and email addresses in it.

Why is my zip code column a string rather than a number?

Because a leading zero carries meaning. 01234 parsed as a number becomes 1234, and the zip code is gone. Any value with a leading zero stays a string, as do integers beyond the range JavaScript can represent exactly — which is where snowflake ids and long account numbers live.

How does it decide a column is nullable?

A column with any empty cell — or one holding a token like NULL or N/A — is nullable, and every generator expresses that in its own idiom rather than a shared approximation: string | null in TypeScript, *string in Go, Option<String> in Rust, str | None in Python, string? in C#, a boxed type in Java.

Why did a column become a union of literals?

Because it looked like an enum: a small set of distinct values, each appearing many times. A status column with three values across a thousand rows is far more useful typed as those three values than as a bare string. Turn off enum detection if you would rather it stayed open.