The full guide
The difference in one paragraph
A Switch (Toggle) acts the moment you flip it: the setting is on or off right now, with nothing to submit. A Checkbox records a yes or no that waits until the form is saved, and each Checkbox stands on its own, so a list of them lets you pick none, one or many. A Radio Button only exists in a group that asks one question, shows every answer and keeps exactly one. So the three differ on two axes: when the choice takes effect (now or on submit) and how many answers are allowed (any number or exactly one).
How to tell them apart on screen
A Switch is a short pill with a knob that slides from side to side, usually at the right edge of a settings row with its label on the left. A Checkbox is a small square that receives a tick; a Radio Button is a small circle that receives a dot.
Then look at the neighbourhood: a Switch stands alone, and tapping it changes only the setting itself. Checkboxes and Radio Buttons sit under a question or inside a form with a Save or Continue button below, and nothing changes until you press it. Radio Buttons come in sets of two or more, and tapping one empties the previous one. On mobile each platform draws the Switch its own way, while Checkboxes and Radio Buttons look the same on phone and desktop, only larger, with the whole row tappable. None of the three opens anything or blocks the page.
Which one to choose
Dark mode in Appearance settings: Switch. The screen changes the instant you flip it, and there is no form to submit.
Email preferences on a profile page that ends with a Save button: Checkbox, even though each item is on or off. A Switch promises an instant effect, and waiting for Save breaks that promise.
Shipping method at checkout, three options, one allowed: a Radio Button group with Standard preselected. All options stay visible for comparing prices, and the circles say that picking one drops the others.
Filtering a product list by brand: Checkboxes, because the user wants two brands at once. If filters apply as you tick, show a live result count but keep the Checkbox shape; a column of Switches reads like settings.
Feature flags per environment in an admin table: a Switch in each row, because every flip takes effect alone and immediately; a toast can confirm it.
Mistakes teams make
A Switch inside a form. The user flips it, sees nothing happen and leaves without pressing Save. Fix: use a Checkbox in forms, or make the Switch truly instant.
A single Radio Button as yes or no. It cannot be unselected once chosen, so the user is trapped. Fix: a lone yes-or-no is a Checkbox, and a group needs at least two options, including None when none is valid.
Negative labels on a Switch, such as Disable sounds, make users work out whether on means silence. Fix: label the positive state (Sounds) and let on and off speak for themselves.
Only the box is clickable. On a phone a 16-pixel square is a miss half the time. Fix: put the text inside the label element so the whole row toggles, at least 44 points tall.
Accessibility and keyboard notes
Keyboard behaviour is the clearest proof of what you built. A Checkbox and a Switch are each a Tab stop and toggle with Space. A Radio Button group is one Tab stop in total: Tab lands on the selected option, and the arrow keys move and change the selection in one move, so never attach a heavy action to the change event.
Screen readers announce a Checkbox as checked and a Switch as on or off, so a Switch needs role="switch" rather than a restyled Checkbox with no role. Name every Radio Button group with a fieldset and legend so the user hears the question before the options. Use aria-checked="mixed" for a Select all Checkbox that is partly selected. Do not rely on colour alone; the knob position, the tick and the dot are the signal. Esc does nothing here, none of the three should move focus or open an overlay, and on touch the whole row is the target.
How to ask a coding agent for it
Name the element, say whether it is instant or deferred, and describe the group. Three prompts that work:
Add a Switch labelled 'Dark mode' to the Appearance settings screen as an input type checkbox with role="switch"; it applies immediately, persists to user preferences and has no Save button.
Replace the three Checkboxes in the shipping step with a Radio Button group named shipping inside a fieldset with the legend 'Shipping method', preselect Standard and let the arrow keys move the selection.
Add a 'Select all' Checkbox to the invoices table header that shows the indeterminate state when only some rows are selected, and make every row label clickable.
Frequently asked questions
Is a switch just a styled checkbox?
In HTML it is often the same input, but not the same element: a Switch applies instantly and is announced as on or off, while a Checkbox is deferred and announced as checked. If you restyle a Checkbox as a Switch, add role="switch" and drop the Save button.
Can a radio button be unselected?
Not by the user: once any option is chosen, the selection can only move to another option. If none is a valid answer, add it as an explicit option; for a single yes or no, use a Checkbox.
When should I use a select instead of radio buttons?
Past about six options, when space is tight, or when the options are long. Radio Buttons win when the choices must be seen and compared side by side.