DevTools Logo

CSV Type & Null Ratio Profiler

CSV Type & Null Ratio Profiler

Profile CSV columns locally: inferred types, null ratio, uniqueness and numeric stats, with the rules stated.

Runs in your browser
Only empty cells are null. Leading zeros stay text. Integers use the int64 range. Dates are ISO 8601.
Try an example

CSV input

4 lines · 68 chars

Column profiles

3 rows analyzed
ColumnTypeNullUniqueNumeric statsTop values
idinteger
100% typed
0.0%31 / 3 / 2.001 (1), 2 (1), 3 (1)
namestring
100% typed
0.0%2—Ada (2), Linus (1)
scorefloat
67% typed
33.3%287.25 / 98.5 / 92.8887.25 (1), 98.5 (1)
activeboolean
100% typed
0.0%2—true (2), false (1)

About

RFC 4180-compatible CSV parsing with quoted fields, escaped quotes, embedded newlines, selectable delimiters, deterministic sampled profiling, and data-quality metrics.

    Examples

    Quoted comma and newline

    Input
    parseCsv('name,note\nAda,"hello, ""world""\nnext"')
    Output
    [["name","note"],["Ada",'hello, "world"\nnext']]

    Quotes protect the comma, the doubled quotes collapse to one, and the newline stays inside the cell.

    Typed profile with nulls

    Input
    profileCsv("id,score\n1,2.5\n2,\n3,4.5")
    Output
    score -> { inferredType: "float", nullRatio: 1/3, min: 2.5, max: 4.5, mean: 3.5 }

    The blank score counts as null while the remaining floats drive min/max/mean statistics.

    About this tool

    CSV Type Inference Profiler parses and profiles delimited text with parseCsv(input, delimiter) and profileCsv(input, { delimiter, sampleRows }): headers, rowsAnalyzed/totalRows, a sampled flag, and per-column profiles with inferredType, nullRatio, uniqueCount, min/max/mean, topValues, and typeDistribution. Empty input returns zeroed headers, counts, and columns.

    Cell types are integer, float, boolean, date, email, string, and null; a column mixing incompatible types reports mixed (pure integer/float mixes fold to float). Blank cells count as null, ratings derive from nullRatio, and topValues keeps the 3 most frequent entries.

    Parsing follows CSV quoting: quoted cells may hold delimiters and newlines, doubled quotes unescape to one, CRLF and LF both break rows, and blank rows are skipped. Headers default to Column N when blank.

    How to use this tool

    1. Paste CSV and delimiter

      Supply the text with commas by default or pass delimiter explicitly (e.g. ';') to both parse and profile calls.

    2. Read inferred types

      Check each column's inferredType plus typeDistribution when mixed needs explaining.

    3. Weigh nulls and uniques

      Use nullRatio/nullCount for sparseness and uniqueCount plus topValues for cardinality and skew.

    4. Sample large files

      Set sampleRows to bound rowsAnalyzed; sampled flags when totalRows exceeds the window.

    Use cases

    Scoping a data import

    Infer column types, null load, and value skew before choosing a database schema.

    Catching dirty columns

    Spot mixed-type columns where stray text slipped into numeric feeds.

    Documenting a dataset

    Export headers, types, ranges, and top values as a quick data dictionary.

    Common mistakes

    Mistake:Splitting quoted commas with a naive split(',').

    Fix:Route quoted input through parseCsv — commas inside quotes belong to the cell, not the column boundary.

    Mistake:Treating mixed as a parse failure.

    Fix:Mixed is the intended verdict for incompatible cell types in one column — inspect typeDistribution to see the actual blend.

    Mistake:Forgetting the delimiter on both calls.

    Fix:profileCsv defaults to ','; pass { delimiter: ';' } (and to parseCsv) or semicolon files collapse into one column.

    Frequently asked questions

    What does this tool do?

    It parses and profiles delimited text with parseCsv(input, delimiter) and profileCsv(input, { delimiter, sampleRows }): per-column inferredType (integer/float/boolean/date/email/string/null or mixed), nullRatio, uniqueCount, min/max/mean, topValues, and typeDistribution.

    What does mixed mean, and where did my nulls go?

    mixed means incompatible cell types share a column (pure integer/float folds to float) — check typeDistribution for the blend. Blank cells count as null and drive nullRatio, so sparseness shows up there, not in min/max/mean.

    Is my CSV uploaded or stored?

    No. Quoted-field parsing, type classification, and statistics run entirely in your browser.

    Why is my semicolon file one column, or why is sampled true?

    The default delimiter is ',' — pass { delimiter: ';' } to profileCsv (and to parseCsv) for semicolon files. sampled true means totalRows exceeded sampleRows, so only the leading window was analyzed; raise sampleRows for full coverage.

    References & standards