Empty CSV Row to JSON – Why a Blank Record Becomes an Object of Empty Strings

Local only

An explicit row containing the expected number of empty fields is still a CSV record, so CSV to JSON emits an object whose values are empty strings.

21 chars · 3 lines

21 chars · 3 lines

3 rows2 columnsComma delimiter

CSV empty-record conversion behavior

Why an empty CSV record still becomes a JSON object

The final line contains two empty fields separated by a comma. That is structurally different from having no row at all: it is a complete two-column record, so the converter emits a second object with empty string values. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • CSV to JSON behavior example
  • Header-to-key mapping
  • String-preserving cell conversion
  • .csv and .tsv file import
  • Browser-local processing

Steps

  1. Inspect whether the source row contains the expected delimiters.
  2. Decide whether that empty record is meaningful or an export artifact.
  3. Remove it from the CSV if it should not become a JSON object.

A delimiter-only row is still a structured record

For a two-column table, a line containing one comma encodes two empty fields. The converter preserves that record instead of silently dropping it.

Empty CSV Row to JSON example

The output below is the actual JSON produced by the same CSV to JSON mode for the preloaded source.

CSV input

name,role
Ada,admin
,

Actual JSON output

[
  {
    "name": "Ada",
    "role": "admin"
  },
  {
    "name": "",
    "role": ""
  }
]

Common questions

Frequently asked questions

Why does a line containing only a comma become an object?

The comma defines two fields, and both are empty values for the two header columns.

Is this the same as a completely blank physical line?

No. A completely blank line has one field in this parser and can trigger a column-count mismatch.

Should empty records be removed automatically?

No. Whether they are meaningful depends on the source workflow, so VetaTool keeps valid records explicit.

Debugging a specific CSV issue? Browse CSV troubleshooting.