Developer email parsing API

Email Parser API: Parse Inbound Email into JSON, a Webhook, or a Database

Turn inbound email into structured data your code can use

The MailParse email parser API receives inbound email, parses the body and HTML tables into the fields you name, and returns clean JSON. Forward mail to a parsing address or connect a mailbox, and MailParse POSTs structured data to your webhook or loads it straight into your database. Paste a sample below to see the output shape.

Structured JSON output
Named fields from the body
Webhook POST in real time
Bulk and high volume

Last updated July 2026

Convert your email files
No install

Connect a mailbox to pull .eml/.msg in bulk, or paste a raw email to test the converter now.

or paste an email to test
Output format
Columns to extract
Extract your own custom fields
Popular:

Create a free account to download. No credit card required.

Quick answer

An email parser API lets your code send a raw email and get back structured JSON with the exact fields you defined. MailParse offers a REST API and webhooks that parse the message body and HTML tables into named fields, so you can post parsed data straight to a database, CRM, or another app. It also lists each attachment by filename, type, and size. No manual copying and no brittle regex to maintain.

JSON
Predictable parsed payload
Webhooks
Real-time POST to your endpoint
HTML tables
Parsed into rows
Bulk
High inbound volume handled

Plenty of business processes start with an email: a lead from a web form, an order confirmation from a marketplace, an invoice from a supplier, an alert from a monitoring tool. The data you need is sitting in that message, but raw email is messy. MIME parts, base64 encoding, inline images, forwarded chains, and a dozen header formats stand between the message and a clean record your application can store. An email parser API handles all of that for you and hands back predictable JSON.

MailParse gives you an inbound parsing endpoint without the work of running a mail server. Forward email to a dedicated parsing address or connect a Gmail, Outlook, or IMAP mailbox, and every message is decoded into a consistent structure: sender, recipients, subject, plain text and HTML bodies, all headers, and an array of attachments listed by filename, type, and size. You define the custom fields you want pulled from the body and its HTML tables, such as an order ID or invoice total, and MailParse returns them alongside the standard fields. The parsed result is POSTed to your webhook the moment it arrives, so you can write it to a database, push it into a CRM, or kick off the rest of your workflow in code. If you are currently weighing the provider-hosted routes, we have written up the SendGrid Inbound Parse webhook and Amazon SES inbound email parsing in full, including the MX records and the raw MIME each one leaves you to handle.

What the converter does

Everything you need to turn a pile of email files into a spreadsheet your team can actually use.

Inbound email to JSON

Every message is decoded into a predictable JSON object: sender, recipients, subject, text and HTML bodies, headers, and the attachment list. No MIME parsing in your own code.

HTML tables into rows

When a message carries an HTML table, MailParse turns each row into structured data, so line items and lists arrive as an array instead of one blob of text.

Webhook delivery

MailParse POSTs the parsed payload to the URL you set the instant an email arrives, so your app reacts in real time instead of polling a mailbox.

Custom field extraction

Name values like order_id, invoice_total, or tracking_number and the parser finds them in the body and returns them as typed JSON fields, not raw text.

Straight to your database

Because the output is clean JSON, you map it to your schema once and write rows directly. Email to database becomes an insert, not a parsing project.

Built for volume

Handle a steady stream or a burst of thousands of inbound emails. The API keeps the same structure whether you parse one message or a full queue.

How the email parser API works

Four steps from an inbound message to structured data in your application.

1

Send email in

Forward mail to your MailParse parsing address or connect a Gmail, Outlook, or IMAP mailbox so messages flow in automatically.

2

Define your fields

Pick the standard fields and add custom fields to extract from the body and HTML tables, so the JSON matches what your app expects.

3

Receive the webhook

MailParse parses the message and POSTs a structured JSON payload to your endpoint in real time.

4

Store or route the data

Write the JSON to your database, push it into a CRM or queue, or trigger the next step of your workflow in code.

What developers build with the email parser API

Teams that need email turned into structured data inside their own systems.

Lead capture into a CRM

Parse inbound lead and contact-form emails into JSON and POST them straight into Salesforce, HubSpot, or your own pipeline with the fields already mapped.

Order and shipping automation

Turn order confirmations and shipping notices from marketplaces into structured records, capturing order IDs and tracking numbers for your fulfillment system.

Line items from HTML tables

Turn the HTML tables inside order and invoice emails into arrays of rows, so line items arrive structured and ready to write to your database.

Email to database pipelines

Feed parsed email into a data warehouse or app database as rows, so reporting and search run on structured data instead of a mailbox.

Why MailParse beats parsing email yourself

No mail server to run

Skip the IMAP polling, MIME decoding, and base64 handling. MailParse receives the mail and hands you clean JSON over a webhook.

MIME handled for you

Nested parts, inline images, and mixed encodings are normalized to UTF-8 automatically, so you never touch a raw MIME tree. Attachments come listed by filename, type, and size.

Body data, not just headers

A raw parse gives you fixed headers. MailParse also extracts custom values from the message body and returns them as typed fields.

