SharePoint Yes/No column formatting
SharePoint's default Yes/No column renders as a tiny checkbox icon that's easy to miss when scanning a list. Column formatting JSON turns it into a clear toggle switch or checkbox instead.
A Yes/No (boolean) column stores true or false, but by default SharePoint just shows a small checked or unchecked box — no color, no label. With column formatting JSON, you can render it as a colored toggle switch, a checkbox with a strikethrough label, or any other visual you want.
Before and after
What the SharePoint Yes/No JSON looks like
The generator produces JSON like the example below. The field's boolean value drives both the switch position and its color:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"width": "34px", "height": "18px", "border-radius": "20px",
"background-color": "=if([$Done] == 1, '#107c10', '#c8c6c4')",
"position": "relative"
},
"children": [
{
"elmType": "div",
"style": {
"width": "14px", "height": "14px", "border-radius": "50%", "background-color": "white",
"position": "absolute", "top": "2px",
"left": "=if([$Done] == 1, '18px', '2px')"
}
}
]
}
This is standard SharePoint boolean column formatting JSON: the field value (1 for Yes, 0 for No) is checked with if() to set both color and knob position. The generator writes this — and the click-to-edit behavior — for you.
How to apply it
- Open the generator and pick Yes/No Toggle (or Checkbox To-Do for a to-do list look).
- Enter your column's internal field name — see the note below.
- Adjust colors if you want something other than green/grey.
- Click Copy.
- In SharePoint: Column settings → Format this column → Advanced mode.
- Delete what's in the box, paste, click Preview, then Save.