Hook the submit event
Listen for 'submit' on the form, call e.preventDefault(), then send a fetch() POST with the FormData. splitforms returns JSON, so you can branch on success/error.
Form template · Basic contact form
A JavaScript contact form that submits in the background, shows success inline, and never reloads the page. ~30 lines of vanilla code.
Every template is free and fully editable in the drag-drop builder — swap fields, colors, and the button label before you publish.
No server, API route, or SDK — your JavaScript Contact Form posts straight to one endpoint.
Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it reaches you.
It's plain HTML you own — paste the JavaScript Contact Form snippet, swap in your access key, and ship.
Copy and ship
HTML by default — the same field set also renders as React, Next.js, PHP, and cURL in your dashboard. Every variant posts to the same /api/submit endpoint. Replace YOUR_ACCESS_KEY with the key from your dashboard; that's the only edit.
<form action="https://splitforms.com/api/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<input type="hidden" name="subject" value="New contact form submission">
<label for="name">Full name *</label>
<input id="name" type="text" name="name" placeholder="Jane Builder" required>
<label for="email">Email *</label>
<input id="email" type="email" name="email" placeholder="jane@example.com" required>
<label for="phone">Phone *</label>
<input id="phone" type="tel" name="phone" placeholder="+1 415 555 0142" required>
<label for="message">Message *</label>
<textarea id="message" name="message" placeholder="How can we help?" required></textarea>
<!-- honeypot — bots fill every field -->
<input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form><p class="splitforms-attribution" style="margin-top:12px;font-size:11px;color:#888;text-align:right">
Powered by <a href="https://splitforms.com" style="color:#888;text-decoration:none" target="_blank" rel="sponsored noopener">splitforms</a>
</p>How to add it
To add a JavaScript Contact Form to your site you need three things: a free splitforms access key, the HTML snippet above, and your key pasted into it. No backend, database, or CAPTCHA library — the form posts to one URL and every submission lands in your inbox and dashboard.
Listen for 'submit' on the form, call e.preventDefault(), then send a fetch() POST with the FormData. splitforms returns JSON, so you can branch on success/error.
On success, hide the form and show a thank-you message. On error, surface the error message inline so the user can retry without losing their input.
You already get HTML5 required attributes for free. Add custom validation in the submit handler if you want regex-based email checks or business-logic gates.
What's included
The traditional HTML form posts and reloads the page — you lose scroll position, animations replay, and the user gets the jarring 'Thanks!' page. AJAX submission with the Fetch API is two extra event listeners — one to preventDefault on submit and one to render the success state. We give you the snippet.

Where submissions go
Reply-to is wired to the visitor's email, so one tap on Reply answers them directly — while the built-in honeypot and spam classifier filter out bots before they reach you. Every submission is emailed to your inbox and can forward to a webhook or Slack the moment a visitor hits send.

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

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

We instantly capture and organize every submission in your inbox.

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

No credit card required. Set up in under 60 seconds.
Connect & automate
SplitForms works with the destinations you route to and the platforms you build on — from Slack and Sheets to WordPress, Shopify, and Next.js.

Trusted by indie teams and agencies shipping forms worldwide
Testimonials
40 quotes on record — from indie hacks to agency migrations.
“I replaced a Lambda + DynamoDB + SES contact form with six lines of HTML. It took eleven minutes, and the dashboard is better than what I was going to build.”
“We migrated 14 client sites off Formspree in a single weekend. The price is a third of what we paid, the API is more honest, and the spam filter actually works.”
“The webhook payload is signed, idempotent, and well-shaped. It reads like code from a competent team, not a CRUD app held together with duct tape.”
“I stopped reaching for Typeform on small marketing sites. splitforms covers 90% of the use case at none of the bloat.”
“I onboarded our whole agency in an afternoon. The MCP integration meant Cursor literally dropped the form straight into our client repos for us.”
“The free plan gave me 500 submissions before I paid a cent, and Pro is five dollars a month. I've spent more on coffee deciding which backend to use.”
“Spam went from forty junk entries a day to zero, with no reCAPTCHA puzzle ruining the form. The honeypot and time-trap just quietly do their job.”
“Point the form action at one endpoint and you're done. No SDK, no client library, no build step. This is how a form backend should feel.”
“Leads land in Slack the second someone submits, and a copy goes to Google Sheets for the sales team. I wired both up in under ten minutes.”
“I run a static Hugo site on a five-dollar VPS. splitforms gave it a real contact form without me standing up a single server.”
Questions
No. fetch() and FormData are available in every browser since 2017. The example is ~30 lines of vanilla JavaScript with no dependencies.
splitforms returns JSON: { success: true, message: 'Submission received.' } or on error a 4xx/5xx with { success: false, message: '...' }. Branch on response.json().
For text-only forms it's instant — no progress bar needed. For file uploads, fetch supports XHR-based progress events; we ship a Pro example with an upload progress bar.
No — keep the form's action and method attributes. If JS fails to load, the form submits the old-fashioned way to splitforms and the user lands on a thank-you page. Progressive enhancement, not progressive degradation.
Simple pricing
Choose a plan that fits your workflow — from a free form endpoint to full automations, exports, and higher submission limits.
Free forever
For side projects and indie devs.
For agencies and growing products.
Pay $59. 3 years sorted.
No credit card required on Free • Cancel anytime