splitforms.com

HTML contact form

Free HTML contact form code.

Updated · plan facts checked against /pricing

An HTML contact form is a <form> whose action points at a backend URL. Set it to https://splitforms.com/api/submit, add a hidden access_key, and every submission is spam-filtered, stored and emailed to you — no PHP or server code, 500 free submissions in total. Want the shortest route to a working Contact page? See the free website contact form.

  • 500 free total
  • No PHP backend
  • JavaScript optional
Copy-paste HTML contact form code posting to the splitforms endpoint

No backend needed

No PHP, Node, or server route of your own — the splitforms endpoint is the backend for your HTML contact form.

Spam filtered

A honeypot, time-trap, and rate limits screen bots out of every HTML form submission before your inbox.

Owner notification email

Accepted submissions are saved to the searchable dashboard before owner notification email is attempted. Delivery time and inbox placement depend on provider and recipient settings.

Copy-paste HTML

HTML contact form code, ready to paste.

Paste this HTML contact form into any page, point the action at the endpoint, and replace YOUR_ACCESS_KEY with the key from your dashboard. That's the whole integration — no server, no build step. Need more variations (dark mode, multi-column, file upload)? See the HTML contact form template collection.

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

  <!-- Optional: redirect after submit -->
  <input type="hidden" name="redirect" value="https://yoursite.com/thank-you">

  <!-- Name field -->
  <label for="name">Name</label>
  <input type="text" id="name" name="name" placeholder="Your name" required>

  <!-- Email field -->
  <label for="email">Email</label>
  <input type="email" id="email" name="email" placeholder="you@example.com" required>

  <!-- Message field -->
  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" placeholder="Your message" required></textarea>

  <!-- Honeypot spam protection (bots fill this, humans don't see it) -->
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">

  <!-- Time trap: posts sent under 2 seconds after page load are dropped -->
  <input type="hidden" name="form_loaded_at" value="">
  <script>document.currentScript.previousElementSibling.value = Date.now();</script>

  <!-- Submit button -->
  <button type="submit">Send Message</button>
</form>

Setup

How to add a contact form to any HTML page.

Three steps, about a minute. Sign up for a free access key, paste the form, and watch submissions land in your dashboard within seconds.

Get your free access key

Sign up at splitforms.com/login with your email. Your free form API key is generated instantly — no credit card required. Free includes 500 submissions total.

Copy the contact form HTML

Copy the HTML contact form code below and paste it into any page on your website. Replace YOUR_ACCESS_KEY with the key from your dashboard.

Submit a test entry

Fill out the form and submit. The accepted submission is saved in your SplitForms dashboard before owner notification email is attempted. Delivery time and inbox placement depend on provider and recipient settings.

Line by line

What does each line of the contact form HTML do?

Seven parts, each with one job. The only one splitforms needs is the access key; everything else is ordinary HTML that any browser understands. See how the form action attribute works for the details of the first line.

  • action + method="POST": where the browser sends the fields
  • access_key: tells splitforms which form and inbox the post belongs to
  • redirect (optional): your own thank-you page instead of the hosted one
  • label for + id: ties each label to its input for screen readers
  • name: the key each value is saved under — inputs without one are not sent
  • botcheck + form_loaded_at: the honeypot and the 2-second time trap
  • type="email" + required: the browser checks the basics before sending
The parts of an HTML contact form: action, access key, labels, names and spam fields

What happens

What happens when someone submits your HTML contact form?

The moment a visitor hits Send, the browser's native POST hands the data to splitforms. From there it's received, filtered, stored, emailed, and — on paid plans — routed onward to your connected integrations, all without a server of your own.

  • Received at the endpoint via a standard HTML form POST
  • Spam filtered — honeypot, time-trap, content heuristics, rate limits
  • Stored in a searchable dashboard, exportable on paid plans
  • Owner notification email is attempted after the submission is saved; delivery varies by provider and recipient settings
  • Routed to Slack, Discord, Sheets, Notion, or a webhook on paid plans
An HTML form submission received, filtered, stored, emailed, and routed onward

Spam protection

How do you stop spam on an HTML contact form?

The pasted form already ships with a botcheck honeypot, and splitforms adds a time-trap, content heuristics, and rate limiting on every request. It all runs server-side, so you can keep the page entirely JavaScript-free — a working reCAPTCHA alternative with nothing for visitors to solve.

  • Honeypot field bots fill in but humans never see
  • form_loaded_at time-trap drops posts sent under 2 seconds after load
  • Rate limiting at 6 submissions per minute per IP, per form
  • Optional reCAPTCHA v2 or Turnstile with your own keys — not required
Spam bots blocked before an HTML contact form submission reaches your inbox

Customize

How do you customize an HTML contact form?

Every field name becomes a column in your dashboard, so adding fields is just adding inputs. Prefer a styled starting point? See the Tailwind CSS forms guide for a dark-mode-ready template with validation states.

  • Add fields — each name becomes a dashboard column
  • Redirect visitors to a thank-you page with a hidden redirect field
  • Set the notification email subject with a hidden subject field
  • Reply straight to the visitor with a hidden replyto field
  • Attach files with an <input type="file"> on paid plans
Customized HTML contact form fields shown as columns in the splitforms dashboard

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

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

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See payment forms →Need time slots? Online booking →

Setup guides for the stacks you use

Questions

HTML contact form questions.

View all FAQs
How do I create a contact form in HTML?

Create a <form> element, set the action attribute to a form backend endpoint like https://splitforms.com/api/submit, add a hidden input with your access key, then add your input fields (name, email, message) and a submit button. The form backend handles storage, email notifications, and spam filtering — no server-side code required.

Can I use an HTML contact form without a backend?

Yes. Point your form's action attribute at a hosted form backend like splitforms. The backend receives the POST request, stores the submission, sends you an email, and handles spam filtering. You don't need PHP, Node.js, Python, or any server-side code of your own.

Does the HTML contact form code work on static sites?

Yes. The form is a standard HTML form POST. It works on any static site host including GitHub Pages, Netlify, Vercel, Cloudflare Pages, Amazon S3, and any web server that can serve HTML files.

Do I need JavaScript for an HTML contact form?

No. The form uses native HTML form submission. The one-line script in the example only fills the form_loaded_at time-trap field; delete it and the form still works, the time trap simply does not run. JavaScript is otherwise optional, for custom validation or AJAX submission.

How do I protect my HTML contact form from spam?

The form above includes a botcheck honeypot (a hidden input bots fill in but people never see) and a form_loaded_at timestamp: posts sent less than 2 seconds after the page loaded are dropped. splitforms also runs server-side content scoring and rate limiting (6 submissions a minute and 20 per 15 minutes per IP, per form) on every request. reCAPTCHA v2 or Cloudflare Turnstile can be added with your own keys, but neither is required.

Is the HTML contact form code actually free?

Yes. The splitforms Free plan covers unlimited forms, 500 submissions total (a one-time allowance, not monthly), owner notification emails and spam filtering, with no credit card. Pro is $5/month for 5,000 submissions a month and adds exports, webhooks, integrations, auto-replies, CC/BCC recipients and file uploads.

Can I add a file upload field to my HTML contact form?

Yes — add <input type="file" name="attachment"> and enctype="multipart/form-data" on the form tag. File storage is on paid plans and supports up to 5 files per submission, 5 MB each; on Free the text fields are saved and files are dropped.

How do I get notified when someone submits the form?

Email notifications to the form owner are included free on every plan, including Free. You'll get an email with the submission details as soon as someone submits, no setup required beyond your access key.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08 per month, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions per month
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