Boolean Value Normalization
Convert yes/no, true/false, in stock/out of stock, and more to standard TRUE/FALSE.
Boolean data — values that are either true or false — comes in many representations. Databases use 1/0, forms use yes/no, inventory systems use "in stock/out of stock". Normalizing these to TRUE/FALSE makes filtering and processing reliable.
Boolean (Standard)
Converts truthy and falsy values to TRUE or FALSE. Recognizes a wide range of representations including inventory terms. Unknown or empty values become null.
Before
yes
no
true
false
1
0
on
off
available
out of stock
In Stock
sold out
active
inactive
After
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE
TRUE
FALSE
Also accepts: Y/N, enabled/disabled, available/unavailable. Useful for the "inStock" property in Product schema.
When to Use This
- Product availability status
- Feature flags in configuration data
- Survey responses (yes/no questions)
- Schema markup (ItemAvailability)