splitforms.com
guide · form types

Contact Form HTML — Copy-Paste Working Code

Drop-in HTML contact form with the backend already wired up. Name, email, message, honeypot — the four fields every contact form needs. POSTs to splitforms (free for 1,000 submissions/month) so you skip the PHP runtime, SMTP setup, and spam filter.

html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="redirect"   value="https://yoursite.com/thanks" />

  <label>Name<input name="name" required /></label>
  <label>Email<input name="email" type="email" required /></label>
  <label>Message<textarea name="message" required></textarea></label>

  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" />
  <button type="submit">Send</button>
</form>

The contact form is the most common form on the web — and the one most tutorials still get wrong. The HTML itself is simple (six lines), but the backend that receives the submission is where things break: PHP mail() is dead on modern static hosts, SMTP setup is hours of work, and spam filters are a maintenance burden.

The snippet above uses splitforms as the backend. The form POSTs to `/api/submit`, splitforms emails you the submission within seconds, the dashboard stores it permanently, and webhooks fire in parallel. No server, no SMTP credentials, no spam plugin to install. Free for 1,000 submissions per month, no credit card.

Styling is intentionally absent so you can match your brand. Wrap each input in a `<label>`, use the `placeholder` attribute for visual hint text, and style via CSS, Tailwind, or whichever system you use. The form is unopinionated about visual design — it only opinionates on semantics and submission mechanics.

For production use, add a hidden `_subject` field to customize the email subject, a hidden `redirect` field to send users to your custom thank-you page, and a CSS-hidden `botcheck` honeypot to catch bots that the AI classifier misses. The complete production-ready version is in the registration form guide above with the same pattern.

How to set this up

Step 01

Paste the HTML

Drop into any page on any platform — static HTML, React, Astro, WordPress, Webflow.

Step 02

Get a free access key

Sign up at splitforms.com — no credit card required. Your access key is created instantly.

Step 03

Submit a test

Fill in the form on your live site. Email arrives within seconds. Dashboard shows the submission.

Step 04

(Optional) Style with CSS

Add Tailwind classes, Bootstrap classes, or your own CSS. The HTML is unstyled by design.

Six lines of HTML, real backend, real inbox.

Frequently asked questions

How do I make a contact form in HTML?

Use a <form action="https://splitforms.com/api/submit" method="POST"> wrapping inputs for name, email, and message, plus a hidden access_key. Submissions go to splitforms; splitforms emails you. No server code required.

Is this contact form free?

Yes — 1,000 submissions per month free with no credit card. Unlimited forms, full dashboard, signed webhooks, AI spam filtering all included on the free plan.

How do I send the contact form to my email?

splitforms sends an email to the address on your splitforms account whenever a visitor submits. To add additional recipients, configure CC/BCC in the dashboard or use hidden _replyto inputs in the form.

Can I add CSS to the contact form?

Yes. The HTML is unstyled by design. Add Tailwind, Bootstrap, or plain CSS — the form's submission logic doesn't depend on styling.

How does spam protection work?

splitforms runs every submission through an AI classifier on top of the honeypot field. Recognized spam is routed to a separate dashboard folder; legitimate submissions reach your inbox.

Related guides

HTML forms

HTML Form — How to Build and Submit Forms in HTML

HTML forms

Free HTML Form Templates — Copy-Paste Ready (2026)

Ship the form, not the backend.

Free for 1,000 submissions/month. Email delivery, AI spam filtering, signed webhooks, real dashboard — all on the free plan. No credit card.

Get a free access key →