Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. CSV & Data Analysis
  3. CSV Formatter & Validator
Add to favorites

CSV Formatter & Validator

Clean up and standardise a CSV file: change the delimiter, quoting and line endings, trim spaces, fill short rows and remove repeats, with a check against RFC 4180.

Rows never leave your deviceMore csv & data analysisJump to full guide
Related readingWhy Parsing CSV Is Harder Than It Looks (RFC 4180)11 minCSV Data Processing: Tips for Handling Large Datasets10 min

Initializing in your browser…

You might also like

CSV Duplicate Remover

Find and remove duplicate rows in a CSV, by whole row or chosen columns, ignoring case, stray spaces or number formatting if you want, and review every group before you download.

CSV Data Validator

Check every value in a CSV against rules such as required, email, number range, date, URL or unique, see each problem by row with a reason, and download the clean rows.

CSV Data Transformer

Clean up CSV columns with a chain of 34 steps: trim, change case, extract digits, reformat dates and numbers, mask values and more, with a live before and after preview.

A sample run

A contact list edited by hand has stray spaces, a value with a comma in it, a blank line, a row missing its last field and an accidental duplicate. It needs to load into a system that expects a clean CSV.

contacts.csv (LF line endings)

Name,Age,City,Email
Alice Johnson,28,New York,alice@example.com
  Bob Smith ,35,  Los Angeles,bob@example.com
Carol White,42,"Portland, OR",carol@example.com

David Brown,,Houston
Alice Johnson,28,New York,alice@example.com
What CSV Formatter & Validator produces

Formatted, with Trim spaces and Remove repeated rows on

Name,Age,City,Email\r\n
Alice Johnson,28,New York,alice@example.com\r\n
Bob Smith,35,Los Angeles,bob@example.com\r\n
Carol White,42,"Portland, OR",carol@example.com\r\n
David Brown,,Houston,\r\n

Found in your file:
  2.1  Records are separated by LF; RFC 4180 specifies CRLF.
  2.4  1 row does not have 4 fields.
Changes:
  1 short row filled with empty fields to 4 columns.
  2 fields trimmed of surrounding spaces.
  1 repeated row removed.

The blank line is dropped, David Brown's row gets an empty Email field so every row has four, and the second copy of Alice Johnson's row is removed. Portland, OR keeps its quotes because the comma would otherwise split it into two fields, while nothing else is quoted. Line endings become CRLF, shown here as \r\n. The two findings describe the original file, so you know why another program may have struggled with it; the formatted output itself conforms.

Reformat a CSV File So Other Programs Read It Correctly

Load a CSV and get a cleaned, consistently formatted copy: the delimiter you need, quotes only where they are required, CRLF or LF line endings, stray spaces trimmed, short rows filled and exact duplicate rows removed. The tool also checks your file and the result against RFC 4180, the CSV specification, and explains anything that could trip up another program.

How to use

  1. 1Drop a CSV file on the page, choose one, paste the text, or press Try a sample.
  2. 2Pick the output delimiter, the quoting style and the line endings. The defaults produce a standard CSV.
  3. 3Switch on Trim spaces, Fill short rows, Remove blank lines or Remove repeated rows as needed.
  4. 4Open More options for the input delimiter, header and data case, the quote character, a byte order mark or column padding.
  5. 5Read the list of findings and changes under the summary.
  6. 6Press Copy or Download to save the formatted file.

Key features

  • Automatic detection of comma, semicolon, tab and pipe delimiters, with a manual choice that adds colon and space
  • Output with comma, semicolon, tab, pipe, colon or space as the delimiter
  • Four quoting styles, with fields that must be quoted always quoted and counted
  • CRLF or LF line endings
  • Trim spaces, fill short rows, remove blank lines and remove exact repeated rows
  • Header and data case changes that handle accented and non-Latin letters
  • Optional UTF-8 byte order mark for Excel and optional column padding for reading
  • Findings checked against RFC 4180 and labelled by section, for your file and for the output
  • A live preview with copy and download
  • Runs entirely in your browser

How it works

Why reformat a CSV? CSV is simple in principle but varies in practice. A file exported from European Excel uses semicolons, a database dump might quote every field, a script on Linux writes LF line endings, and someone's hand edits leave stray spaces and rows with a missing field. Importers differ in what they accept, so a file that opens fine in one place is rejected or misread in another. This formatter reads whatever you have and writes a clean, predictable file.

Reading the input. The delimiter is detected automatically, so comma, semicolon, tab and pipe separated files open correctly; you can also set it by hand, including colon and space. Blank lines can be dropped, and a leading byte order mark is removed so it does not end up glued to the first column name. If a quote is opened and never closed, the tool stops and says roughly where, because everything after that point would be read into the wrong fields.

