splitforms.com

HTML · INPUT TYPE

HTML input type url: website fields that accept real links

Last reviewed

An <input type="url"> shows a URL keyboard on phones and only accepts an absolute URL with a scheme, like https://example.com. That means "example.com" fails, so say so in the placeholder or use type="text" and add https:// on the server. Add autocomplete="url", and always check the URL again on the server.

  • Live, editable example
  • Copy-paste snippet
  • Attributes & common mistakes
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Edit the HTML and re-run it
Runs in a sandbox. Nothing is sent.

Minimal snippet

url-input-example.html
<label for="website">Website</label>
<input type="url" id="website" name="website" autocomplete="url" placeholder="https://example.com">

Copy-paste code

HTML Input Type URL code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
input-type-url.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" autocomplete="name" required>

  <label for="email">Email</label>
  <input type="email" id="email" name="email" autocomplete="email" required>

  <label for="website">Website (starts with https://)</label>
  <input type="url" id="website" name="website" autocomplete="url"
         placeholder="https://example.com">

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5"></textarea>

  <!-- Honeypot: hidden from people, bots fill it in -->
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">

  <button type="submit">Send</button>
</form>

Key facts

How does a url input behave?

A url input blocks submit unless the value is an absolute URL with a scheme, so example.com fails and https://example.com passes. Any scheme passes, so it does not prove the link is safe.

How does a url input behave?
FactDetail
Mobile keyboardA URL keyboard, often with / and .com keys.
Built-in validationThe value must be an absolute URL with a scheme, or it fails with typeMismatch. example.com and www.example.com both fail.
Any scheme passesftp:, mailto: and javascript: URLs all pass, so the check does not prove the link is safe.
Submitted valueThe URL with outer spaces trimmed.
Empty fieldAn empty field passes unless you add required.
patternThe whole value must match. pattern="https://.*" forces https.

Sources: WHATWG HTML Standard: URL state (type=url) · MDN: <input type="url">

Attributes · <input type="url">

Which HTML Input Type URL attributes matter?

These attributes decide how the <input type="url"> behaves and what actually gets emailed to your inbox when someone submits.

HTML Input Type URL attributes and what each one does
AttributeWhat it doesDocs
nameThe key the URL is sent under, such as website. Without a name, the field is never sent.
requiredBlocks submit while the field is empty. An empty url field passes without it.MDN
patternA regular expression the whole value must match, such as https://.* to require https.MDN
placeholderAn example of the format, like https://example.com. It disappears on typing, so it is not a label.
autocompleteUse url so the browser can fill in a saved website address.MDN
maxlengthThe most characters allowed. Leave room for long links.MDN
minlengthThe fewest characters allowed when the field isn't empty.MDN

Common mistakes

HTML Input Type URL not working? Here's why.

Most broken forms come down to a few small mistakes with the <input type="url">. Check these before you ship, then forward every submission to Slack or a webhook.

  1. Visitors type "example.com" and get an error

    Most people leave out https://, and the browser rejects it. Say so in the label or placeholder, or use type="text" and add https:// on the server.

  2. javascript: URLs pass the browser check

    Any scheme is a valid URL, javascript: included. Never render a submitted URL as a link without checking the scheme is http or https on the server.

  3. A placeholder is not a label

    The placeholder disappears as soon as someone types. Add a <label> so screen readers and users always know what the field is for.

  4. Require https with pattern

    Add pattern="https://.*" and a title that explains it, so http: and other schemes fail before submit.

Sources: WHATWG HTML Standard: <input type="url"> · MDN: <input type="url">

Copy-paste ready

The HTML Input Type URL example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html input type url form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <input type="url"> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Input Type URL to any page.

Copy the html input type url example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Input Type URL example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See payment forms →Need time slots? Online booking →

Setup guides for the stacks you use

Questions

HTML Input Type URL questions, answered.

View all FAQs
Why does example.com fail input type url?

Because type=url only accepts an absolute URL with a scheme, such as https://example.com. A bare domain like example.com or www.example.com has no scheme, so the browser reports a typeMismatch error and blocks submit.

How do I require https in a url input?

Add pattern="https://.*" to the input. The whole value must match the pattern, so only URLs that start with https:// pass. Add a title that explains the rule, because browsers show it in the error message.

Does input type url check that the website exists?

No. The browser only checks that the text is written like a URL. It never loads the address, so a URL for a site that doesn't exist still passes.

Should I use type=url or type=text for a website field?

Use type=url when you can tell visitors to include https://, because it gives them the URL keyboard and a format check. Use type=text when you want to accept example.com as typed, then add https:// and check the URL on the server.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08 per month, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions per month
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