TFT

CSV Formatter

Every data source has its own quirks — inconsistent quotes, mixed delimiters, rogue whitespace. Our CSV Formatter irons them all out and hands you back a file that plays nicely with every tool in your stack.

CSV Formatter

Standardize CSV formatting with normalized quoting, delimiters, whitespace, and line endings

Drag and drop a CSV file here, or click to browse

or paste CSV data below

Remove leading/trailing whitespace from cells

What This CSV Formatter Does

This tool takes messy, inconsistent CSV files and produces clean, standardized output. It fixes quoting issues, normalizes line endings, trims unwanted whitespace, and ensures proper encoding. Choose your delimiter, line ending style, and encoding options.

Formatting Options

Delimiter: Switch between comma, semicolon, pipe, or tab. Useful when your target system expects a specific separator.

Line endings: Choose LF (Unix/macOS) or CRLF (Windows). Mixed line endings cause parsing failures in some tools.

Encoding: UTF-8 or UTF-8 with BOM. Excel on Windows requires BOM to display accented characters correctly.

Trim whitespace: Remove leading and trailing spaces from all fields. Cleans up data exported from poorly formatted systems.

Quoting: Applies RFC 4180 rules — fields with commas, quotes, or newlines get quoted. Internal quotes are doubled for escaping.

When You Need This

Database imports failing: MySQL and PostgreSQL are picky about line endings and quoting. Format your CSV to match their expectations.

Excel encoding issues: Accented characters showing as garbled? Excel on Windows needs UTF-8 with BOM.

Cross-platform sharing: Files created on Mac use LF, Windows uses CRLF. Normalize so everyone's tools can read the file.

European CSV formats: Many European systems expect semicolon delimiters instead of commas. Convert without manual editing.

API data imports: Services like Shopify, Stripe, or Google Ads have specific CSV format requirements. Format to match their specs.

RFC 4180 Compliance

This formatter follows RFC 4180, the standard for CSV format:

Fields containing commas, double quotes, or newlines are wrapped in double quotes. Double quotes inside fields are escaped by doubling them (" becomes ""). Each record is on a separate line with consistent line endings.

This ensures compatibility with Excel, Google Sheets, database import tools, and programming language CSV parsers.

Common Formatting Problems Fixed

Inconsistent quoting: Some fields quoted, others not. This tool applies consistent rules throughout.

Whitespace issues: Leading spaces from fixed-width exports or trailing spaces from copy-paste get trimmed.

Mixed line endings: Files edited on multiple systems have both CRLF and LF. Normalized to your choice.

Wrong delimiter: Semicolon CSV from European system needs to be comma-delimited for your US-based tool.

UTF-8 with BOM vs Without

BOM (Byte Order Mark) is a special character at the start of a file that signals UTF-8 encoding.

Use BOM for: Excel on Windows, older Windows tools that don't auto-detect UTF-8.

Skip BOM for: Web applications, Unix/Linux systems, programming language parsers, modern tools that detect encoding automatically.

Without BOM, Excel may display accented characters as garbled text. With BOM, some web parsers may treat the first column name as "ColumnName".

Limitations

Doesn't fix structural errors: If your CSV has wrong column counts or embedded newlines in wrong places, formatting won't fix that. Use CSV Validator first.

Character encoding: This tool outputs UTF-8 only. It doesn't convert from other encodings like Latin-1 or Windows-1252.

Frequently Asked Questions

What's the difference between LF and CRLF?

LF (Line Feed, \n) is used by Unix, macOS, and Linux. CRLF (Carriage Return + Line Feed, \r\n) is used by Windows. Mixed line endings cause CSV parsers to miscount rows or fail entirely.

Why does Excel need UTF-8 with BOM?

Excel on Windows assumes files are in your system's default encoding (often Windows-1252). The BOM signals that the file is UTF-8, so accented characters and emojis display correctly.

When should I use semicolon instead of comma?

In European countries where comma is the decimal separator (1,50 instead of 1.50), semicolon is the standard CSV delimiter to avoid confusion.

Does this remove empty rows?

No. This formatter standardizes structure and encoding but doesn't remove content. Use CSV Cleaner or CSV Minifier to strip blank rows.

Can this handle large files?

Files up to 100MB work well in most browsers. Larger files depend on available memory. The entire file processes in your browser, so very large files may be slow.