Email Address RFC 5322 Parser
JSON →email-addresses is a JavaScript/TypeScript library designed for parsing email addresses strictly according to RFC 5322. At version 5.0.0, this package provides functions to extract display names, addresses, local parts, and domains from email strings, even supporting complex forms like `"Bob Example" <bob@example.com>`. Unlike regular expression-based solutions, it uses a recursive descent parser that maps directly to RFC 5322 productions, ensuring robust and spec-compliant parsing. It explicitly states that it does *not* perform RFC 5321 validation (which involves checking for deliverability), focusing solely on the grammatical correctness defined by RFC 5322. The library also supports RFC 6532 for Unicode email addresses and offers options for strictness, partial parsing, and custom address list separators. It is actively maintained and ships with TypeScript types, facilitating its use in modern JavaScript and TypeScript projects.
Traffic · last 30 days ↑100% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇫🇷 France · 🇨🇦 Canada