Free tool

Contact form generator

Formgong team ·

The form below has the three fields most contact pages need: name, email and message. Copy it as it is, or describe the form you want and the generator rewrites it.

Short answer: A contact form generator writes the code for a name, email and message form. This page loads exactly that. Copy the HTML, React or Vue tab, replace fk_your_access_key with a Formgong key, and messages arrive in your inbox and in Telegram. You need no account to copy the code.

Contact form you can copy

The sample is the short version on purpose. Every extra field is one more reason to close the tab. Add a phone or a subject list only if you will use the answer. Press Add field in the editor, or describe the form and let AI fill the rows.

The HTML tab is selected. Tailwind, Bootstrap 5, React, Vue and the AI builder prompt are the same three fields in other clothes.

New: open this form in the form builder to give it your site's colours and font and get the code for WordPress, Shopify, Wix or Webflow.

1. Start from a form

Or describe the form and let AI fill in the fields

Only your description goes to the AI model. The answer replaces the fields above it, and you can edit them like any other.

2. Edit the fields

3. Check the live preview

This is the HTML tab, rendered. Paste your access key in step 4 and the button sends a real test submission.

Contact us

Form by Formgong

4. Add your access key

Every copy below uses it as you type. Until then the code has fk_your_access_key, which Formgong refuses.

We email you a sign-in code. Your first form and its key are ready once you enter it. Enter the code in this tab and the form's Connect page starts with these fields.

5. Copy the code

Plain HTML with a short style block. The script at the end is optional: it keeps visitors on the page and says sent only when Formgong answers success: true. Delete it and the browser posts the form on its own.

HTML
<style>
#fg-form{position:relative;box-sizing:border-box;display:grid;gap:16px;width:100%;max-width:520px;padding:28px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#0f172a;font:16px/1.5 system-ui,sans-serif}
#fg-form *{box-sizing:border-box}
#fg-form h2{margin:0;font-size:24px;line-height:1.3}
#fg-form .fg-field{display:grid;gap:6px;min-width:0;margin:0;padding:0;border:0}
#fg-form label,#fg-form legend{font-weight:500}
#fg-form legend{padding:0;margin-bottom:2px}
#fg-form input,#fg-form select,#fg-form textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid #64748b;border-radius:8px;background:#fff;color:inherit;font:inherit}
#fg-form textarea{min-height:120px;resize:vertical}
#fg-form .fg-choice{display:flex;align-items:center;gap:10px;font-weight:400}
#fg-form .fg-choice input{width:20px;min-height:20px;margin:0;flex-shrink:0}
#fg-form [aria-invalid=true]{border-color:#b91c1c}
#fg-form .fg-error{margin:0;color:#b91c1c;font-size:14px}
#fg-form .fg-status{margin:0}
#fg-form .fg-credit{margin:0;font-size:13px;text-align:center}
#fg-form .fg-credit a{color:#64748b}
#fg-form .fg-error:empty{display:none}
#fg-form button{min-height:48px;padding:12px 20px;border:0;border-radius:8px;background:#4338ca;color:#fff;font:inherit;font-weight:600;cursor:pointer}
#fg-form button:disabled{opacity:.7;cursor:wait}
#fg-form :focus-visible{outline:3px solid #4338ca;outline-offset:3px}
#fg-form .fg-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#fg-form select{appearance:none;-webkit-appearance:none;padding-inline-end:40px;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}#fg-form select:dir(rtl){background-position:15px 50%,20px 50%}@media (forced-colors:active){#fg-form select{appearance:auto;-webkit-appearance:auto;background-image:none}}
</style>
<form id="fg-form" action="https://formgong.com/submit" method="POST">
  <h2>Contact us</h2>
  <input type="hidden" name="access_key" value="fk_your_access_key">
  <input type="hidden" name="_lang" value="en">
  <div class="fg-field">
    <label for="fg-name">Name <span aria-hidden="true">*</span></label>
    <input type="text" id="fg-name" name="name" autocomplete="name" required aria-describedby="fg-name-error">
    <p class="fg-error" id="fg-name-error"></p>
  </div>
  <div class="fg-field">
    <label for="fg-email">Email <span aria-hidden="true">*</span></label>
    <input type="email" id="fg-email" name="email" autocomplete="email" required aria-describedby="fg-email-error">
    <p class="fg-error" id="fg-email-error"></p>
  </div>
  <div class="fg-field">
    <label for="fg-message">Message <span aria-hidden="true">*</span></label>
    <textarea id="fg-message" name="message" required aria-describedby="fg-message-error" rows="4"></textarea>
    <p class="fg-error" id="fg-message-error"></p>
  </div>
  <div class="fg-trap" aria-hidden="true"><label>Leave this empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label></div>
  <button type="submit">Send message</button>
  <p class="fg-status" data-fg-status role="status"></p>
  <p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&amp;utm_source=badge&amp;utm_medium=form&amp;utm_campaign=generator" target="_blank" rel="noopener">Form by Formgong</a></p>
