CSV Validator
Find what breaks a CSV import: rows with too many or too few columns, broken quotes, empty or duplicate headers, mixed line endings and encoding problems, each with its line.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Open or paste
Choose the CSV file or paste its text.
- 2Check the delimiter
Leave it on detect or choose one.
- 3Read problems
Go through errors by line.
- 4Check columns
Review types, empties and distinct counts.
- 5Fix the source
Correct the rows in your editor.
- 6Re-check
Validate again before importing.
เกี่ยวกับเครื่องมือนี้
CSV looks simple until an import fails on row 18,422 because someone typed a comma inside an unquoted address, or a quote inside a name, or Excel saved the file with semicolons. This validator reads the file the way a strict parser does and reports every problem with its line number. It detects the delimiter (comma, semicolon, tab or pipe), checks each row has the same number of columns as the header, finds quoted fields that are never closed and quotes that appear in the middle of unquoted fields, flags empty rows, empty or duplicate headers and headers with stray spaces, and notices mixed line endings, byte-order marks and the replacement character that signals an encoding problem. A column profile shows what each column seems to contain (numbers, dates or text), how many values are empty and how many are distinct, which helps spot a shifted column.
The rules (RFC 4180)
- Each record is on its own line; the last line may or may not end with a line break. - Every record should have the same number of fields as the header. - A field containing the delimiter, a quote or a line break must be enclosed in double quotes. - A quote inside a quoted field is written as two quotes (""). Spreadsheet programs mostly follow these rules but differ on delimiters and encodings, which is where imports go wrong.
Common problems and fixes
- Too many columns: an unquoted comma inside a value. Quote the field. - Stray quote: a quote in an unquoted field, such as 5" screen. Quote the field and double the quote. - Never-closed quote: often a missing closing quote that swallows the rest of the file. - Semicolons: European Excel uses semicolons because the comma is the decimal mark; choose the delimiter explicitly when importing. - Replacement characters: the file was not saved as UTF-8. Re-save as CSV UTF-8.
Column profile
If a column you expect to be numeric shows as text, a few rows probably have shifted values or stray characters. Distinct counts help find columns that should be unique, such as IDs.
Large files
Open the file directly rather than pasting it. Very large files (hundreds of megabytes) are better checked with command-line tools.
Limits
The validator checks structure, not meaning: it does not know that a date is impossible or an email invalid. Only the first 500 problems are listed. This is a quality check, not a guarantee that a particular system will accept the file.
ตัวอย่างพร้อมวิธีทำ
A four-column file where row 3 has only three values and row 4 contains "Tim "TBL" Berners-Lee" gets two errors: 3 columns, expected 4 on line 4, and a stray quote inside an unquoted field on line 5, while the column profile shows amount as a number column with one empty value.
สรุปสั้น ๆ
- หมวดหมู่: นักพัฒนาและข้อมูล
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: RFC 4180 (Common Format and MIME Type for CSV Files)
คำถามที่พบบ่อย
Which delimiters are detected?
Comma, semicolon, tab and pipe.
What does a stray quote mean?
A quote inside a field that is not enclosed in quotes; quote the field and double the inner quote.
Can I open a file instead of pasting?
Yes. Choose the file; it is read in your browser.
Does it fix the file?
It shows each problem and its line; fix them in your editor or spreadsheet.
Is my data uploaded?
No. Everything runs in your browser.
Why do I see � characters?
The file is probably not UTF-8; re-save it as CSV UTF-8.
