HTTP basics

GET vs POST for HTML Forms

Choose an HTTP form method based on whether the request retrieves a resource or sends data for processing.

By FormToInbox7 min readUpdated 2026-09-03

GET and POST have different HTTP semantics. A search form can often use GET because its query identifies a retrievable result, while a contact submission normally uses POST to send data for processing.

Use GET for retrieval

With GET, successful form values are encoded in the URL query. That makes a search or filter result linkable, but it also exposes those values in the address, browser history and logs. Do not use GET for private contact messages.

<form action="/search/" method="get">
  <label for="query">Search</label>
  <input id="query" name="q" type="search">
  <button type="submit">Search</button>
</form>

Use POST for processing

POST sends the form body to the action URL and is the usual method for creating a submission or triggering processing. HTTPS is still required; POST does not encrypt a request by itself.

Match the endpoint contract

The receiving endpoint must explicitly support the method and content type you choose. It must validate inputs, enforce limits and return a clear success or error response.

Remember that app handoffs are different

Email, SMS and chat exports open another application instead of making a normal HTTP form request. Their generated JavaScript explains the transition and requires the visitor to send.

Frequently asked questions

Is POST automatically secure?

No. Use HTTPS and secure server-side processing; the method alone does not provide confidentiality or validation.

Can a contact form use GET?

It can technically, but contact values would appear in the URL. POST is normally the appropriate HTTP method for a server-processed enquiry.

Which method does a mailto form use?

A mailto handoff uses a URI and an email application rather than a normal HTTP GET or POST endpoint.

Primary sources

Turn the guide into a working form

Start from a template, change the fields and take the code with you.

Open the free builder
Global privacy
Necessary storage

Keeps your form-builder draft and privacy choice on this device.

Always on
Sale or targeted-ad sharing

FormToInbox does not sell personal information or share it for cross-context behavioural advertising.

Off