How to Add a Contact Form to a Static HTML Page (No Backend)

A contact form seems like it should be simple, and the HTML part is. The catch is what happens when someone hits Send: a static site has no server to receive the message, save it, or email it to you. The good news is you don't need to build one — a form-handling service does that job, and your page stays a single static file.

Why a plain form doesn't work by itself

An HTML <form> collects input and sends it somewhere when submitted. That "somewhere" is the action URL — normally a server endpoint that reads the data. On a static host there is no such endpoint, so a raw form has nowhere to send anything. You need to point the form at a service that receives submissions on your behalf.

The approach: a form backend service

Services like Formspree, Web3Forms, Basin and Getform exist for exactly this. You sign up, get a unique URL, and set it as your form's action. When someone submits, the service captures the data and emails it to you (or forwards it to a spreadsheet, Slack, etc.). Your page never stops being static.

Step by step with Formspree

  1. Create a free account and a new form; it gives you an endpoint like https://formspree.io/f/abc123.
  2. Point your form at it and make sure every field has a name:
<form action="https://formspree.io/f/abc123" method="POST">
  <input type="email" name="email" placeholder="Your email" required>
  <textarea name="message" placeholder="Your message" required></textarea>
  <button type="submit">Send</button>
</form>
  1. Deploy the page (on hdply, paste the HTML and save), submit a test message, and confirm the first submission — most services ask you to verify your email once.

Keeping out spam

Public forms attract bots. Two easy defenses: enable the service's built-in spam filter or CAPTCHA, and add a hidden "honeypot" field that humans never fill in but bots do — if it arrives filled, discard the submission. Most form services support both with a checkbox.

A note on limits

Free tiers cap monthly submissions (often 50–100). For a personal contact page that's plenty; for something busier, the paid tiers are inexpensive. The point stands either way: you get a working contact form without running, securing or paying for a server.

Related: Deploy a website without a server · Build a one-page portfolio

From a file on your desktop to a live URL in under a minute.

Deploy your first page