send.webforms.toRead the docs →

Free HTML form generator

Create an HTML form online without writing markup. It starts as a working contact form (name, email, message) and takes any fields you add: any name, any type, in any order. Copy clean HTML when you are done. Eleven input types including selects with options, radio groups, dates and file uploads. Labels are wired with for/id, name attributes are derived from your labels, and nothing you type leaves this page.

Generated HTML
<form action="https://send.webforms.to/wft_your_key" method="POST">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

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

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

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

How to build an accessible HTML form

Every field gets a visible <label> tied to its input with matching for and id, so a screen reader announces the label and a click on it focuses the field. A placeholder is not a label: it vanishes the moment someone types, which is how half-filled forms get abandoned. Radio groups sit in a <fieldset> with a <legend>, which is what assistive technology reads out as the question. Optional fields say "(optional)" in the label instead of relying on a red asterisk and a key nobody reads. The output has no wrapper framework and no CSS of its own, so it takes on whatever styles your site already has.

Every field also gets a name, derived from its label ("Job title" becomes job_title). The browser only sends fields that have a name, and the name is the key each value arrives under, so give fields short, unique names you will recognise in a notification. Two fields with the same label end up with the same name and id; rename one of them.

Choosing input types

The type decides which keyboard a phone shows and what the browser checks for you. email rejects text without an @ and brings up a keyboard with one. tel opens the number pad but accepts any format, which suits phone numbers written many different ways. url expects a full address with its scheme, such as https://. Use number only for quantities, such as a guest count: postcodes, phone and card numbers are text, because they can start with zero and nobody wants spinner arrows on them. date gives a native date picker.

For a choice, use a radio group when there are a handful of options people should see at once, and a select when the list is long. A single checkbox suits a yes or no such as consent. Use a textarea for anything longer than a line: a single-line input tells people a short answer is expected, and they write one.

Required fields and pattern validation

Tick required and the field gets the required attribute: the browser will not submit until it has a value, and it points at the empty field. Mark only what you genuinely need: every required field is one more reason to give up.

For a specific format, add a pattern attribute by hand. It takes a regular expression that must match the whole value, works on text, tel, email, url, search and password inputs, and pairs with a title that tells people the format you expect:

index.html
<label for="postcode">Postcode</label>
<input type="text" id="postcode" name="postcode" required
       pattern="[A-Za-z0-9 ]{5,8}" title="5 to 8 letters, numbers or spaces">

The input pattern generator writes and tests these for common formats. Browser checks help honest visitors; anyone can still post to your endpoint without running the page, so treat them as a convenience rather than a guarantee.

File uploads need POST and multipart/form-data

A form only sends a file when it uses method="POST" and enctype="multipart/form-data". Without the enctype the browser sends the file's name as text and leaves the file behind. Add a file upload field above and the generator adds the enctype to the form tag for you. On WebForms, uploads need a Pro plan or above and must be turned on in the form's settings, where you also set a size limit and allowed types; see file uploads.

Where the form should post

The generated action points at a placeholder. HTML can draw a form but not deliver one: the POST needs something on the other end. There are three options.

Form to email: the three ways compared goes into the trade-offs in more detail.

Add a honeypot before you go live

Public forms attract bots. The cheapest defence is a field people never see and bots fill in. On WebForms it is named _gotcha; paste it inside the form, hidden with CSS rather than type="hidden", which some bots skip:

index.html
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off"
       style="position:absolute;left:-9999px" aria-hidden="true">

The form spam test checks a finished form for this and its other defences.

Using the HTML in Webflow, WordPress or a static site

Static sites (plain HTML, Hugo, Astro, Eleventy, Jekyll and the like): paste the markup into the page or template where the form belongs. See the HTML setup guide.

WordPress: add a Custom HTML block and paste the markup in; page builders have an equivalent HTML widget. No plugin is involved, and your theme's form styles apply. See the WordPress guide.

Webflow: paste the markup into an Embed element, or keep Webflow's own Form Block and set its Action to your endpoint and Method to POST in the block's settings. See the Webflow guide.

If the form does not submit, or arrives with fields missing, paste it into the form debugger. And if you would rather start from a finished form, the HTML form templates cover contact, job application, RSVP, bug report, quote request and more, with the field choices explained.