One CSV, written one way: what a formatter can and cannot fix
A CSV that has passed through a few hands tends to collect small inconsistencies. One export quotes every cell and another quotes none. Someone typed a space after each comma. A row near the bottom lost its last two cells when a value was deleted. None of this stops a spreadsheet from opening the file, but each one can trip up a script, a database import or a diff between two versions of the same data.
Formatting means reading the file properly and writing it out again by one set of rules. Reading properly is the hard part. A cell can contain the separator, a line break, or a quote mark written twice, and a naive split on commas gets all three wrong. This tool parses each row the way the CSV standard, RFC 4180, describes, and detects whether your file uses commas, semicolons, tabs or pipes by checking which one gives every row the same number of columns.
Writing is then simple and predictable. With the default setting a cell is wrapped in quotes only when it needs them, which is when it contains the separator, a quote mark or a line break. Choose quotes around every cell if a strict loader expects that. The file keeps its own separator and its own line endings, so a Windows file stays CRLF and a semicolon file stays semicolon. To change the separator, use the CSV Delimiter Converter instead.
Two options change content, and both are off-switchable. Trimming removes spaces from the start and end of each value, which fixes " Lisbon" not matching "Lisbon" in a lookup. Filling adds empty cells to short rows so every row is as wide as the header; most importers reject a ragged file outright. A row that is wider than the header is the one thing the formatter will not touch. Cutting it would throw away values, and the formatter cannot know which ones are wrong, so it leaves the row whole and tells you how many there are.
The aligned preview is there so you can check the result with your eyes. It pads each column with spaces to the width of its widest cell, for the first 200 rows, and marks line breaks inside cells with ↵. Treat it as a view only. A CSV padded with spaces is a different CSV, because the spaces become part of every value. Copy or download the formatted CSV above it. Everything runs in a worker on your device, and the file is never uploaded.