Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. CSV & Data Analysis
  3. CSV Data Type Detector
Add to favorites

CSV Data Type Detector

Find out what kind of data each CSV column holds, from numbers and dates to emails, URLs and codes with leading zeros, and get a CREATE TABLE statement for your database.

Rows never leave your deviceMore csv & data analysisJump to full guide

Initializing in your browser…

You might also like

CSV Missing Data Analyzer

See where a CSV has gaps: empty cells, cells with only spaces, markers like NULL or N/A and short rows, counted per column and mapped row by row, with optional filling.

CSV Sorter

Sort a CSV by one or more columns, with numbers sorted by value, dates by day and item2 before item10, then download the sorted file.

Mock Data Generator

Generate realistic test data as JSON, CSV or SQL: valid card numbers and IBANs, safe example e-mails, and a seed that brings the same rows back.

A sample run

A staff list is about to be loaded into PostgreSQL. It has zip codes, salaries with dollar signs, yes/no flags, dates written day first, an empty age and an empty website.

staff.csv (excerpt)

Name,Email,Zip,Age,Salary,Active,Joined,Website,Score
John Doe,john@example.com,07030,28,"$75,000.50",yes,15/01/2023,https://john.dev,95.5%
Bob Johnson,bob@example.com,90210,45,"$95,000.75",no,03/10/2021,,92.3%
Charlie Davis,charlie@example.com,10001,,"$88,000.25",no,05/12/2020,https://charlie.net,87.8%
What CSV Data Type Detector produces

Types and the CREATE TABLE (PostgreSQL, full five-row sample)

Name     Text                 Zip     Code (keep as text)
Email    Email                Age     Whole number
Salary   Currency             Active  True / false
Joined   Date, day first      Website URL
Score    Percentage

CREATE TABLE "staff-sample" (
  "Name" VARCHAR(50) NOT NULL,
  "Email" VARCHAR(255) NOT NULL,
  "Zip" VARCHAR(8) NOT NULL,
  "Age" INTEGER,
  "Salary" NUMERIC(7,2) NOT NULL,
  "Active" BOOLEAN NOT NULL,
  "Joined" DATE NOT NULL,
  "Website" TEXT,
  "Score" NUMERIC(5,2) NOT NULL
);

Zip is text because three of the five codes start with a zero, and the plain ones such as 90210 are kept as text with them. Salary is currency, and NUMERIC(7,2) is the smallest size that holds 95,000.75 with its cents. Joined is read day first because 15/01/2023 can only mean 15 January. Age and Website each have an empty cell, so they are the only columns without NOT NULL. Switching the database to SQLite gives a statement that SQLite runs as written.

What Is in Each Column of Your CSV?

Load a CSV and each column is classified as one of 18 kinds, such as whole number, decimal, currency, percentage, date, time, true/false, email, URL, phone, UUID, IP address, JSON or a code that must stay text. You see the reason for each decision, sample values, any values that do not fit, and a ready CREATE TABLE statement for PostgreSQL, MySQL, SQLite or SQL Server.

How to use

  1. 1Drop a CSV file on the page, choose one, paste rows, or press Try a sample to see a staff list analysed.
  2. 2Read each column card: its type, the reason, sample values and any warnings.
  3. 3Open Details on a card for counts of empty and null cells, the value range, the date order and how many cells of each kind were found.
  4. 4Pick your database at the top to see matching SQL types.
  5. 5Copy the CREATE TABLE statement at the bottom, or download the report or the JSON.
  6. 6If dates like 03/04/2025 are read the wrong way round, set the date order under More options.

Key features

  • 18 kinds of column, including currency, percentage, UUID, IP address, JSON and codes with leading zeros
  • Dates and times checked against the calendar
  • Day-first or month-first dates settled per column, with the deciding value named
  • Empty cells and NULL-style markers counted separately
  • Values that do not fit the column's type counted, with examples and an import warning
  • Columns flagged as possible keys when every value is distinct and present
  • Suggested SQL types for PostgreSQL, MySQL, SQLite and SQL Server, sized from the data
  • CREATE TABLE with quoted column names and NOT NULL where every value is present
  • Text report and JSON export of the full analysis
  • Runs in your browser, so the data never leaves your device

How it works

Why the type of a column matters. Before importing a CSV into a database, a spreadsheet or an analysis tool, you need to know what each column really holds. Guess wrong and the import fails, or worse, it succeeds and quietly damages the data: zip codes lose their leading zeros, dates are read with the day and month swapped, and a column with one stray word is rejected row by row. This tool examines every value in every column and tells you what it found and why.

