Add Conditional Column to CSV Files Online
Add a new column to CSV files based on an if/else condition directly in your browser. Set a value for rows that match and a different value for rows that don't — no upload required.
About this tool
Add a new column to a CSV file whose value is determined by conditions you define — like an Excel IF statement or SQL CASE WHEN. Set as many rules as you need, choose a value for each matching condition and a fallback for everything else, then download the updated file. All processing runs locally in your browser.
Frequently Asked Questions
What is a conditional column in a CSV file?
A conditional column adds a new column whose value is determined by rules you define — equivalent to SQL CASE WHEN. For example: if score > 90 then "A", if score > 80 then "B", else "C". Each row gets the label from the first condition it satisfies.
Can I add multiple conditions when creating a conditional column in a CSV file?
Yes. Add as many WHEN conditions as you need. Conditions are evaluated top to bottom and the first match wins. The final ELSE clause sets the value for any row that matches none of the conditions.
What data types can I use in conditional column expressions for CSV files?
Text, numeric, and date comparisons are all supported. Operators include equals, not equals, greater than, less than, contains, starts with, ends with, is null, and is not null.
Is my data private?
Yes — completely. Your file is never uploaded to any server. Everything runs locally in your browser using WebAssembly — processing happens entirely inside your tab. Once you close the tab, nothing is retained.
What is the maximum file size?
The free limit is 50 MB. For larger files, performance depends on your device's available memory — most modern machines handle 500 MB to 1 GB comfortably.
Related Tools
Find Arg Max / Min in CSV Files Online
Find the value of one column at the row where another column is maximum or minimum in CSV files — directly in your browser. Optionally group by a category to get per-group results. No upload required.
CSV Viewer Online
View and inspect CSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert CSV to Parquet Online
Convert CSV files to Parquet format directly in your browser. No upload required — your data never leaves your device.
Convert CSV to JSON Online
Convert CSV files to JSON format directly in your browser. No upload required — your data never leaves your device.
Convert CSV to NDJSON Online
Convert CSV files to NDJSON format directly in your browser. No upload required — your data never leaves your device.