CSV Formatter & Beautifier
Format CSV online into an aligned, readable table view, or minify it back into compact standard CSV. Auto-detect delimiters and handle quoted fields correctly.
What does the CSV formatter do?
This tool has two jobs. Beautify turns CSV into a plain-text table with every column padded to the same width, so you can read an export or check a file before importing it. Minify does the opposite kind of clean-up: it parses the CSV and writes it back out as compact, consistently quoted CSV, with blank lines and Windows carriage returns removed.
CSV (comma-separated values) stores one record per line and separates fields with a delimiter. The closest thing to a standard is RFC 4180, which describes the common format: fields that contain the delimiter, a double quote or a line break are wrapped in double quotes, and a quote inside such a field is written twice (""). In practice files differ in delimiter, line endings and encoding, which is why this formatter can detect the delimiter for you.
How to use the CSV formatter
- Paste CSV into the Input pane, load a file with File, or fetch one with URL (the remote server must allow cross-origin requests).
- Leave Delimiter on Auto-detect, or pick the delimiter your file uses.
- Click Beautify for the aligned view, or Minify for clean CSV.
- Use Copy, or Download to save the result as
formatted.csv. Clear empties both panes.
Options explained
- Delimiter — Auto-detect looks at the first line only, ignores anything inside double quotes, and picks whichever of comma, semicolon, tab or pipe appears most often (comma wins a tie). Choose Comma (,), Semicolon (;), Tab or Pipe (|) to override it.
- First row is header — when ticked, Beautify draws a dashed rule under the first row, for example
----+-----. It has no effect on Minify. - Beautify — pads each column with spaces to the width of its longest value and separates columns with
|. The quotes around quoted fields are removed in this view, because the column borders already show where each value ends. - Minify — rewrites the data as CSV using the same delimiter, quoting only the fields that need it. Tab-separated input is written out with commas. Blank lines and a leading byte order mark (BOM) are dropped, and lines end with a plain line feed (LF).
Example
Input:
sku,product,price,notes
A1,Desk lamp,29.00,
B7,"Chair, oak",149.00,"Seat height 45 cm"
C3,Shelf,75.50,Wall-mounted
After Beautify with First row is header ticked:
sku | product | price | notes
----+------------+--------+------------------
A1 | Desk lamp | 29.00 |
B7 | Chair, oak | 149.00 | Seat height 45 cm
C3 | Shelf | 75.50 | Wall-mounted
Running Minify on the same input keeps the quotes round "Chair, oak", which contains a comma, and drops them from Seat height 45 cm, which does not need them. A file where every field is quoted and lines end in CRLF comes out as unquoted, LF-terminated CSV except where quoting is required.
Common problems and fixes
| Symptom | Cause | Fix |
|---|---|---|
| Everything appears in one column | The wrong delimiter was used, for example a semicolon file with Comma (,) selected. | Switch Delimiter back to Auto-detect or choose the right one. |
| Warning that a row has a different number of columns | A row has more or fewer fields than the first row, often because a value containing the delimiter was not quoted. | The aligned view is still shown; find the row number given in the warning and quote or fix the value. |
| Error saying a quoted field is never closed | A field opens with " but has no closing quote, so the rest of the file would be read as one value. | Go to the line given in the message and add the missing quote, or double a quote that belongs to the value. |
| A row breaks across several lines in the aligned view | A quoted field contains a line break. That is valid CSV, but the line break is shown as it is. | Nothing to fix in the data; Minify keeps the value intact and quoted. |
| Columns slightly out of line | Widths are counted in JavaScript string length, so emoji and wide characters such as Chinese or Japanese text can take more or less space than one column. | Use the aligned view for reading only; the data itself is unchanged. |
A double quote in the middle of an unquoted value, such as 55" screen, is kept as an ordinary character. Strictly, RFC 4180 does not allow it, but many exports contain it, and Minify writes the value back out correctly quoted as "55"" screen".
Frequently asked questions
Can I turn the aligned view back into CSV?
Not reliably. Minify reads the padded table as pipe-separated data, so the spaces and the dashed header rule stay in the result. Keep your original CSV and run Minify on that instead; the aligned view is for reading.
Why does Auto-detect pick the wrong delimiter?
It only counts delimiters in the first line. A header with one column, or one that uses several candidate characters, can mislead it. Select the delimiter yourself when the output looks wrong.
Does Minify change my values?
No. It only changes quoting, removes blank lines, the byte order mark and the carriage returns at line ends, and swaps tabs for commas. Spaces inside values, leading zeros and number formats such as 12,50 are left alone.
Will the downloaded file open correctly in Excel?
The file is saved as UTF-8 without a byte order mark. When you double-click a CSV like that, Excel may assume an older regional encoding and show accented characters wrongly, and it splits columns using your system's list separator. Importing through Data > From Text/CSV lets you choose the encoding and delimiter yourself.
How large a file can I format?
There is no fixed limit in the tool. Everything is held in the page, so the practical limit is your browser's memory, and very large files can make the text panes slow to scroll.
Is my CSV sent to a server?
No. Parsing and formatting happen in JavaScript in your browser, and files you open with File are read locally. The only request the tool makes is when you choose URL, which fetches that address directly from your browser.