</form>
<script>
// Optional. Without it the browser posts the form and Formgong shows its own thank-you or error page.
(function () {
  var form = document.getElementById("fg-form");
  var status = form.querySelector("[data-fg-status]");
  form.noValidate = true;
  form.addEventListener("submit", function (event) {
    event.preventDefault();
    var first = null, seen = {};
    Array.prototype.forEach.call(form.elements, function (field) {
      var id = field.getAttribute("aria-describedby");
      if (!id || seen[id]) return;
      seen[id] = true;
      var ok = field.checkValidity();
      field.setAttribute("aria-invalid", ok ? "false" : "true");
      document.getElementById(id).textContent = ok ? "" : field.validationMessage;
      if (!ok && !first) first = field;
    });
    if (first) { first.focus(); return; }
    var button = form.querySelector("[type=submit]");
    button.disabled = true;
    status.textContent = "Sending…";
    fetch(form.action, { method: "POST", headers: { Accept: "application/json" }, body: new FormData(form) })
      .then(function (response) { return response.json().catch(function () { return {}; }); })
      .then(function (data) {
        if (data.success === true) { form.reset(); status.textContent = "Thank you. Your message was sent."; }
        else status.textContent = data.message || "Could not send. Please try again.";
      })
      .catch(function () { status.textContent = "Could not reach the server. Check your connection and try again."; })
      .then(function () { button.disabled = false; });
  });
})();
</script>
<!-- Optional: fg.js counts views, starts and the field people stop at for your Formgong Analytics page. No cookies. Delete this line to turn it off. -->
<script src="https://formgong.com/fg.js" defer></script>
Contact form generators, checked 16 October 2026
This pageFormcarry contact form generator
FieldsName, email, message. Change them by description or by handName, email, message
CodeHTML, Tailwind, Bootstrap 5, React, VueHTML, React or Vue, with CSS or Tailwind
Where it postsFormgong, after you add a keyFormcarry, after you add a form ID
Telegram alertInstant on the free planNot mentioned on the generator page

What happens when someone presses Send

The HTML version is a normal form. The browser posts it to /submit on Formgong. Formgong checks the key and the honeypot, stores the message, and only then sends the visitor to a thank-you page. If something fails, such as a wrong key, the visitor sees an error page with the reason instead of a fake “Thanks”. You can send people back to your own thank-you page with a hidden _redirect field. It must point to a domain you added to the form.

The React and Vue versions stay on the page. They send the fields with fetch, read the JSON answer, and write “sent” only when the answer says success: true. A network error or a refused submission is written into the status line, so nobody walks away thinking the message went through when it did not.

Why name, email and message

  • Name. One field, not first and last. People write their name the way they want to be addressed.
  • Email. type="email" with autocomplete="email", so phones offer the address and the browser rejects a missing @.
  • Message. A textarea, required. A contact form with an empty message is noise.

The email Formgong sends you uses the visitor's address as the reply address, so Reply in your mail app answers them. That is why the email field is required here. If you want calls, add a phone field and leave it optional. The HTML form generator sample shows a phone and a subject list already wired.

Spam without a CAPTCHA puzzle

Every copy has a hidden field named botcheck. People never see it. Simple bots fill every input, and Formgong sends the submission to spam when that field has text. Leave the field in the code and keep it hidden.

If a bot gets past it, turn on Cloudflare Turnstile in the form settings. Visitors usually see no puzzle at all. The form checker can read your published page and tell you if the honeypot or the key went missing on the way.

Free limits, email and storage

The contact form code is free to copy. Messages are delivered only after you replace the placeholder key.

Copying the code needs no account. AI generations are limited to 5 an hour and 10 a day for each network, plus 100 a day for the whole site. When a limit is hit, start from a form and edit the fields. Editing runs in your browser and does not call the model.

On the free plan, Telegram is instant and email is sent for every submission. The free plan is 250 submissions a month. Auto-reply is not on the free plan. Submission data is stored in the EU. Support is Formgong at support@formgong.com.

Your description is sent to the model so it can choose fields. It is not stored. Do not paste passwords, card numbers or other secrets.

Questions

What is a contact form generator?

A tool that writes contact form code for you. This one starts with name, email and message, and gives you HTML, Tailwind, Bootstrap 5, React and Vue versions of the same form.

How do I add a contact form to my website?

Copy the HTML tab, replace fk_your_access_key with your Formgong key, and paste it where the form should appear. Publish the page and send yourself a test message.

Does the form show a success message even if sending fails?

No. The HTML form shows Formgong's thank-you page only after the message is stored. The React and Vue versions say sent only when the server answers success: true.

Will I get the messages by email?

Yes, after you add a real key. On the free plan, Telegram is instant and email is sent for every submission. The free plan is 250 submissions a month.

Can I change the fields?

Yes. Describe the form in the box, or build it yourself without AI. You can add a phone, a subject list, a checkbox or a date.

Sources

Checked on 16.10.2026 against these public pages: MDN: <form>, MDN: input type=email, Formcarry contact form generator, Formgong HTML guide.

← Formgong