Use Cases AI Agents Pricing Embeds AI Skill MCP Server Sign in Get Started
Free tool Contact Form HTML Generator

Free contact form generator with HTML code to copy

Pick your fields, match your colours and copy a clean, accessible contact form as standalone HTML and CSS. It works on any website, nothing to sign up for.

Configure your form

Built-in fields
Name
Email
Message

The message is always required, like on the hosted Helpdesky form.

Custom fields

Text, multi-line text, dropdown, checkbox and number: the same field types the hosted form supports. Custom fields sit between Email and Message.

Button & success message

Switch the preview to Success to see this state.

Style
Button
Corners
Alignment on the page
Spam protection

Need a CAPTCHA and sender blocking without any backend work? The hosted Helpdesky form includes both; see the embed tab.

Live preview

Get the code
Point action="#" at your form endpoint and the form is live. Nothing you type here leaves your browser.

How it works

  1. Choose your fields

    Name, email and message are built in. Add dropdowns, checkboxes, numbers and extra text fields, mark them required and put them in the order you want.

  2. Style it to match your site

    Accent and button colours, labels, background, corners, dark mode, width and alignment. The preview updates with every change.

  3. Copy the code

    One self-contained HTML + CSS snippet with accessible labels, HTML5 validation and an optional honeypot. Or grab the two-line Helpdesky embed instead.

Frequently asked questions

How do I make the generated contact form actually send?

The code is front-end only, so it needs somewhere to post to. Point the form's action attribute at a route on your own server that emails or stores the submission, or at a form backend such as Formspree, Basin, Getform or Netlify Forms, which give you a URL to paste in. Your backend receives the fields by their name attributes (name, email, message and the names derived from your custom labels). If you would rather not run a backend at all, use the Helpdesky embed tab: the hosted form sends every submission to a shared inbox and replies go out by email.

Does the form include spam protection?

Turn on the honeypot option and the form gains an off-screen "website" field that people never see but bots fill in; reject any submission where it is not empty. That stops basic form spam. For targeted spam add a CAPTCHA such as Cloudflare Turnstile or reCAPTCHA on your backend, rate-limit by IP and validate the email address server-side. The hosted Helpdesky contact form ships with Turnstile and sender blocking built in.

Is the generated contact form accessible?

Yes. Every input has a visible label linked with for and id, required fields use the native required attribute so browsers announce missing values, the email field is type="email", name and email carry autocomplete hints, the submit control is a real button element, focus states stay visible and the success message has role="status". The honeypot is aria-hidden with tabindex="-1" so keyboards and screen readers skip it. When you pick colours keep text at a 4.5:1 contrast ratio against its background.

How do I style the contact form to match my website?

Use the style controls: accent colour (gradient or solid), button text colour, label colour, background, border on or off, rounded, pill or flat corners, dark mode, maximum width and alignment. Everything lands in one CSS block whose selectors are prefixed with .hdcf- so it cannot clash with your stylesheet, and you can edit that block freely after copying. Not sure of your brand colours? The free Brand Kit Extractor reads them from any URL.

How do I add a GDPR consent checkbox?

Add a custom field, set its type to Checkbox, give it a label such as "I agree to the processing of my data as described in the privacy policy" and tick Required. It renders as a required checkbox input, so the browser blocks submission until it is ticked. After copying, you can turn the policy name into a link inside the label (user text is inserted as plain text to keep the code safe). Store the consent and a timestamp alongside the submission on your backend.

Is the contact form generator free and private?

Completely free: no signup, no watermark and no attribution needed, and you can use the code on client and commercial sites. The generator runs entirely in your browser, so the labels, placeholders and colours you enter are never sent to our servers.

More free tools

No signup and no credit card. Each one runs in seconds.

Want the submissions in a shared inbox?

Embed the hosted Helpdesky contact form instead: submissions land in a shared inbox, replies go out by email, spam protection is built in, and fields and colours are managed from the dashboard. Free plan, no credit card.

Create a free account