Real-time webhooks

Get the parsed payload the moment an email lands instead of running a cron job that polls a mailbox and reparses everything.

Email parser API vs building it yourself vs a transactional email webhook

For inbound email there are three honest paths: write your own MIME parser, point a transactional email API's inbound webhook at your server, or use a dedicated parsing API that returns named fields. Here is how they line up on the choices a developer actually makes, with credit to each approach where it leads. For the wider field, see the best email parser guide.

What matters MailParse API Build it yourself Transactional email webhook
What it does Receives mail and returns the named fields you want as clean JSON Receives mail and hands you raw MIME to parse in your own code Receives mail and posts the raw parsed message to your webhook
Field extraction Name a field like order_id and it comes back separated, no parsing code You write and maintain the parser for every field and sender Mostly yours to write; you parse the posted body for business fields
Attachments Lists each attachment by filename, type, and size; extract a PDF with a document tool first You decode base64 and parse each file format yourself Delivers attachment files; your code opens and reads them
Setup and infrastructure Connect a mailbox or POST an email; no mail server or MX to run Run IMAP polling or an MX record plus an endpoint that returns 2xx Point an MX record at the provider and run a webhook endpoint
When a sender changes format Keeps reading the named fields when the layout drifts Your parser breaks and you patch it each time Your field parsing breaks; the raw delivery still arrives
Output Business-ready JSON, CSV, or Excel Whatever you build from the raw MIME tree Raw parsed message you extract the fields from
Where it also leads No parsing code to maintain and named fields returned clean Full control, no per-parse fee, and data never leaves your servers Also sends transactional email on proven high-volume infrastructure
Best for Teams that need clean named fields without building a parser Teams with the engineering time and a need for total control Teams already sending mail there that will code their own parsing

Capabilities reflect each approach as of June 2026. Transactional providers differ: Mailgun routes can do basic regex or JSONPath matching, while SendGrid, Postmark, and Brevo inbound deliver the raw parsed message for your code to extract from. Verify current features on each provider before you build.

Frequently asked questions

What is an email parser API?

An email parser API is a service that receives inbound email, breaks it down into a predictable structure, and returns it to your application as JSON. Instead of writing code to handle MIME parts, encodings, and attachments yourself, you send mail to the API and get back clean fields, sender, subject, body, headers, attachments, and any custom values you define.

How does an email parsing API work?

You forward email to a parsing address or connect a mailbox, and the API decodes each message: it separates the MIME parts, normalizes encodings to UTF-8, lists the attachments, and pulls the fields you configured. The parsed result is then POSTed to your webhook as JSON, so your application receives structured data in real time rather than a raw email.

Can an email parser API read data from attachments?

MailParse lists every attachment in the JSON payload with its filename, content type, and size, so your code knows what arrived and can route it onward. It parses the email body and HTML tables into named fields, but it does not read the data inside a PDF or spreadsheet attachment. For that, send the file to a document extraction tool and merge the result with the parsed email.

How do I handle email attachments programmatically?

Point the email parser API at your inbound mail, and it does the MIME parsing for you. Each attachment arrives in the webhook payload listed by filename, type, and size, and the message body and HTML tables come back as named fields. To read the data inside a PDF or CSV attachment, pass that file to a document extraction API and combine its output with the parsed email JSON.

How do I get email data into a database?

Because the API returns clean JSON with consistent field names, you map those fields to your table columns once and insert each parsed email as a row. Set MailParse to POST to a webhook in your app, validate the payload, and write it to your database. Email to database becomes a simple insert rather than a parsing and cleanup project.

Does the email parser API support webhooks?

Yes. Webhooks are the core delivery method. When an email is parsed, MailParse sends an HTTP POST with the structured JSON to the endpoint URL you configure, in real time. Your application receives the data the moment the message arrives, so you can act on it immediately instead of polling a mailbox on a schedule.

Can I parse emails in bulk with the API?

Yes. The API handles high inbound volume and keeps the same JSON structure whether one message or thousands arrive. You can also connect a mailbox and parse a backlog of existing emails into structured records in one pass, which is useful for migrations or for processing a queue that built up before you added parsing.

Is there a free email parser API?

You can create a free account to test the parsing output and webhook shape before you build against it. Paid plans add the volume, scheduled mailbox sync, and team access that production workloads need, which is what most development teams run once their integration is live.

How much does an email parser API cost?

Pricing depends on the model. Dedicated parsing APIs usually bill by the volume of emails or pages parsed, while transactional email providers bill mainly by messages sent and bundle inbound parsing in. MailParse charges by parsing volume with a free tier to test the output first, so you confirm the JSON shape before you build against it.

What is the best email parser API?

The best email parser API depends on what you need. If you only want raw inbound mail delivered, a transactional provider's webhook is enough. If you need named fields and HTML tables returned as clean JSON, a dedicated parser like MailParse does the field extraction the webhook leaves to your code.

Start parsing email with the API

Create an account, point inbound mail at MailParse, and get structured JSON on your webhook in minutes.