What is web-to-lead in Salesforce?
Web-to-Lead is Salesforce's built-in way to turn a website form into Lead records. An admin turns it on in Setup, chooses which lead fields the form should include, sets a return URL, and Salesforce generates a block of HTML. When a visitor submits that form, the data is posted to Salesforce with your org ID in a hidden field, and a new lead appears.
It's the simplest form of lead capture into Salesforce and needs no extra software. It also sits outside your analytics, so plan it alongside your events, as in our GA4 setup guide and our conversion tracking guide.
Why does web-to-lead matter for a marketing website?
It matters because the web to lead form is often the only bridge between your site and your sales team, and it can break without anyone noticing. Salesforce sends the visitor to your return URL whether or not a lead was created, so the thank-you page looks fine even when the record failed.
Salesforce also applies a daily limit to Web-to-Lead submissions and describes in its Help docs how it treats requests over it. The figure can change, so check the current Salesforce Help article for your edition. Bots submit forms too, and junk counts against the same limit.
How does web-to-lead compare with form tools and API integrations?
Web-to-Lead is the cheapest route and the least visible one. Form tools add a submission history, and an API integration adds validation and real error handling.
Approach | How it works | If a write fails | Best for |
|---|---|---|---|
Web-to-Lead | Form posts straight to Salesforce | Nobody is told | Simple contact forms |
Form tool or automation | Form saves, then a tool creates the lead | Run history and alerts | Teams without a developer |
Salesforce API from a function | Your code validates, then writes the lead | Logged, retried, alerted | Demo and sales forms |
HubSpot forms with sync | HubSpot captures, then syncs to Salesforce | Visible in sync errors | Teams already on HubSpot |
If your team works in HubSpot, the form usually belongs there first, as our HubSpot integration page explains. For Webflow and Framer setup, read our guide to sending website forms to Salesforce.
What does a web-to-lead setup look like in practice?
A working setup is a form whose field names match Salesforce exactly, hidden attribution inputs, a return URL to a real thank-you page, and someone who checks the new lead after every change.
Hypothetical example: a contact form on a startup site
For example, suppose a startup's Webflow contact form has name, work email and company, plus hidden inputs for utm_source, utm_medium and utm_campaign. Custom fields appear in Salesforce's generated code under their field IDs, so the developer copies those IDs into the inputs.
The form posts to the Salesforce URL, the return URL goes to /thank-you, and reCAPTCHA is on. Before launch, someone submits from a tagged link and opens the new lead to check every field.
What are the common web-to-lead mistakes?
Most problems come from trusting the redirect and from forms that drift away from Salesforce over time.
- Testing only the thank-you page. Open the lead in Salesforce, or you haven't tested anything.
- Renamed fields. Someone rebuilds the form, renames an input, and that data stops arriving.
- Picklist mismatches. A value missing from the Salesforce picklist can stop the lead being created.
- No attribution fields. Salesforce doesn't read your URL, so unsent UTMs are lost. Our tracking plan template lists what to capture.
- No zero-leads alert. Set one, so a broken form is noticed within a day.
Site moves are when these mistakes appear, so our guide to migrating forms without losing leads retests every form. For a team that owns forms and the Salesforce mapping monthly, see our design retainer or Salesforce integration page.
