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 500 submissions/month) so you skip the PHP runtime, SMTP setup, and spam filter.
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 stores the submission in your dashboard, and can email you within seconds. Starter adds webhooks in parallel. No server, no SMTP credentials, no spam plugin to install. Free for 500 submissions per month and 2 forms; Starter is $1/month.
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
Paste the HTML
Drop into any page on any platform — static HTML, React, Astro, WordPress, Webflow.
Get a free access key
Sign up at splitforms.com — no credit card required. Your access key is created instantly.
Submit a test
Fill in the form on your live site. The dashboard shows the submission within seconds and can also email it.
(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 dashboard.
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; Free stores them in the dashboard and can email you. No server code required.
Is this contact form free?
Yes — 500 submissions per month and 2 forms are free with no credit card. The free plan includes the dashboard and AI spam filtering; signed webhooks, exports, integrations, and retained uploads unlock on Starter.
How do I send the contact form to my email?
Owner notification emails are included on every plan. splitforms sends an email to the address on your splitforms account whenever a visitor submits; paid plans can add advanced recipients and routing from the dashboard.
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 stay in your dashboard and can trigger owner email delivery on every plan.
Related guides
Ship the form, not the backend.
Free for 500 submissions/month. Owner email delivery, AI spam filtering, and a real dashboard are included on Free. Starter adds signed webhooks. No credit card.
Get a free access key →