HTML Form Generator
List your fields and get clean, accessible HTML form code with a live preview.
Enter your values
Result
HTML
<form action="/submit" method="post" class="form"> <label for="name">Name</label> <input type="text" id="name" name="name" autocomplete="name" required> <label for="email">Email</label> <input type="email" id="email" name="email" autocomplete="email" required> <label for="phone">Phone</label> <input type="tel" id="phone" name="phone" autocomplete="tel" required> <label for="message">Message</label> <input type="number" id="message" name="message" required> <button type="submit">Send</button> </form>
- CSS
- .form { display: grid; gap: 8px; max-width: 420px; font-family: system-ui, sans-serif; } .form label { font-weight: 600; font-size: 14px; margin-top: 8px; } .form input, .form textarea { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; } .form input:focus, .form textarea:focus { outline: 2px solid #6366f1; border-color: #6366f1; } .form button { margin-top: 12px; padding: 12px; border: 0; border-radius: 8px; background: #4f46e5; color: #fff; font-weight: 700; cursor: pointer; }
Field types are picked from the names: 'email' → type=email, 'phone' → type=tel, 'message' or 'address' → textarea, 'date' → type=date, 'website' → type=url. Every field gets a linked <label> for accessibility.
Live preview
How to use HTML Form Generator
- Enter fields (comma separated), form action url and method.
- The result updates instantly as you type, with no button to press.
- Read the formula box to see how it was calculated, then copy the result.
Features
- Instant results
- Results update as you type, with no Calculate button and no page reload.
- Formula explained
- See exactly how the answer is worked out, so you can check it or learn the method.
- Private & free
- Everything runs in your browser. Nothing you enter is uploaded or stored.
Frequently asked questions
How does the HTML Form Generator work?
It uses this method: Field types are picked from the names: 'email' → type=email, 'phone' → type=tel, 'message' or 'address' → textarea, 'date' → type=date, 'website' → type=url. Every field gets a linked <label> for accessibility.
Is this HTML Form Generator free?
Yes. It is 100% free, needs no sign-up and works on mobile and desktop. Your numbers never leave your device.
Free, no sign-up. Your files and numbers are processed in your browser and are not uploaded.