splitforms.com

HTML · FORM CONTROL

HTML Checkbox — toggle and multi-select (live demo)

A checkbox is an <input type="checkbox"> that lets a user turn a single option on or off, or pick several options from a group (each with its own name). When checked, its value is submitted; when unchecked, nothing is sent for it at all. Below is a working form with checkboxes.

  • 500 free / mo
  • No backend
  • Copy-paste ready
HTML Checkbox — copy-paste HTML form code that actually submits

Copy-paste ready

The HTML Checkbox example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html checkbox form posts to one endpoint. No server, PHP, or API route — submissions land in your inbox and a searchable dashboard.

A form that really submits

Unlike a static reference snippet, this <input type="checkbox"> form actually sends data to a free splitforms backend, with spam filtering built in.

Copy-paste code

HTML Checkbox code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
checkbox.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

  <fieldset>
    <legend>I'm interested in (tick all that apply)</legend>
    <label><input type="checkbox" name="interest" value="newsletter"> Newsletter</label>
    <label><input type="checkbox" name="interest" value="beta"> Beta access</label>
    <label><input type="checkbox" name="interest" value="demo"> Product demo</label>
  </fieldset>

  <label><input type="checkbox" name="agree_terms" value="yes" required> I agree to the terms</label>

  <button type="submit">Send</button>
</form>

How it works

How to add HTML Checkbox to any page.

Copy the html checkbox example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Checkbox example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

The <input type="checkbox"> element

Which HTML Checkbox attributes matter?

The <input type="checkbox"> element takes a handful of attributes — these decide how your form behaves and what actually gets emailed to your inbox when someone submits.

  • name — The key the value is submitted under. Checkboxes in a multi-select group can share a name to submit an array.
  • value — What's sent when the box is checked. Without it, the browser submits the literal "on".
  • checked — Boolean. Pre-checks the box when the page loads.
  • required — Boolean. Forces the box to be checked before the form can submit (useful for "I agree" consent).
  • disabled — Greys out the box and excludes it from submission.
HTML Checkbox attributes reference

Common mistakes

HTML Checkbox not working? Here's why.

Most broken forms come down to a few small mistakes with the <input type="checkbox"> element. Check these before you ship — then forward every submission to Slack or a webhook.

  • Unchecked = not submitted — If a checkbox is unchecked, its name is absent from the submission entirely — not sent as false. Detect this server-side as "key missing".
  • Without value, you get "on" — A checked checkbox with no value= submits the string "on". Always set a meaningful value so you can tell states apart.
  • Checkbox vs radio — Checkboxes are independent (tick any number); radios in a group are mutually exclusive (pick one). Use radios when exactly one choice is allowed.
Common html checkbox mistakes to avoid

How SplitForms works

From form to workflow in 3 simple steps.

Connect your form, collect every submission, and send data where it needs to go — without building backend infrastructure.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Connect your favorite tools and automate everything

SplitForms works with the destinations you route to and the platforms you build on — from Slack and Sheets to WordPress, Shopify, and Next.js.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more

Trusted by indie teams and agencies shipping forms worldwide

PETAL/COKRAFT.DELINEAR-XBUILD.DEVSTUDIO 71MERIDIANFRAME&CO

Testimonials

Loved by developers shipping at every scale.

40 quotes on record — from indie hacks to agency migrations.

Questions

HTML Checkbox questions, answered.

View all FAQs
How do I create a checkbox in HTML?

Use <input type="checkbox" name="agree" value="yes">, wrapped in a <label> so the text is clickable. Add checked to pre-tick it, and required to force it on (common for consent).

What value does a checkbox submit?

When checked, it submits its value= attribute. If value= is missing it submits "on". When unchecked, nothing is submitted for that name at all.

How do I let users select multiple options?

Give each checkbox the same name (e.g. name="interest") and a different value. The form then submits multiple values under that name — an array on the server side.

How do I pre-check a checkbox?

Add the checked attribute: <input type="checkbox" name="news" value="yes" checked>. It will be ticked when the page loads.

Why doesn't my unchecked checkbox submit anything?

By design — an unchecked checkbox is not included in the form data. Treat the absence of the key as the unchecked state in your backend, rather than expecting a false value.

Simple pricing

Start free. Scale when you need more.

Choose a plan that fits your workflow — from a free form endpoint to full automations, exports, and higher submission limits.

Free

$0

Free forever

 
Best for testing

For side projects and indie devs.

  • 500 submissions / mo
  • Unlimited forms
  • Email notifications included
  • Honeypot spam filtering
  • Submissions dashboard
  • MCP setup stays free
  • No credit card required

3-Year

$59/ 36 months
was $99 · save 40% · new-user price

Pay $59. 3 years sorted.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • Renews every 3 years
  • Long-term discount
  • Priority support included
  • Vote on the roadmap

No credit card required on Free • Cancel anytime