Blog
Text tools

Email domain sorter online

Paste a list of email addresses, one per line. Choose whether to sort them by the part after the @, or group them into blocks with a domain header for each — handy for splitting a mailing list by provider or company.

Result

Distinct domains found —

All calculations run locally in your browser: parsing, chart, export. Disconnect the network and the page keeps working.

Facts and limits of this method

Domain Everything after the first @ on a line, kept exactly as typed
Domain comparison Case-insensitive: "Example.com" and "example.com" are treated as one domain
Sort mode Emails are reordered alphabetically by domain; original order is kept within the same domain
Group mode Emails are grouped under a "— domain —" header, headers sorted alphabetically, original order kept inside each group
Lines without @ Collected separately and placed under a "(no domain)" header at the end
Distinct domains Count of unique domains found, not counting the "(no domain)" bucket

When it misleads you

How it is calculated

Each non-empty line is scanned for the first @ character. Everything after it becomes that line's domain; a line with no @ has no domain and goes into the "(no domain)" bucket.

In sort mode, the lines with a domain are reordered by comparing domains alphabetically (case-insensitive); lines that share a domain keep their original relative order, and the no-domain lines are appended at the end under their own header.

In group mode, lines are collected into one bucket per domain first, the domain names are sorted alphabetically, and then each bucket is printed as a "— domain —" header followed by its lines in their original order.

"Distinct domains found" counts how many different lowercase domains were seen across all lines with an @; it ignores how many emails share each domain.

Questions and answers

What happens to lines without an @ symbol?

They are treated as having no domain and are placed together under a "(no domain)" header, so you can spot and fix them instead of losing them silently.

Is domain comparison case-sensitive?

No. "Example.com" and "EXAMPLE.com" are treated as the same domain in both sort and group modes.

Does grouping change the order of emails inside one domain?

No. Inside each domain group the emails keep the exact order they had in your original list.

Are subdomains treated as the same domain?

No. "mail.example.com" and "example.com" are compared as two different, unrelated domains.

Is my list of addresses sent anywhere?

No. Everything runs in your browser; the list you paste is never uploaded.

Related tools

All tools