#webdev #forms #nocode #tutorial
Free Contact Form for Your Website (No Backend Needed)
Raymond Busuttil · Aug 18 · 10 min read

If you want a free contact form for your website but do not want to build or rent a server, you are in the right place. A static site can look finished and still have no way to receive a message, because a plain HTML form has nowhere to send its data. This guide explains why that is, compares the realistic ways to fix it, and then walks through setting up a working form in AI Code Zero with the Web3Forms extension, so visitor messages land in your inbox.
In short
- A static website cannot process a form on its own. Something else has to receive the submission and email it to you.
- A form-to-email service is the simplest fix: your form posts to the service, and the service emails you. No server of your own.
- In AI Code Zero, you paste one access key into Settings → Extensions → Web3Forms, then ask the AI for "a contact form". It wires everything up.
- The key is safe to sit in your page code because it can only send email to your own address.
- Forms work in the live preview, so you can send a test message before you publish.
Why can't a static website handle a contact form by itself?
A static website is a set of files: HTML, CSS, JavaScript and images. A web server hands those files to the visitor's browser and does nothing else. When a visitor fills in a form and presses Send, the browser packages the fields and sends them to a web address. If that address is just another static file, nobody is listening. The data goes nowhere.
To actually receive a message, some program has to accept the data, check it, and do something with it, usually send an email. That program is the "backend". Traditionally you would write it yourself, host it, keep it patched and deal with spam. For a small site that is a lot of work for one email.
That is also why a site built entirely from files, such as the single HTML files and ZIP exports AI Code Zero produces, needs a little outside help to take messages. The good news is that the help is tiny, and often free.
What are your options for a contact form without a backend?
There are three broad approaches. Each has trade-offs.
1. A mailto link
The simplest option is a link that opens the visitor's email app with your address filled in. It costs nothing and needs no service. The downsides are real, though: it only works if the visitor has an email app configured, it hands your address to every spam scraper that reads the page, and you cannot control the layout of the message you receive.
2. Your own server
If you already run a server, you can write a small script to accept the form and send mail. This gives you total control, and it also makes you responsible for spam filtering, deliverability and security updates. It is rarely worth it for a brochure site.
3. A form-to-email service
A hosted service gives you an endpoint to post your form to. It receives each submission and emails it to you. You keep your static site, and the service handles delivery. Several services work this way, and many have a free plan. AI Code Zero has a built-in extension for one of them, Web3Forms, which is what the rest of this guide uses.
| Approach | Setup effort | Cost | Main drawback |
|---|---|---|---|
| mailto link | Almost none | Free | Depends on the visitor's email app; exposes your address |
| Own server | High | Hosting and your time | You maintain it and fight spam |
| Form-to-email service | Low | Often a free plan | Relies on a third-party service |
How do you get a Web3Forms access key?
Web3Forms identifies your form with an access key, a 36-character code. Getting one takes under a minute:
- Go to web3forms.com and enter the email address where you want to receive messages.
- Web3Forms emails you the access key.
- Keep that email handy. You will paste the key into AI Code Zero in the next step.
Web3Forms has a free plan. As with any outside service, check its current limits and terms on its own site, since they belong to Web3Forms and not to AI Code Zero.
How do you add a contact form in AI Code Zero?
AI Code Zero connects to outside services through extensions. Once an extension is on, the AI uses it whenever it builds or changes a project. You do not paste code anywhere.
- Open Settings, then the Extensions tab, and click the Web3Forms card.
- Click the switch next to Enable Web3Forms.
- Paste your access key into the Access key box. A green message starting with Connected. means it looks right. Changes save on their own.
- Close Settings, open or start a project in the Website studio or App studio, and ask for what you want:
Add a contact page with a form that has name, email and message fields and a clear Send button. Show a friendly thank-you message after it sends, and an error message if it fails.
The AI builds the form, connects it to Web3Forms with your key, and shows the visitor on the page whether sending worked. If you are new to describing what you want, our guide to writing prompts for an AI app builder covers the patterns that give better first drafts.
Prefer not to install anything yet? AI Code Zero also runs in your browser at web.aicodezero.com, with no download.
Can you test the form before you publish?
Yes. Forms work in the live preview, so a test entry lands in your real inbox straight away. Fill in the form inside the preview, press Send, and check your email. If nothing arrives, look in your spam folder first, then confirm that the key in the Web3Forms card still shows Connected.
Testing before you go live is worth the minute it takes. Check three things: that the message arrives with every field in it, that the thank-you message appears for the visitor, and that the form behaves sensibly on a phone-sized preview.
Is it safe to put the access key in your page?
It is a fair question, because secrets in page code are usually a bad idea. A Web3Forms access key is different by design: it can only send email to the address you registered, so there is nothing to steal beyond the ability to send a message to you. That is why the key is written into your pages and into anything you publish or export.
The same is not true of every key you will meet. Your AI provider key, for example, never goes into your projects or exports. AI Code Zero keeps it in your computer's keychain in the desktop app, or in your browser in the web version. Our guide to bringing your own API key explains the difference in more detail.
How do you keep spam out of a contact form?
Any public form attracts bots. A few habits keep the noise down:
- Add a honeypot field. This is a form field hidden from real visitors with CSS. People never see it, so they never fill it in, but simple bots fill in everything. A submission with the hidden field filled can be ignored. Many form services support this approach, and you can ask the AI to add a hidden spam-trap field to your form.
- Keep the form short. Fewer fields mean fewer places for junk and a better experience for real people.
- Do not publish your email address in plain text next to the form. If the form is your front door, scrapers have nothing else to harvest.
- Check your form service's own settings. Most dashboards offer extra filtering. Look at what your plan includes.
What should a good contact form include?
Most contact forms fail because they ask too much or promise nothing. A strong small-business form usually has:
- Name, email and message. That is enough for most sites. Add a phone number only if you really call people back.
- A clear label on the button. "Send message" beats "Submit".
- A response expectation. A line such as "We usually reply within two working days" sets honest expectations. Only write one you can keep.
- A visible success state. Visitors need to know the message went through, or they will send it three times.
- Accessible labels. Each field should have a visible label, not just placeholder text that disappears.
You can ask for any of these in plain English, then refine. Because every change in AI Code Zero is saved as a version, you can undo an experiment that does not look right.
How do you add the form to a project you already built?
Extensions do not change existing projects on their own. To add Web3Forms to a project you have already built:
- Open the project, then click Settings, Extensions and the Web3Forms card.
- Under Prompts to try, click Copy next to a request.
- Close Settings, paste the request into the chat and send it.
Do the same if you ever change your access key. The connectors documentation lists every extension and where each value comes from.
What else can you add beyond a contact form?
A form is often only the first extension a site needs. The same Settings page connects several others, and the AI uses them the same way:
- Umami and Plausible count visitors without cookies. Umami has a free plan and can be self-hosted. Plausible is paid, with a free trial.
- tawk.to adds a live chat bubble in the corner of your pages, so visitors can message you and you can reply from its dashboard or phone app.
- Google Sheets Backend (beta) saves things like RSVPs, votes and scores in your own Google Sheet, which suits event pages and simple polls.
- Square adds buy, pay and donate buttons that open a payment link you create in Square. Square charges a fee on each payment, so read its terms first.
Browse the full list on the AI Code Zero extensions page. If you are putting together a whole site for a local business, our small business website plan shows where a contact form fits among the other pieces.
What happens after the form works?
Once your messages arrive, the last step is putting the site online so visitors can use the form. AI Code Zero can publish to a free surge.sh address with HTTPS, or to your own domain (a beta feature). Our walkthrough on publishing a website for free covers the options. After publishing, send yourself one more test from the live address, since that is the version your visitors will use.
Frequently asked questions
Can a static website have a contact form?
Yes, as long as the form posts to something that can receive it. A form-to-email service gives you that endpoint, so the site itself can stay as plain files.
Do I need to know how to code to add a contact form?
No. In AI Code Zero you connect the extension once and then describe the form in plain English. The AI writes the HTML, CSS and JavaScript, and you can still read and edit that code if you want to.
Where do the messages go?
They are emailed to the address you entered at Web3Forms when you requested your access key. If you want them somewhere else, request a key for a different address and paste that key into the extension.
Will the form work after I export or publish the project?
Yes. The access key is a public value meant for page code, so it travels with your exported files and published site. Your AI provider key does not, because AI Code Zero never writes it into projects.
Build your own contact form in AI Code Zero
AI Code Zero is a free, open-source AI app and website builder. There is no AI Code Zero account, subscription or credit card. You connect your own AI provider key and pay that provider directly.
Download AI Code Zero for Windows (Microsoft Store) or Linux (.AppImage or .deb). Mac users can install it in one click through Pinokio, with a step-by-step guide on the Mac install page. Or skip the install and try it in your browser at web.aicodezero.com. Connect Web3Forms, ask for a contact page, and send yourself the first test message.