Skip to main content

SF-0158 · Concept · Easy

What is web-to-lead in salesforce?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

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

  1. Setup → Web-to-Lead — enable the feature and pick a default lead creator (the user who’ll own the record metadata).
  2. Generate HTML — pick the fields you want on the form. Salesforce returns a complete <form> with hidden oid (org Id) and retURL (return URL after submit) fields.
  3. Paste on your site — host the form anywhere; the action attribute already points at Salesforce.
  4. Submission — visitor submits, Salesforce ingests the POST and creates a Lead.
  5. 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

MechanismTrigger
Lead Assignment RulesRoute to the right owner / queue
Auto-Response RulesSend the visitor a “thanks, we got your enquiry” email
Flow / WorkflowScore, route, sync to a marketing platform
Lead conversionOnce 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.