Skip to content
FormatMyCSV
Runs in your browser · Files are never uploaded

CSV Formatter and Cleaner

Format CSV online, clean messy data, and preview your changes before downloading.

Workspace

CSVCSV

Input data

or drop a CSV or TSV file here

Options

Cleanup options
Advanced options

Use column numbers starting at 1. Omitted columns are deleted.

Enter comma-separated names in output order. Leave positions blank to keep their names.

Preview

Your rows and columns will appear here.

Explore CSV tools

Convert CSV to ExcelDownload an Excel workbook that preserves leading zeros and long IDs.

How to clean a CSV

  1. Choose a file or paste CSV. Check the separator and first-row setting in the preview.
  2. Select the cleanup operations you need. The change report counts the cells and rows affected.
  3. Choose your output format and download the cleaned file, or copy the result.

Try it with messy data

Name,Email,ZIP code,Unused
 Maya Chen ,maya@example.com,02108,
Maya Chen,maya@example.com,02108,
,,,
Leo Ortiz,leo@example.com,00501,

Select Trim whitespace and Remove duplicate rows to collapse the two Maya entries. Remove empty rows and columns to clear the unused fields.

How to format CSV files online

A CSV file is a plain-text table. Each record contains fields for one row, and a separator marks where one field ends and the next begins. The CSV format makes it easy to exchange data between spreadsheets, databases, and other apps. It also means a CSV carries little information about how software should interpret each value. A postal code can look like a number, and a comma inside a company name can look like a column break if the field is missing its quotes.

FormatMyCSV is a free CSV formatter for checking and cleaning those exports. Open a file or paste a short sample, look at the table preview, and apply the changes your next app expects. You can download the cleaned result as a new file or copy it to your clipboard. The original file stays on your device.

Check the separator and header first

Start with the input separator. CSV commonly uses commas, but spreadsheet exports can use semicolons, and TSV files use tabs. The formatter detects common separators and lets you choose one manually. If the preview shows a whole record in a single column, try the separator used in the source file. When a company name like Rao, Meera & Co. appears inside a quoted field, its comma belongs to the value and stays in that cell.

Next, check the first row. Choose Use as header if it contains labels such as Name, Email, and ZIP code. Choose Keep as data if it contains a record. This matters when converting CSV to JSON, because the header supplies the object keys. If you need a small file to practice with, follow the guide on how to create a CSV file.

Clean the data and review what changed

Open Cleanup options and select the operations that match the problem. Trim whitespace when values contain spaces or tabs at their edges. Remove duplicate rows when every field matches. If two records share an email address and have different order numbers, both stay because the rows differ. Trimming first can reveal duplicate rows that differ only by a space after a name.

Remove empty rows to clear gaps between records. Remove empty columns to drop fields with no values in their data rows. Advanced options let you rename, reorder, or omit columns, standardize text case, and replace literal text. For example, you can keep only the Name, Email, and Status columns before sharing a contact export. Check the change report for counts and inspect some records before saving the result.

Fix broken rows and garbled characters

When records contain different numbers of fields, a missing value can make the file look uneven. Compare the preview with the original to see where the mismatch starts. If a file has a stray quote or mixes separators, use CSV repair to try recovering those rows. Repair uses the surrounding structure to interpret ambiguous input. Compare the affected fields against the original, especially when a quoted note spans several lines.

Characters such as accented names can look wrong when an older export is decoded using the wrong character encoding. The CSV encoding tool can read the original bytes using a selected encoding and export UTF-8. If the receiving program expects a UTF-8 marker, enable Add UTF-8 BOM. Choose the original file when experimenting with encodings so the browser can read its bytes directly.

Choose the output for the next app

Use CSV when another app expects a plain-text import. Match the delimiter required by that app, and check that its column names match your export. If you need to convert CSV to Excel, choose XLSX. FormatMyCSV writes Excel cells as text to preserve an identifier such as 00017 or an account number with more than 15 digits. In Excel, convert only the columns you need for calculations to numbers. For the reverse workflow, convert Excel to CSV to export the first worksheet.

Use the CSV to JSON converter when an app needs an array of records and the header already contains the right keys. If you received a JSON export and need a table, use JSON to CSV to turn object keys into columns. For a printable inventory or handout, convert CSV to PDF and choose landscape when the table needs more room. If your destination is a shared spreadsheet, follow the steps to import CSV into Google Sheets.

Verify the formatted file before sending it

Before downloading, compare the preview’s row count and column order with what the receiving app expects. Check one record with a leading zero, one with accented text, and one with punctuation or a line break inside a quoted field. The preview shows up to 200 rows and 60 columns. You can search for a value outside the initial preview. Download uses the full processed table in source order, even when you filter or sort the preview.

Processing takes place in your browser, and FormatMyCSV never uploads your input. The browser reads large delimited files in chunks, while the processed table still uses device memory. For a large export, allow the preview to finish, check the report for warnings, then download. If a receiving app limits how many records it accepts at once, use Split CSV to divide the dataset by row count and repeat the header in each part.

Frequently asked questions

What is a CSV file in Excel?

A CSV is plain text that Excel can display as a table. Each separator identifies the end of one field and the start of the next. In the formatter, check the preview before opening the file in Excel, especially for exports with a semicolon separator or identifiers with leading zeros.

Is CSV the same as XLS?

No. CSV holds one table as text. XLS is an Excel workbook format that can carry formulas, worksheets, and formatting. Use the formatter to prepare a plain-text file for import, or convert CSV to Excel when you want a workbook with text cells for identifiers.

What type of CSV to use?

Start with a UTF-8 CSV with a header and comma separators when you control both ends of the exchange. If the receiving app specifies another delimiter, use that setting when exporting. The best format is the one the destination agrees to parse, so confirm the requirements before downloading.

How do I change the delimiter in a CSV?

Choose the current separator under Input separator, then select a different Output separator and download the result. Check the preview before exporting so commas inside quoted descriptions stay in their cells. The CSV delimiter tool is useful when changing the separator is the only task you need.

How do I remove duplicate rows from a CSV?

Enable Remove duplicate rows in Cleanup options. The formatter keeps the first occurrence and compares the remaining values in each record. Turn on Trim whitespace first if a trailing space should be ignored. The report counts removed rows, and the file is processed in your browser without an upload.

How do I fix garbled accents in a CSV file?

Choose the original file and try the source encoding in Advanced options. Check familiar names or symbols in the preview before exporting UTF-8. Pasted text has already been decoded, so the original file is best for diagnosing byte-level problems. For more controls, open Fix CSV Encoding.