Fix errors & stop spam
Is it safe to put a form endpoint or access key in public HTML?
By the FormToMail team · Checked against official sources · Updated
Yes, form endpoint URLs and public form keys (like Web3Forms' `access_key`) are designed to sit in your HTML: they can only deliver submissions to you, not send email to anyone else. What must never be in front-end code is a real email API key (Resend, SendGrid, SES), because that lets anyone send any email from your account.
| Thing | Public OK? | Why |
|---|---|---|
| Form endpoint URL (FormToMail, Formspree) | Yes | Only delivers to the form owner |
| Web3Forms access_key | Yes (by design) | Same: tied to your inbox |
| FormToMail dashboard link | No | Lets someone read your submissions |
| Email API key (Resend, SendGrid, SES) | Never | Can send arbitrary email as you |
How abuse is limited
- Fixed recipient per endpoint.
- Spam filtering and rate limits per IP.
- Monthly submission limits.
- Optional Turnstile so only real browsers can submit.
Quick answers
How do i hide my form access key in a public html file?
You can't fully hide anything in HTML, and you don't need to for a form key. Keep real email API keys on a server.
Is it safe to put a form api key in frontend code?
A form endpoint key, yes. An email provider API key, no.
How do I rate limit a contact form?
Do it on the server: FormToMail limits submissions per IP and per month automatically.
What to do next
Get an endpoint that's safe to paste into public HTML.
Get your form endpointSources
Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.