splitforms.com

Contact form · Express

Contact form for Node.js and Express

Add a working contact form to an Express app without Nodemailer, an SMTP account or a database. Serve a plain HTML form that posts straight to splitforms, or relay req.body from an Express route with fetch. Submissions are saved to your dashboard with spam filtering.

  • 500 free / month
  • One endpoint
  • No backend code
Express contact form — copy-paste code for splitforms

Key benefits

No backend code

No server, API route, or SDK. Your Express form posts straight to one endpoint.

Straight to your inbox

Every Express submission is emailed to you and saved in a searchable dashboard, with spam filtered out first.

Design without limits

It's your own Express markup and styles. Splitforms is only the backend, so nothing constrains how the form looks.

Copy-paste ready

Your Express contact form, ready to paste.

Replace YOUR_ACCESS_KEY with the key from your dashboard — that's the whole integration. No SDK to install, no build step, just the html you already write.

contact.html
<!-- public/contact.html (served by express.static("public")) -->
<!-- Posts straight to splitforms. No route, Nodemailer or SMTP needed. -->
<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" placeholder="Your name" required />

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

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="4" placeholder="Your message..." required></textarea>

  <!-- Honeypot for spam bots (hidden from real visitors) -->
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off" />

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

How to add it

How to add a contact form to a Express website.

To add a contact form to a Express website you need three things: a free splitforms access key, the html snippet above, and your key pasted into it. No backend, server, or SDK — the form posts to one URL and every submission lands in your inbox and dashboard.

  1. Get your free splitforms access key

    Sign up, verify your email and copy the access key you will paste into your Express form. No credit card required.

  2. Drop the Express snippet into your project

    Copy the Express code example into your project and replace YOUR_ACCESS_KEY with the key from step 1.

  3. Receive submissions in your dashboard

    Submissions arrive in the splitforms dashboard within seconds. Free includes owner email notification attempts; Pro adds Slack, Discord, Sheets, or any signed webhook URL.

Where submissions go

Where do your Express form submissions go?

Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it ever reaches you. Search, export to CSV, or forward it to a webhook or Slack on Pro.

  • 500 submissions a month, free to start
  • Honeypot + automatic spam scoring on every plan
  • Signed webhooks to Slack, Discord, your server
Express contact form submissions in the splitforms dashboard

No backend needed

Do you need a backend for a Express form? No.

Your Express form posts standard FormData to one URL. Splitforms validates the access key, runs its spam checks, and forwards it to your email — so there's no server, API route, or database for you to build or maintain.

  • Works from express.static, EJS, Pug or any view engine
  • No Nodemailer, SMTP credentials or database to configure
  • Honeypot field plus the built-in spam filter
How splitforms processes a Express form submission

Best practices

What a production-ready Express form needs.

What separates a Express form that works in a demo from one that holds up on launch day, most important first.

  • Store the access key in an environment variable when you relay through an Express route.
  • Register express.urlencoded() before the route that reads req.body.
  • Keep the hidden botcheck honeypot field and forward it unchanged when relaying.
Production-ready Express contact form best practices

Questions

Express contact form questions.

Anything missing? Email us, we read every message.

A person reading answers to common questions
How do I make a contact form in Express without Nodemailer?

Serve an HTML form whose action is https://splitforms.com/api/submit with a hidden access_key field. Each submission is saved in your splitforms dashboard and an email notification is attempted to the form owner, so you never configure SMTP.

Why is req.body empty in my Express contact form route?

Express needs a body parser. Add app.use(express.urlencoded({ extended: false })) before the route, and make sure every input has a name attribute.

Can I forward Express form data to splitforms with fetch or axios?

Yes. Build a form-encoded body from req.body plus access_key and POST it to https://splitforms.com/api/submit. Node 18 and later have a global fetch, so no extra package is needed.

Does the direct HTML form need an Express route at all?

No. The browser posts straight to splitforms, so Express only has to serve the page, for example with express.static. Add a route only when you want to validate or hide the access key.

req.body is undefined without a body parser

Express does not parse request bodies by default. Add app.use(express.urlencoded({ extended: false })) before your route so HTML form posts fill req.body; express.json() alone only handles JSON bodies.

Forward the honeypot unchanged

When you relay, pass botcheck through exactly as received. An unticked checkbox is not sent at all, so req.body.botcheck || "" keeps real submissions clean while bots that tick it are still flagged.

Show 1 more questions
Set a timeout on the outgoing request

Give the relay a timeout (for example AbortSignal.timeout(5000) with fetch, or the timeout option in axios) so a slow network does not leave the visitor's request hanging.

View all FAQs

Ship your Express contact form in 60 seconds.

Free for 500 submissions a month on your Express site. Pro at $5/mo adds Slack alerts, signed webhooks and file uploads when you need them.

  • No credit card required
  • 500 free submissions
  • Setup in minutes
Two people celebrating a working contact form