Handle Empty Fields and Sparse Data

Convert TSV/CSV data that contains empty fields, missing values, and rows with varying column counts. Learn how sparse data is preserved.

Special Characters

Detailed Explanation

Empty Fields and Sparse Data

Real-world data is often incomplete. Some cells may be empty, some rows may have fewer columns than others, and some fields may contain only whitespace. The converter handles all of these cases gracefully.

Example: Sparse TSV Data

Name	Email	Phone	Notes
Alice	alice@example.com	555-0101	
Bob		555-0102	Preferred customer
Charlie	charlie@example.com		
			Orphan note

Converted to CSV

Name,Email,Phone,Notes
Alice,alice@example.com,555-0101,
Bob,,555-0102,Preferred customer
Charlie,charlie@example.com,,
,,,Orphan note

How Empty Fields Are Represented

In both TSV and CSV:

  • An empty field between two delimiters represents a missing value
  • Consecutive delimiters (,, in CSV or \t\t in TSV) indicate one empty field between them
  • A trailing delimiter at the end of a line creates an empty last field
  • An empty line (no delimiters) is a row with a single empty field

Sparse Rows (Varying Column Counts)

When rows have different numbers of columns:

  • Short rows are preserved as-is (they have fewer fields)
  • The preview table shows empty cells for missing columns
  • The column count in the info bar shows the maximum column count across all rows

Whitespace-Only Fields

Fields containing only whitespace (spaces) are preserved exactly. A field with three spaces is different from an empty field. The converter does not trim whitespace.

NULL vs Empty

In CSV/TSV, there is no standard way to distinguish between NULL and an empty string. Both are represented as an empty field. If your data requires NULL semantics, consider using a structured format like JSON instead.

Use Case

Working with survey data, form submissions, or database exports where some fields are optional and may be empty, ensuring empty values are correctly preserved during format conversion.

Try It — TSV \u2194 CSV Converter

Open full tool