Developer tools
CSV cleaner for cells
Trim spaces, collapse extra whitespace and change letter case in the CSV columns you pick. Unselected columns stay as they are. It runs in your browser.
Processed in your browser
1 CSV input
Choose a UTF-8 CSV file or paste CSV below.
Enable JavaScript to clean CSV.
2 Choose cleanup
Order: Trim → Collapse → Case
Each run starts from your original input. Only checked operations change selected data cells.
3 Results
No output yet
Changed cells will appear here after cleaning.
Scroll within the table to see more columns. With the table focused, use the arrow keys.
The preview shows the first 25 changes; counts and downloads include all records. Export uses the input delimiter, quotes every field and writes UTF-8 with LF record separators, no initial BOM and no final record terminator.
How to clean a CSV file
Add your CSV
Select Choose file for a UTF-8 file, paste CSV, or select Load example. The columns are read at once. After you type changes in the box, select Read columns.
Pick columns and options
All columns start selected. Clear the ones to leave alone, then tick Trim edges, Collapse whitespace or both, and choose a Letter case.
Clean and save
Select Clean cells. Check the counts and the changed-cell preview, then select Copy CSV or Download CSV. Changing an option clears the result until you clean the cells again.
Example: the three-row sample
Load example gives a header and two rows. With the default options, only Trim edges is on, so one cell changes: the name Zoë loses the two spaces on each side.
Tick Collapse whitespace and run again, and three cells change. The three spaces in the first note become one, and the second note, which holds a line break, becomes one line. The codes 00123 and 00007 keep their leading zeros.
What each option does
Trim edges removes spaces, tabs, line breaks and nonbreaking spaces from both ends of a cell. Collapse whitespace turns every run of them inside a cell into one space. The steps always run in this order: trim, collapse, then case.
Letter case changes the whole cell to lowercase or UPPERCASE. It does not guess title case, and a few letters change length, such as ß to SS. Zero-width spaces are not whitespace here and stay in place.
What stays the same
Unselected columns and row order do not change. The header stays unchanged when you tick First row is a header. Duplicate and blank headers are allowed; choose columns by their position. No rows or columns are removed, and short rows are not padded. Values stay text, so leading zeros and long numbers are safe.
The output is UTF-8 with every field in double quotes, LF record separators and the input delimiter. Embedded line breaks stay in unselected cells. File input keeps their original line endings; pasted text follows the browser's LF convention. No formula prefix is added, so import columns as text in a spreadsheet if you need the exact values.
Empty cells and blank records stay in place. An empty file produces an empty download. A final line break ends the preceding record; it does not add another record.
Limits
The tool reads UTF-8 only. A file that looks like UTF-16, invalid UTF-8 or an unclosed quote stops with an error, and a quote error names the record. The tool sets no row or file size cap; your browser's memory is the limit. Cancel stops a long run and keeps your input. A replacement file that cannot be read keeps the previous input and result.
Questions
How do I remove extra spaces from a CSV file?
Leave Trim edges ticked and tick Collapse whitespace, then select Clean cells. Spaces at the start and end of each cell are removed, and double spaces inside a cell become one. Only the columns you selected change.
How do I make one CSV column uppercase?
Use Select none, tick that one column, set Letter case to UPPERCASE and select Clean cells. Clear Trim edges and Collapse whitespace if you want the case change only.
Does the header row change?
No. With First row is a header ticked, the first row is left as it is and does not count in the totals. Clear the box to clean the first row as data.
What if nothing needs cleaning?
The result says that no cell values changed. You can still download the CSV, which is rewritten with every field quoted. A cell changed by two options counts once.
Which delimiters work?
Auto-detect tries comma, semicolon, tab and pipe. If it is not sure, it uses comma and says so. Choose the Input delimiter yourself if the column names look wrong.
Is my CSV uploaded?
No. The file is read and cleaned in your browser, and nothing is uploaded or stored. Reset clears the input and the result.