CSV to JSON Boolean Values as Strings – Why true and false Stay Quoted

Local only

The text true or false in CSV is not typed metadata, so CSV to JSON preserves those cells as strings instead of silently coercing booleans.

32 chars · 3 lines

32 chars · 3 lines

3 rows2 columnsComma delimiter

CSV boolean-type preservation

Why CSV true and false values stay strings in JSON

The active cells spell true and false, but those tokens are still just CSV text. Without a schema, the converter cannot know whether they represent booleans, labels, status codes, or literal text. 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. Convert the CSV without guessing boolean types.
  2. Identify columns whose schema explicitly defines boolean values.
  3. Map accepted tokens such as true and false to booleans after conversion.

Boolean-looking text is still text without a schema

Automatic coercion can corrupt datasets where true and false are labels or where alternate tokens such as yes, no, 1, and 0 are used inconsistently. Explicit conversion keeps that decision visible.

CSV Booleans as JSON Strings example

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

CSV input

name,active
Ada,true
Linus,false

Actual JSON output

[
  {
    "name": "Ada",
    "active": "true"
  },
  {
    "name": "Linus",
    "active": "false"
  }
]

Common questions

Frequently asked questions

Why does true become "true" in JSON?

The converter preserves CSV cell text and does not infer booleans.

Can I automatically convert a known active column later?

Yes. Use an explicit schema-aware transformation after parsing.

Does VetaTool convert yes/no to booleans?

No. It does not guess boolean token conventions.

Debugging a specific CSV issue? Browse CSV troubleshooting.