CSV Column Type Inferrer

Detect the probable data type of each CSV column — date, int, float, bool

Free in-browser CSV column type inferrer. Paste CSV data and the tool samples up to 1000 rows per column to infer the most probable type — integer, float, boolean, ISO date, email, phone or free-text — with a confidence percentage. Runs locally; no data upload. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Which types can it detect?

For each column it tests, in order, boolean, integer, float, ISO date, email and phone, falling back to free-text. A column is assigned a type only when at least 80% of its non-empty cells match that type, so a few stray values do not derail the result.

The CSV Column Type Inferrer reads pasted CSV data and works out the most likely data type of each column — integer, float, boolean, ISO date, email, phone or free-text — with a confidence score. It is a quick way to understand an unknown dataset or bootstrap a database schema, all in your browser.

How it works

First the tool parses the CSV using an RFC-4180-style reader that correctly handles quoted fields containing commas, escaped quotes ("") and embedded newlines. It then samples up to 1000 data rows and classifies each non-empty cell with an ordered set of tests:

  1. boolean — values like true, false, yes, no, t, f
  2. integer — optional sign followed by digits
  3. float — a decimal point with digits
  4. ISO dateYYYY-MM-DD with an optional time component that also parses as a real date
  5. email — a local part, @, and a dotted domain
  6. phone — an optional + and at least seven digits with common separators
  7. free-text — anything else

A column is assigned a type only when at least 80% of its non-empty cells match a single type; otherwise it is reported as free-text. If a numeric column mixes whole numbers and decimals, it is reported as float so every value fits.

Example

A price column containing 19.99, 5 and 12.50 is reported as float (because of the decimals), while an id column of 1, 2, 3 is reported as integer. A signup_date column of 2026-01-15-style values is reported as date.

Practical use: bootstrapping a database schema

The most common use case is arriving at an unknown data export and needing to create a table to store it. Without type inference, the safe default is to make every column TEXT and fix it later — but that loses sortability on dates and numeric ranges on prices.

The inferred types map directly to common SQL types:

Inferred typePostgreSQLMySQLSQLite
integerINTEGERINTINTEGER
floatNUMERICDECIMALREAL
booleanBOOLEANTINYINT(1)INTEGER
dateDATEDATETEXT (ISO format)
emailTEXTVARCHAR(255)TEXT
phoneTEXTVARCHAR(30)TEXT
free-textTEXTTEXTTEXT

Phone and email columns are kept as TEXT even though they have recognisable patterns, because the appropriate constraints and validation belong at the application layer, not the column type.

Understanding the confidence score

Confidence is the share of non-empty cells in the sampled rows that match the chosen type. A price column at 98% float confidence, for example, means that 98% of its cells parsed as floating-point numbers and 2% did not.

The remaining 2% are worth investigating:

  • Intentional markers. Values like N/A, TBD, or in an otherwise numeric column are often missing-value markers. Consider whether to replace them with NULL before import.
  • Formatting noise. Currency symbols ($5.99), percentage signs (12%), or thousands separators (1,234.56) prevent numeric parsing. Strip the formatting before importing.
  • Data entry errors. A typo like 19,99 (comma instead of decimal point in a locale-mixed file) will fail numeric parsing and appear in the low-confidence tail.

A 100% score means the column is clean and consistent. Anything below ~95% warrants a closer look at the non-matching rows.

Notes

Confidence is the fraction of non-empty cells matching the chosen type, so it also hints at data quality — a high-but-not-100% score usually points to a few malformed rows worth investigating. All parsing runs locally, so the tool is safe for sensitive datasets.