Boolean Token Normalizer

Normalize trimmed case-insensitive yes/no, true/false, and 1/0 column cells into booleans, returning a cell-specific error for unknown tokens.

Description

Boolean columns often mix human-readable tokens and numeric-looking text.

Boolean columns often mix human-readable tokens and numeric-looking text. A controlled mapping turns these known spellings into booleans while rejecting unknown values that could otherwise be silently misinterpreted.1

Normalize trimmed case-insensitive yes/no, true/false, and 1/0 column cells into booleans, returning a cell-specific error for unknown tokens.

When to use Boolean Token Normalizer

Use this tool to normalize trimmed case-insensitive yes/no, true/false, and 1/0 column cells into booleans, returning a cell-specific error for unknown tokens.

Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.

How to use Boolean Token Normalizer and understand its results

  1. Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
  2. Enter values using the field table and calculation rules, then run the tool.
  3. Read values. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
valuesValueslist of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000Required

Provide decoded cell strings. Each cell is trimmed and lowercased before matching the six supported tokens. The result is an aligned boolean list. A blank or unrecognized token returns a cell-specific input error for the entire request; an empty input list returns an empty list.

true tokens = yes, true, 1; false tokens = no, false, 0

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
valuesValueslist of boolean
json
{
  "input": {
    "values": [
      " YES ",
      "false",
      "1",
      "0"
    ]
  },
  "output": {
    "values": [
      true,
      false,
      true,
      false
    ]
  }
}

Limitations and assumptions

This is a deliberate token mapping, not JavaScript truthiness or numeric coercion. It does not accept y/n, on/off, arbitrary nonzero numbers or localized words, and does not provide a separate null/missing-value convention.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Column Type Inference From Sample: Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings. For a complementary task, use Accounting Dash-for-Zero Normalizer: Replace cells consisting of a trimmed ASCII accounting dash with the exact string 0, preserving all other cell text including numeric signs and Unicode dashes.

References

  1. Boolean Token Normalizer — tool.io

Similar or alternative tools

  • Column Type Inference From Sample

    Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings.

  • Accounting Dash-for-Zero Normalizer

    Replace cells consisting of a trimmed ASCII accounting dash with the exact string 0, preserving all other cell text including numeric signs and Unicode dashes.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies