HTML Checkbox Generator
Configure a checkbox input — label, value, states, and attributes — and copy the ready-to-use HTML with a live preview.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML Checkbox Generator?
The HTML `<input type="checkbox">` element lets users toggle a boolean value. It is typically associated with a `<label>` element for accessibility, either via the `for` attribute matching the input's `id`, or by wrapping the input inside the label element.
Key attributes include `name` (for form submission grouping), `value` (the data submitted when checked), `checked` (pre-selected state), `disabled` (prevents interaction), and `required` (enforces selection before form submission).
How to Use HTML Checkbox Generator
Enter the label text displayed beside the checkbox
Set id, name, and value attributes
Toggle checked, disabled, or required states
Choose whether to wrap with a label element
Copy the generated HTML
Common Use Cases
- Form authors adding agreement checkboxes (terms, newsletter opt-in).
- Developers adding filter checkboxes to search or product listing pages.
- Teams generating checkbox HTML for HTML email templates.
Example Input and Output
A required terms-of-service checkbox with label.
Label: I agree to the terms
id: agree, name: agree, value: yes
Required: true<input type="checkbox" id="agree" name="agree" value="yes" required>
<label for="agree">I agree to the terms</label>Privacy
All HTML generation runs in your browser. No data is sent to any server.
Frequently Asked Questions
What value is submitted for an unchecked checkbox?
Unchecked checkboxes are not included in form submission at all — no key/value pair is sent. To detect unchecked state server-side, either use a hidden input with the same name and a false value, or check for the absence of the checkbox key.
Related Tools
HTML Radio Button Generator
Generate HTML radio button groups with configurable options, name, id prefix, fieldset legend, and checked/disabled states.
HTML Button Generator
Generate HTML button elements with type, id, class, style, onclick, disabled, aria-label, and other attributes. Preview included.
HTML Number Input Generator
Generate HTML number input elements with min, max, step, placeholder, value, label, and other attributes. Includes live preview.
HTML Progress Bar Generator
Generate HTML progress bar elements with value, max, label, id, class, and style attributes. Includes live preview.
HTML Link Generator
Generate HTML anchor tags with href, target, rel, title, download, and other attributes. Copy ready-to-use link code instantly.
HTML Color Input Generator
Generate HTML <input type="color"> code with live preview. Customise id, name, default colour, label, and more.

