Web-to-Lead is a built-in Salesforce feature that captures form submissions from your website and creates Lead records, with no Apex or middleware required. Setup hands you an HTML snippet to paste into your site; submissions land in Salesforce within seconds.
How it works
- Setup → Web-to-Lead — enable the feature and pick a default lead creator (the user who’ll own the record metadata).
- Generate HTML — pick the fields you want on the form. Salesforce returns a complete
<form>with hiddenoid(org Id) andretURL(return URL after submit) fields. - Paste on your site — host the form anywhere; the action attribute already points at Salesforce.
- Submission — visitor submits, Salesforce ingests the POST and creates a Lead.
- Follow-up — auto-assignment rules route the Lead, auto-response rules send the visitor a confirmation email.
What the generated HTML looks like
<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type="hidden" name="oid" value="00Dxxxxxxxxxxxx">
<input type="hidden" name="retURL" value="https://www.example.com/thank-you">
<label>First Name <input type="text" name="first_name"></label>
<label>Last Name <input type="text" name="last_name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Company <input type="text" name="company" required></label>
<input type="submit" value="Submit">
</form>
oid is your org’s 15-character Id — required for Salesforce to know which org receives the lead. retURL is where the visitor goes after submit.
Limits worth knowing
- 500 leads per day captured via Web-to-Lead (per org, across all forms).
- Submissions over the cap are queued and emailed to the default lead creator instead.
- Web-to-Lead does not run validation rules — but assignment rules, auto-response rules, and workflow/flow do trigger.
- reCAPTCHA can (and should) be enabled via the Setup wizard to block bots.
Spam protection
The default form has no spam protection — turn on reCAPTCHA in the Web-to-Lead settings before going live. Without it, you’ll get hundreds of garbage leads per day.
What flows from a captured Lead
| Mechanism | Trigger |
|---|---|
| Lead Assignment Rules | Route to the right owner / queue |
| Auto-Response Rules | Send the visitor a “thanks, we got your enquiry” email |
| Flow / Workflow | Score, route, sync to a marketing platform |
| Lead conversion | Once qualified, convert to Account + Contact + Opportunity |
When Web-to-Lead isn’t the right answer
- Need attachments → use Web-to-Case instead (or a custom form)
- Need server-side validation before insert → use a custom REST endpoint
- Need full marketing automation → use Pardot / Marketing Cloud forms
Common follow-ups
- Daily limit? — 500 leads per 24 hours.
- Where do over-limit leads go? — Held in a queue, the daily limit creator gets an email.
- Can I have multiple forms? — Yes — different field selections, same
oid.
Verified against: Salesforce Help — Web-to-Lead. Last reviewed 2026-05-17 for Spring ‘26.