splitforms.com

HTML · INPUT TYPE

HTML input type tel: phone number fields that work

Last reviewed

An <input type="tel"> shows a telephone keypad on phones, but browsers don't check the format, because phone formats differ by country. Add pattern when you want one format, autocomplete="tel" so the browser can fill in the saved number, and always check the number 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

tel-input-example.html
<label for="phone">Phone</label>
<input type="tel" id="phone" name="phone" autocomplete="tel" placeholder="+1 555 000 0000">

Copy-paste code

HTML Input Type Tel 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-tel.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="phone">Phone</label>
  <input type="tel" id="phone" name="phone" autocomplete="tel" required
         pattern="\+?[0-9 \(\)\-]{7,20}"
         title="Digits, spaces, brackets and dashes, 7 to 20 characters">

  <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 tel input behave?

A tel input changes the mobile keyboard and nothing else: the browser accepts any text and sends it exactly as typed, so the format check is up to pattern and your server.

How does a tel input behave?
FactDetail
Mobile keyboardA phone keypad with 0–9, * and #.
Built-in validationNone. Any text passes, and there is no typeMismatch for tel.
Submitted valueThe text exactly as typed, spaces and dashes included.
patternThe whole value must match the pattern. Add a title that explains the format you want.
autocomplete="tel"Fills the full number with the country code. tel-national and tel-country-code fill the parts. See the autocomplete attribute.
maxlength / minlengthBoth work, and count characters, not digits.

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

Attributes · <input type="tel">

Which HTML Input Type Tel attributes matter?

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

HTML Input Type Tel attributes and what each one does
AttributeWhat it doesDocs
nameThe key the number is sent under, such as phone. Without a name, the field is never sent.
patternA regular expression the whole value must match. Keep it loose enough for international numbers.MDN
autocompleteUse tel for the full number. tel-national and tel-country-code are for split fields.MDN
placeholderAn example of the format, like +1 555 000 0000. It disappears on typing, so it is not a label.
maxlengthThe most characters allowed. Leave room for spaces, brackets and a country code.MDN
requiredBlocks submit while the field is empty. It doesn't check the format.MDN
inputmodeinputmode="tel" is already implied by type="tel", so most forms don't need it.

Common mistakes

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

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

  1. type=tel doesn't validate

    The browser accepts letters and any format. Add pattern for the format you want, and check the number on the server.

  2. type=number is wrong for phone numbers

    A [number input](/html/input-type-number) drops a leading 0 and the +, shows spinner arrows and may change the value when you scroll. Use type="tel".

  3. A strict pattern rejects real numbers

    A US-only pattern like [0-9]{3}-[0-9]{3}-[0-9]{4} blocks international visitors and anyone who types spaces. Allow +, spaces, brackets and dashes, then clean the number up on the server.

  4. 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.

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

Regex patterns for form fields

Use your validation patterns as you assemble a form with our HTML contact form code or HTML form generator.

Copy-paste ready

The HTML Input Type Tel 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 tel 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="tel"> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Input Type Tel to any page.

Copy the html input type tel 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 Tel 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 Tel questions, answered.

View all FAQs
Does input type tel validate phone numbers?

No. Browsers don't check the format of a tel input, because phone numbers look different in every country. Any text passes unless you add a pattern attribute, and you should still check the number on the server.

How do I add a pattern to a tel input?

Add a pattern attribute with a regular expression the whole value must match, for example a + followed by 7 to 15 digits. Add a title that explains the format, because browsers show it in the error message.

Should I use type=tel or type=number for phone numbers?

Use type=tel. A number input drops a leading 0 and the + sign, shows spinner arrows and can change the value on scroll. A phone number is text made of digits, not a number you do math with.

How do I store numbers in E.164 format?

Let people type the number the way they like, then normalise it on the server: remove spaces, brackets and dashes, add the country code, and store it as + followed by up to 15 digits. You can test E.164 patterns with the phone number regex tester on this site.

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