splitforms.com

HTML · FORM ATTRIBUTE

HTML Form Method — GET vs POST explained (live demo)

Last reviewed

The method attribute decides how a form sends its data. GET appends it to the action URL as a query string (for searches and filters); POST puts it in the request body (for contact, registration, and anything sensitive or large). Use POST for real submissions.

  • 500 free total
  • No backend
  • Copy-paste ready
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Copy-paste code

HTML Form Method (GET vs POST) code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
form-method.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required>

  <input type="checkbox" name="botcheck" style="display:none">
  <button type="submit">Send</button>
</form>

Attributes · <form method>

Which HTML Form Method (GET vs POST) attributes matter?

These attributes decide how the <form method> behaves and what actually gets emailed to your inbox when someone submits.

HTML Form Method (GET vs POST) attributes and what each one does
AttributeWhat it does
getDefault. Appends fields to the action URL as ?name=value&… — visible in the address bar, history, and server logs. Use for searches and read-only filters.
postSends fields in the request body, not the URL. Use for contact, login, payment, and any large or sensitive data.
dialogCloses a <dialog> the form is inside without submitting data anywhere.
formmethod (button)Overrides the form's method for one button, e.g. a 'Delete' button that POSTs to a different handler.

Common mistakes

HTML Form Method (GET vs POST) not working? Here's why.

Most broken forms come down to a few small mistakes with the <form method>. Check these before you ship, then forward every submission to Slack or a webhook.

  1. GET leaks data into URLs

    GET puts every field in the URL, so emails and messages land in browser history, analytics, and referer headers. Never use GET for anything sensitive.

  2. GET has length limits

    URLs are capped (roughly 2,000–8,000 bytes depending on the server). Long messages or file uploads can be silently truncated — POST has no such limit.

  3. POST still needs CSRF care

    POST keeps data out of the URL but doesn't make it safe on its own. A hosted form backend handles validation and spam; for your own server, add CSRF protection.

Sources: WHATWG HTML Standard: <form method> · MDN: <form method>

Copy-paste ready

The HTML Form Method (GET vs POST) example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html form method (get vs post) form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <form method> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Form Method (GET vs POST) to any page.

Copy the html form method (get vs post) example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Form Method (GET vs POST) example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See plans →

Setup guides for the stacks you use

Questions

HTML Form Method (GET vs POST) questions, answered.

View all FAQs
What is the difference between GET and POST in HTML forms?

GET appends the form data to the action URL as a query string and is meant for searches and read-only requests. POST sends the data in the request body and is the correct method for contact, login, and registration forms because it keeps large or sensitive data out of the URL.

When should I use method="post"?

Use method="post" for anything that sends real user data — contact forms, sign-ups, logins, payments, and file uploads. It keeps the data out of the URL and has no practical size limit.

What does method="get" do?

It appends each field as ?name=value to the action URL. The data becomes visible in the address bar and browser history, so it should only be used for safe, read-only requests like a search box.

Which method is used for file uploads?

POST only. Files travel in the request body as multipart/form-data; GET cannot send file contents at all.

What is the default form method?

The default is GET. Because that exposes submitted data in the URL, you should explicitly set method="post" on any form that collects real information.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08/mo, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