Paste CSV above and click Auto-Detect
Then set types and convert// cast csv columns to the right type instantly
Cast CSV columns to string, number, boolean, or date types instantly. Fix mixed-type data, clean imports, and export correctly typed CSV — free, browser-based.
Paste CSV above and click Auto-Detect
Then set types and convertDrop any CSV with headers into the input area, or load the sample to explore.
Click Auto-Detect to parse headers and preview inferred types per column.
Override any column type, click Convert, then copy or download the result.
A CSV Column Type Converter lets you re-cast each column in a CSV file to the correct data type. Spreadsheet exports and API dumps often come with every value as a plain string — this tool fixes that, making your data import-ready for databases, analytics pipelines, or code.
You can cast to string (no change, ensure quotes), number (integer or float, strips currency symbols), boolean (converts yes/no/1/0/true/false), or date (normalizes to ISO 8601 YYYY-MM-DD). The auto mode guesses the best type per value.
No. All processing happens in your browser (client-side JavaScript handles the UI; the server-side PHP only runs when you click Convert, and no data is stored or logged). Your CSV stays private.
If a value cannot be cast to the target type (e.g., "hello" cast to number), the original value is preserved unchanged. This prevents data loss — you can review and fix edge cases after downloading.
Auto-Detect samples the first 20 rows of each column and checks whether values look like numbers (is_numeric), booleans (true/false/yes/no/0/1), dates (strtotime), or strings. It picks the type that matches the majority of non-empty cells.
Any format that PHP's strtotime() can parse: US dates (01/15/2024), European dates (15.01.2024), ISO 8601, named months (Jan 15, 2024), and more. Output is always standardized to YYYY-MM-DD.
Yes. Set any column you don't want to modify to string type — it preserves the original value exactly, including quotes and spacing.
A CSV Column Type Converter is a tool that lets you cast individual columns in a CSV file to a specific data type: string, number, boolean, or date. When you export data from spreadsheets, databases, or APIs, every cell often comes through as a plain string — even values that are logically numbers, dates, or true/false flags. This causes headaches downstream when you try to import into a database, run analytics, or process the data in code.
💡 Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and developer tools — worth checking out.
Consider a simple CSV export from Google Sheets: every value comes as a string. Your age column contains "28" not 28, your active column contains "TRUE" not a proper boolean, and your joined_date column might say "3/15/22" instead of 2022-03-15. When you import this into PostgreSQL, SQLite, or feed it into a Python script, the type mismatches cause errors, silent data corruption, or failed queries.
Type-casting your CSV before import solves all of this. It's the difference between clean, reliable data pipelines and hours of debugging.
String: The default. Ensures values are properly quoted in the output but otherwise unchanged. Use this for columns you want to leave as-is — names, IDs, descriptions, codes.
Number: Converts values to integers or floats. Strips common non-numeric characters like currency symbols ($, €), commas used as thousands separators, and percent signs. So "$1,250.00" becomes 1250. Values that can't be parsed numerically are left unchanged.
Boolean: Normalizes many common boolean representations to true or false. Input values recognized as true: 1, yes, on, y, t, TRUE. Recognized as false: 0, no, off, n, f, FALSE, and empty strings.
Date: Parses a wide range of date formats and standardizes them to ISO 8601 (YYYY-MM-DD). Handles US formats (MM/DD/YYYY), European formats (DD.MM.YYYY), named months, and more. If a value can't be parsed as a date, it's preserved unchanged.
Auto: Samples each value and picks the most appropriate type automatically — ideal for quick cleanup when you're not sure what each column contains.
Database imports: PostgreSQL, MySQL, and SQLite are strict about types. Importing a CSV with numeric IDs stored as strings, or boolean flags stored as "Yes"/"No", will either fail or silently coerce values. Type-converting first prevents import errors and schema mismatches.
Data analysis: Python pandas, R, and Excel all behave differently with string-typed numerics. df['age'].mean() throws a TypeError if age is stored as strings. Converting first means your analysis works immediately without extra preprocessing code.
API payloads: When feeding CSV data into REST APIs or GraphQL mutations, numeric and boolean fields must be the correct JSON types. A payload like {"active": "true"} will fail schema validation where {"active": true} succeeds.
Date normalization: Teams that collect data from multiple sources often end up with date columns in a mix of formats. Standardizing everything to ISO 8601 before storage is a fundamental data hygiene step.
When you click "Auto-Detect & Parse Columns," the tool reads your CSV headers and samples up to 20 data rows per column. For each column, it checks: Are all non-empty values numeric? Are they all boolean-like strings? Do they parse as dates? The type with the highest match rate wins. Columns that don't clearly match any specialized type default to string.
Auto-Detect is a starting point — you can always override any column's type before converting. The manual controls are there precisely because real-world data has edge cases: a zip code column that looks numeric but must stay a string, or a "score" column where empty cells should not be treated as zeros.
This tool processes your CSV server-side only when you click Convert, and only to perform the type conversion — no data is stored, logged, or used for any other purpose. If you're working with sensitive data (PII, financial records), you can also perform the conversion entirely in-browser by using the client-side preview, which processes your data in JavaScript without a server round-trip.
$1,000, set the type to number — commas and symbols are stripped automatically.