Checks that look at the value, not just its shape. Dates are checked against the calendar, so 2025-02-29 is not a date and 31/04/2024 is not either. IP addresses are parsed properly, so 999.1.1.1 is rejected. URLs go through the browser's own URL parser and email addresses through the same rule a browser form uses. A column of digits that starts with a zero, such as 07030, is classed as a code to keep as text, because storing it as a number would lose the zero for good. A column of only 0 and 1, or yes and no, is recognised as true/false, which no single cell could tell you.

Day first or month first. A date such as 03/04/2025 means March 4 in the United States and April 3 in most other places. The tool settles this per column by finding a value that can only be read one way, such as 15/01/2023, and names that value. If nothing in the column settles it, it says so instead of guessing, and you can choose the order yourself under More options.

Gaps and odd values. Empty cells and explicit markers such as NULL or N/A are counted separately, because an empty cell and the word NULL may mean different things to your import. When most values fit a type but a few do not, the column keeps the majority type, the odd values are counted with examples, and a warning explains that a database would reject those rows on import.

From analysis to a table definition. Each column gets a suggested SQL type for the dialect you choose: whole numbers become INTEGER, or BIGINT when a value is too large for INTEGER; decimals and currency get a NUMERIC or DECIMAL size worked out from the data; text gets a VARCHAR long enough for the longest value with room to spare. Columns with no empty values are marked NOT NULL, and every name is quoted for the dialect so spaces, capitals and reserved words survive. Download a plain-text report or a JSON file of the whole analysis. Everything runs in your browser.

Where this fits a data pipeline

  • Planning a database import

    See every column's type and the CREATE TABLE before loading a CSV into PostgreSQL, MySQL, SQLite or SQL Server, and fix problem rows first.

  • Understanding an unfamiliar export

    Get a quick profile of a file someone sent you: which columns are dates, which are codes, which are mostly empty.

  • Catching data that will break an import

    Find the one text value in a column of numbers, or the impossible date, before the import rejects it.

  • Documenting a dataset

    Download the report or JSON as a data dictionary to share with the people who use the file.

Tips & best practices

  • Read the warnings first. A column that is 99 percent numbers with one stray word will fail on import unless that word is fixed or the column is made text.
  • If a column of codes was classed as a number, check whether any value has a leading zero in the full dataset; the sample you loaded may not show one.
  • Change the database at the top before copying the CREATE TABLE; types such as BOOLEAN and UUID differ between systems.
  • Use the JSON export to keep a record of a file's structure and compare it with next month's export.

Examples

  • Zip codes

    A column holding 07030, 02138, 90210 and 00501 is a code to keep as text, VARCHAR in SQL. As a number, 07030 would become 7030.

  • European dates

    A Joined column with 15/01/2023 among its values is read day first, because 15 cannot be a month, and the card names 15/01/2023 as the deciding value.

  • A large ID

    A column of IDs such as 9000000001 gets BIGINT rather than INTEGER, because INTEGER stops at 2,147,483,647.

Frequently asked questions

Why is my numeric-looking column classed as text?

Usually because some values start with a zero, like zip codes, account numbers or product codes. Storing those as numbers would drop the zero, so the column is kept as text. The card says how many values carry a leading zero.

How does it decide whether 03/04/2025 is March or April?

It looks for a value in the same column that can only be read one way, such as 25/03/2025, and applies that order to the whole column. If no value settles it, the card says so, and you can choose day first or month first under More options.

What is the difference between empty and null?

An empty cell has nothing in it. A null marker is a cell that says NULL, N/A or similar. They are counted separately because some imports treat the text NULL as a value, and you may want to clean one but not the other.

What does Could be a key mean?

Every value in the column is different and none is empty, so it could serve as a primary key. Check that this holds for the full dataset, not just the file you loaded.

How are the SQL types chosen?

From the column's type and its values: INTEGER or BIGINT depending on the largest whole number, NUMERIC or DECIMAL sized to the longest number and the most decimal places, and VARCHAR sized from the longest text with headroom. NOT NULL is added when no value is empty.

Does the CREATE TABLE work with column names that have spaces?

Yes. Every name is quoted the way your chosen database expects, double quotes for PostgreSQL and SQLite, backticks for MySQL and square brackets for SQL Server, so spaces, capitals and reserved words such as order are kept.

Is my file uploaded?

No. The analysis happens in your browser and nothing is sent anywhere.

Related tools and how they differ

  • CSV to SQL: Use it to go further and generate the INSERT statements that load the rows, not just the table definition.
  • CSV Data Validator: Use it to check every value against rules you set, once you know what each column should hold.
  • CSV Statistics Generator: Use it for the numbers inside each column: averages, spread, quartiles and outliers.

Private by design

Rows and columns are parsed and transformed in memory in your browser. No record ever reaches a server.