Writing the output. Choose comma, semicolon, tab or pipe (colon and space are under More options). Quoting can be Only when needed, which is the standard choice, Every field, Text fields, or Never; even with Never, a field that holds the delimiter, a quote or a line break is still quoted, because otherwise the file could not be read back, and the tool counts those fields. Line endings default to CRLF as RFC 4180 specifies, and you can switch to LF. Other options change the case of the header or the data, add a byte order mark so Excel reads accented characters correctly, or pad columns so they line up when the file is read by a person.

Cleaning. Trimming removes spaces around values, which is off by default because the specification treats spaces as part of a value. Filling short rows adds empty fields so every row has the same number of columns, and removing repeated rows drops exact copies of an earlier row while keeping the header. Every change is listed, for example "1 short row filled with empty fields to 4 columns".

Checking. Findings are marked with the section of RFC 4180 they relate to: line endings (2.1), rows with a different number of fields (2.4), quotes inside unquoted fields (2.5). Findings about your file and about the output are listed separately, and a summary says whether the output conforms. The formatted file updates live as you change settings, and you can copy it or download it. Everything runs in your browser.

Where this fits a data pipeline

  • Converting between regional formats

    Turn a semicolon-separated export from a European spreadsheet into a comma-separated file for a US system, or the other way round.

  • Preparing a file for a strict importer

    Some importers want CRLF line endings, a fixed number of columns and no blank lines. Format the file once and the import goes through.

  • Tidying a hand-edited file

    Remove stray spaces, fill in missing trailing fields and drop accidental copies of rows after several people have edited a shared CSV.

  • Diagnosing an import error

    Load the problem file and read the findings: an unclosed quote, a row with too many fields or mixed line endings is usually the culprit.

Tips & best practices

  • If the output looks like one long column, open More options and set the input delimiter by hand.
  • For Excel users in countries that use a decimal comma, a semicolon-separated file with a byte order mark opens most reliably.
  • Read the findings about your file even if the output conforms; they explain why another program may have choked on the original.
  • Use the Input section at the bottom to make a quick manual fix and watch the output update.

Examples

  • Semicolons to commas

    name;city followed by Anna;Wien is detected as semicolon-separated and written as name,city and Anna,Wien with CRLF line endings.

  • A value containing the delimiter

    Portland, OR is written as "Portland, OR" with quotes, so it stays one field. With quoting set to Never it is still quoted, and the count of such fields is shown.

  • Accented names in Title Case

    With Data case set to Title Case, élan vital becomes Élan Vital and łódź becomes Łódź.

Frequently asked questions

What is RFC 4180?

It is the short document that describes the common CSV format: records separated by CRLF, fields separated by commas, fields containing commas, quotes or line breaks enclosed in double quotes, and a quote inside a field written twice. Most programs follow it loosely, so a file that follows it closely is the safest to share.

Why are some fields still quoted when I chose Never?

Because a field holding the delimiter, a quote or a line break cannot be written without quotes and still be read back correctly. The tool quotes just those fields and tells you how many there were.

Should I trim spaces?

Only if the spaces are mistakes. The CSV specification treats spaces as part of the value, so trimming is off by default. For hand-typed data, turning it on usually helps.

Which line ending should I choose?

CRLF is what RFC 4180 specifies and what Windows programs expect. LF is common on Linux and macOS. Almost every modern program reads both, so choose CRLF unless the receiving system asks for LF.

Why does my file show a warning about rows with a different number of fields?

Some rows have more or fewer fields than the rest, often because a value contained an unquoted comma or a trailing field was left off. Fill short rows pads the short ones; a row with too many fields usually needs a quote added in the original.

Does it change my original file?

No. The file is read in your browser and the formatted version is a new download. Nothing is uploaded.

What does Pad columns do?

It adds spaces so the columns line up when the file is opened in a text editor. That is handy for reading, but the spaces become part of the values for any program that imports the file, so leave it off for data you will process.

Related tools and how they differ

  • CSV Data Validator: Use it to check the values themselves against rules, such as required fields, email formats or number ranges.
  • CSV Viewer & Editor: Use it to look at the file as a table and fix individual cells by hand.
  • CSV Duplicate Remover: Use it when duplicates are defined by some columns, or by values that differ only in case or spacing.

Further reading

  • Why Parsing CSV Is Harder Than It Looks (RFC 4180)11 min read
  • CSV Data Processing: Tips for Handling Large Datasets10 min read

Private by design

Rows and columns are parsed and transformed in memory in your browser. No record ever reaches a server.