SendGrid and Mailgun are the two best-known legacy email APIs, and developers have compared them for years. The short answer: SendGrid is cheaper up to 100,000 emails a month and pairs with a marketing product, while Mailgun is cheaper from 500,000, publishes its overage rates, keeps longer logs on its Scale plan and makes EU data residency simple. Every figure below comes from the vendors’ pages, checked on 16 November 2026.
Who each one is for
SendGrid is the largest legacy email API, now part of Twilio. Its Email API and Marketing Campaigns are sold separately. It suits companies already on Twilio, teams that want marketing and transactional email from one vendor, and senders under 100,000 a month looking for a low price.
Mailgun is a developer email API owned by Sinch, built around sending, inbound routing and address validation. It suits teams that process incoming mail, need EU data residency per domain, or send at high volume where its per-email rates fall.
Pricing compared
| Monthly volume | SendGrid | Mailgun |
|---|---|---|
| Free | 60-day trial, 100/day | 100/day |
| 50,000 | $19.95 (Essentials 50k) | $35 (Foundation 50k) |
| 100,000 | $34.95 (Essentials 100k) | $75 (Foundation 100k) |
| 500,000 | $499 (Pro 700k) | $400 (Scale 500k) |
| 1,000,000 | $799 (Pro 1.5M) | $700 (Scale 1M) |
SendGrid has no 500k or 1M tier on its pricing page, so those rows use the cheapest published tier that covers the volume. Mailgun shows a one-month free trial on Foundation and Scale.
Worked example: 100,000 emails a month
At 100,000 a month SendGrid Essentials 100k is $34.95 and Mailgun Foundation 100k is $75. SendGrid is less than half the price. What you give up: Essentials uses shared IPs and keeps 3 days of email activity. Mailgun Foundation keeps 5 days and allows 1,000 domains. If you need a dedicated IP at this volume, SendGrid Pro 100k is $89.95 and Mailgun Scale 100k is $90, both with one IP included, and Scale keeps 30 days of logs against Pro’s 7.
Worked example: 1 million emails a month
At 1 million a month Mailgun Scale 1M is $700. SendGrid’s nearest tier is Pro 1.5M at $799, which covers half a million more emails than you need. If you are heading toward 1.5 million, SendGrid’s headroom closes the gap.
Overage
Mailgun publishes overage per 1,000 emails: $1.80 on Basic, $1.30 (50k) or $1.10 (100k) on Foundation, and on Scale from $1.10 at 100k down to $0.40 at 2.5M. SendGrid does not show overage on its pricing page, so check your plan terms before a busy month.
Features
Both offer an HTTP API, SMTP relay, webhooks and inbound processing.
- Domains: Mailgun allows 1 domain on Free and Basic and 1,000 on Foundation and Scale. SendGrid does not publish domain limits.
- Logs: SendGrid keeps 3 days on trial and Essentials, 7 on Pro and Premier, with more history for sale. Mailgun keeps 1 day on Free and Basic, 5 on Foundation and 30 on Scale.
- Inbound: Mailgun gives 1 route on Free, 5 on Basic and full routing above that. SendGrid lists its Inbound Parse Webhook, but which plans include it could not be verified.
- Dedicated IPs: Both include one at around 100,000 a month on their mid plans. Mailgun sells extras at $59 per IP per month; SendGrid’s add-on price is not on its pricing page. See dedicated vs shared IPs.
- Marketing: SendGrid sells Marketing Campaigns. Mailgun’s pricing page does not say whether it offers broadcasts.
Deliverability and account policies
SendGrid’s documentation says support usually cannot reactivate an account that has been warned, suspended or banned, and that auto-renewal billing continues while an account is suspended. We did not find a published suspension or review policy for Mailgun. Both send from shared IPs on lower plans, so keeping your bounce and complaint rates low matters on either; see what to do if your email account is suspended.
For EU data, Mailgun lets you pick US or EU per domain and keeps message data in that region, with Australia by contract. SendGrid’s EU residency uses EU-pinned subusers on api.eu.sendgrid.com with a dedicated EU IP, and those subusers lose Marketing, Activity, Validation and Geostats.
Developer experience
SendGrid has official libraries for C#, Go, Java, Node.js, PHP, Python and Ruby. Mailgun has SDKs for Go, Node.js, PHP, Java, Ruby and Python. Both have long histories, so you will find plugins and tutorials for almost any framework. Both also offer SMTP relay, which lets existing SMTP code move between them by changing host and credentials; read SMTP vs API if you are choosing between the two.
Which should you choose?
Choose SendGrid if
- You send up to 100,000 a month and want the lowest price.
- You want marketing campaigns from the same vendor.
- You already use Twilio.
- You need a .NET library.
Choose Mailgun if
- You send 500,000 or more a month.
- You want published overage rates and 30-day logs on Scale.
- You need EU data residency without losing features.
- You route a lot of inbound mail or run many domains.
A third option
Mailcandor is an email API with unlimited domains on every plan, a human review with written reasons and 72 hours to reply instead of a sudden suspension, and 3,000 free emails a month. It accepts SendGrid v3 mail/send requests as they are, and any Mailgun SMTP setup can point at its SMTP relay. See Mailcandor vs SendGrid and Mailcandor vs Mailgun.