HTML Form Generator

Choose a type for each field, enter its label and mark the required ones — the ready HTML form code appears below right away. Copy it, or open it in the HTML Editor to see the form and add styles.

Form settings
Fields
Result

Use cases

  • Quickly putting together a contact, booking or order form with correct markup
  • Seeing how fields are tied to their labels with label for and id
  • Getting a starting form and refining it in the HTML Editor

FAQ

Does this form send data anywhere?

The generator only creates HTML code. For the data to go somewhere, the action attribute must point to a handler on a server — a script on your site or a form-handling service. The tool itself sends nothing: the code is built in your browser.

Why does every field need a <label>?

A label tied to its field with for and id is read out by screen readers, and clicking the label focuses the field or toggles the checkbox. A placeholder is no replacement: it disappears as soon as you start typing.

What does the required attribute do?

The browser won't submit the form while a required field is empty and shows a message itself. For email and number it also checks the format. It is a convenience for users, not protection: data still has to be validated on the server.

Why is the first option of a required select empty?

For required to work on a <select>, the first option must be a placeholder with an empty value, such as "— choose —". Otherwise the first real option is always selected and the browser treats the field as filled.

What is the difference between method post and get?

With get, the data is appended to the page URL — that's what search forms do. With post, it travels in the request body and stays out of the address bar and browser history; use post for contact, sign-in and sign-up forms.

How do I style the form?

Click "Open in HTML Editor": the form opens as a complete HTML document where you can add a <style> block and see the result right away.

Related tools