send.webforms.toRead the docs →

Hosting and deploy platforms

Add a contact form to Vercel

Vercel will happily run a serverless function to handle your form, and it will also happily count every submission against your function invocations, cold-start it, and leave you to solve spam and email delivery yourself. Posting straight to a form endpoint skips all of that. Nothing to deploy, nothing to configure, and it works the same on a Hobby project as on Enterprise.

Get an endpointRead the docs

Setup

  1. Create a form and copy the endpoint

    Nothing to add to your Vercel project settings.

  2. Point your form at it

    Client-side fetch or a native POST: both work regardless of framework.

  3. Optionally set the endpoint per environment

    Add a NEXT_PUBLIC_ variable in Vercel if you want preview deploys to use a separate form from production.

Vercel examples

Swap in your own endpoint and these run as-is.

No API route, no function invocation.

app/contact/page.tsx
export default function ContactPage() {
  return (
    <form action={process.env.NEXT_PUBLIC_FORM_ENDPOINT} method="POST">
      <input name="name" required />
      <input name="email" type="email" required />
      <textarea name="message" required />
      <input type="hidden" name="_next" value="https://example.com/thanks" />
      <button type="submit">Send</button>
    </form>
  );
}

Set per environment in Project Settings so previews do not pollute your production inbox.

Environment variables
# Production
NEXT_PUBLIC_FORM_ENDPOINT=https://send.webforms.to/wft_your_key

# Preview - point at a second form so test submissions stay separate
NEXT_PUBLIC_FORM_ENDPOINT=https://send.webforms.to/wft_your_preview_key

Worth knowing

Vercel form FAQ

No. The browser posts directly to the endpoint, so there is no function to write, deploy, cold-start or pay for.

Where Vercel submissions can go

The guide above gets the submission to your endpoint. From there it can land anywhere: one destination on Free, several on Pro.

Need the form markup too? The template gallery has complete forms for contact, waitlist, job application and more, and the form generator builds one field by field.

Ready to wire up your Vercel form?

Free for 300 submissions a month. Endpoint in under a minute, no card required.

Start free