The practical guide
A cleaner CSV, without surprises.
CSV looks simple until a comma belongs inside a value. A few checks before cleanup can save you from shifting columns, losing records, or importing a number as text.
1. Start with a small, reversible check
Keep the original export and work on a copy. If you are handling an important dataset, first test a handful of representative rows: one ordinary record, one with an empty field, one with punctuation, and one with a multiline note. TidyCSV does not know what your columns mean. It can make formatting consistent, but it cannot decide whether a customer record is accurate or whether two people share an email address.
The input limit is 2 MiB, measured in UTF-8 bytes. This is suitable for small exports and pasted tables. For larger datasets, use a local data-processing tool that can stream the file rather than holding it in browser memory.
2. Choose the actual delimiter
A filename ending in .csv does not prove that commas separate its columns. Some exports use semicolons, especially when number formatting contains decimal commas. TSV uses tab characters. Pick comma, tab, semicolon, or pipe to match the source. TidyCSV deliberately avoids guessing: a wrong choice can produce one long column without any parsing error.
Use the preview to check that the column boundaries look right. An uneven row is preserved rather than padded or truncated. If one record has an unexpected extra cell, inspect its quoting before continuing.
3. Know what quotes do
A cell containing the separator must be enclosed in double quotes. The same rule applies to a newline inside a cell. To represent a literal double quote, write two consecutive double quotes within the quoted field.
name,note
Alice,"Tea, coffee"
Bob,"He said ""hello"""
Cara,"First line
Second line"TidyCSV accepts LF, CRLF, or CR record endings and preserves line breaks inside quoted values. The exported file uses CRLF between records. Broken quotes, stray characters after a closing quote, and quotes inside an unquoted field produce an error. A strict error is useful: it points to data that needs attention instead of silently moving values into different columns.
4. Trim and remove rows deliberately
Trimming removes whitespace only at the beginning and end of each cell. It preserves spaces between words. Turn it off when leading spaces, indentation, or intentional trailing whitespace carry meaning. Blank-row removal removes data rows whose cells are all empty after trimming. A partially empty record stays in the output.
With the header option enabled, the first row is treated as a header. It is still trimmed, but it is never removed as blank or deduplicated. Header values are not added to the duplicate comparison set, so a matching data row remains. Turn this option off for files that contain records from the first line.
5. Understand exact duplicates
Duplicate removal compares every cell in a data row, after optional trimming. It keeps the first occurrence in its original position. Comparisons are case-sensitive: Alice and ALICE remain distinct. A row with a missing final cell differs from a row with an explicitly empty final cell. This avoids assuming that two differently structured records mean the same thing.
For deduplication by a single column, such as an order ID, use a spreadsheet or database where you can define that key and resolve conflicts. Deleting whole-row duplicates is a narrower operation.
6. Review spreadsheet formula protection
Spreadsheet programs may interpret cells beginning with =, +, -, or @ as expressions. TidyCSV’s default protection prefixes an apostrophe to these values, including values with leading whitespace, and to values beginning with a tab or carriage return. A cell such as =SUM(A1:A3) therefore becomes '=SUM(A1:A3) in the exported text.
This also affects legitimate signed numbers: -12 becomes '-12. Keep protection enabled for untrusted text you plan to view in a spreadsheet. Disable it when you require unchanged values for a trusted machine import, then use the destination’s safe text-import settings. An apostrophe is a mitigation, not a guarantee across every spreadsheet program; inspect how your chosen application imports it.
7. Check the destination, too
CSV carries text, not column types or formatting. TidyCSV preserves leading zeros in the output text, but your spreadsheet may convert 00123 into 123 or reinterpret a date when opening it. Choose text columns in the import dialog when exact spelling matters. Compare the row count and a few representative values after import, then keep the original until you are satisfied with the result.
Open the CSV cleaner →