Skip to content
Jellykit

CSV Formatter

Tidy a CSV file: consistent quoting, trimmed values, one kind of line ending and rows of equal length.

  • Runs on your device
Loading tool

About CSV Formatter

CSV files pieced together by hand, exported from old systems or edited in a text editor often have stray spaces, quotes on some fields and not others, a mix of Windows and Unix line endings, and rows with missing or extra fields. Many importers reject them. This tool rewrites the data in one consistent form without changing what the values say.

Short rows are padded with empty fields, and you can instead cut every row to the length of the header. Blank lines are removed, and the summary under the result says exactly what was changed.

How it works

  1. The data is read as RFC 4180 CSV with comma, semicolon, tab or pipe separators, detected automatically unless you choose one. The output keeps the same separator.
  2. With trimming on, spaces around each value are removed, and a quoted field written with spaces around it, such as , "Paris, France" , is read as one field.
  3. Every row is then written the same way: quotes only where a value contains the separator, a quote or a line break (or around every value, if you choose), and the line ending you picked.
  4. Rows are padded to the longest row, or fitted to the first row, which also removes extra fields. The summary counts what was padded, cut, trimmed and removed.

Questions

Will it change my numbers or dates?

No. Values are only trimmed of surrounding spaces (and you can turn that off). Numbers, dates and text keep the exact characters they had.

What does it do with a stray quote?

A quote in the middle of a value, such as 5" pipe, is kept as a character and the value is quoted correctly in the output. The summary says how many there were and the line of the first. A quote that is never closed stops the tool and names its line, because guessing where it ends could merge rows.

Why does every row now end with an empty field?

At least one row was longer than the others, so the rest were padded to match. If the extra fields are a mistake, choose "Fit to the first row" to cut every row to the header's length instead.

How large a file can it handle?

Up to 10 MB of text. The work is done in your browser and the data is not uploaded.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.