Skip to content

HTML Form Generator

Add fields, mark which ones are compulsory, and get a form with associated labels and HTML code ready to copy.

It works in your browser. We do not store or send anything you type.Free · No sign-up required

Workspace · HTML Form Generator

Runs in your browser · 100% local

Vista previa

HTML generado

<form action="/enviar" method="post" name="contacto">
  <div class="field">
    <label for="field-nombre">Nombre</label>
    <input id="field-nombre" name="nombre" required type="text" placeholder="Tu nombre">
  </div>
  <div class="field">
    <label for="field-email">Correo electrónico</label>
    <input id="field-email" name="email" required type="email" placeholder="tu@email.com">
  </div>
  <div class="field">
    <label for="field-mensaje">Mensaje</label>
    <textarea id="field-mensaje" name="mensaje" rows="4" placeholder="Escribe tu mensaje"></textarea>
  </div>
  <button type="submit">Enviar</button>
</form>
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions

How to use it

01

Configure the form’s name, action and method.

02

Edit each field: label, ‘name’ attribute, type and whether it is required.

03

Check the preview and copy the generated HTML onto your page.

Examples

Examples

Contact

Name, email address and message – the first two fields are compulsory.

Subscription

A single email field with the ‘required’ attribute and an ‘action’ set to your endpoint.

Support

Type of incident, description and date of contact.

Reference guide

What you need to know

Each field generates a <label> tag linked via `for/id`, an input element with a `type` attribute and, where applicable, the `required` attribute. The values are escaped before being inserted into the HTML.

The form is just the visual part: it does not include server-side validation or actual submission. Link the ‘action’ attribute to your backend or a form service.

Frequently asked questions

Frequently Asked Questions

This version includes text, email, telephone, number, date, password, URL and text area fields. For a drop-down menu, add the options manually.

Related tools

Other tools that can help with similar tasks.

More at Web development→
Online HTML form generator · ByTooly