HTML Form Generator
Add fields, mark which ones are compulsory, and get a form with associated labels and HTML code ready to copy.
Workspace · HTML Form Generator
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>How to use it
Configure the form’s name, action and method.
Edit each field: label, ‘name’ attribute, type and whether it is required.
Check the preview and copy the generated HTML onto your page.
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.
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
Related tools
Other tools that can help with similar tasks.
HTML Validator
It detects unclosed tags, incorrect closures, duplicate IDs and missing metadata.
HTML snippet generator
Create buttons, cards, notices, forms and tables using HTML and ready-to-copy styles.
HTML Formatter
Indents and formats HTML to make it easy to read.
