Lint HTML email for client compatibility

Deterministic static analysis for HTML email. Catch unsupported CSS and blocked elements before you send - offline, in CI, and right here in your browser. Your HTML never leaves your machine.

Why EmailLint

Deterministic
No AI. The same input always yields the same output.
No network
Runs fully offline - no test sends, no rendering services.
Runs locally
Your HTML is analyzed in the browser. It never leaves your machine.
CI friendly
Exit code 1 on any error-severity issue. JSON and SARIF output for automation.
Typed API
Fully typed TypeScript public API. Score, issues, and compat metadata.
Minimal deps
Only parse5 and postcss. Nothing else to audit.

Try it in your browser

Email HTML
Results
35/ 100

14 issues

  • IMG_MISSING_ALT

    <img> is missing an alt attribute.

    line 22:3 - Add alt="" for decorative images or a short text description.

  • EMPTY_LINK

    <a> has no usable href.

    line 24:3 - Add a valid href to the link.

  • EMPTY_LINK

    <a> has no usable href.

    line 25:3 - Add a valid href to the link.

  • DUPLICATE_ID

    Duplicate id "header" found 2 times.

    line 19:9 - Make each id unique.

  • BASE64_IMAGE

    <img> uses a base64 data: URI.

    line 23:3 - Host the image and reference it by URL where possible.

  • CSS_FLEXBOX

    display:flex is not reliably supported in email clients (especially Outlook).

    line 8:85 - Use table-based layout for email.

  • CSS_BORDER_RADIUS

    border-radius is not supported by classic Outlook (renders square).

    line 8:12 - Provide a fallback or accept square corners in Outlook.

  • CSS_BORDER_RADIUS

    border-radius is not supported by classic Outlook (renders square).

    line 26:3 - Provide a fallback or accept square corners in Outlook.

  • CSS_BACKGROUND_IMAGE

    CSS background-image has unreliable support in email clients.

    line 8:32 - Use an <img> or VML fallback for Outlook.

  • CSS_ABSOLUTE_POSITION

    position:absolute is not reliably supported in email clients.

    line 10:12 - Use a table-based or inline layout.

  • CSS_EXTERNAL_FONT

    External font (@font-face) has limited email client support.

    line 7:5 - Use a web-safe font stack for email.

  • CSS_GRID

    display: grid is not reliably supported across email clients.

    line 9:13

  • SCRIPT_ELEMENT

    <script> is not supported in email.

    line 12:3

  • HTML_MISSING_LANG

    <html> is missing a lang attribute.

    line 2:1

Runs entirely in your browser - your HTML is never sent anywhere.

How it works

  1. 1. Paste

    Drop your email HTML into the editor, or load a sample.

  2. 2. Analyze

    EmailLint scores it 0–100 and lists every compatibility issue with line numbers.

  3. 3. Fix

    Each issue tells you why it breaks and how to fix it, plus per-client support.

Score starts at 100: each error subtracts 15, each warning 5, info 0. A single rule is capped at −15 so one prolific issue can't floor the score alone. Minimum 0.

Try it in 10 seconds

v0.14.0 on npm. No config, no account, no network - the linter runs where your email HTML lives.

Your terminal
$ npx @emaillint/cli newsletter.html
newsletter.html:22:3   IMG_MISSING_ALT      warning  <img> is missing an alt attribute.
newsletter.html:8:85   CSS_FLEXBOX          warning  display:flex is not reliably supported…
newsletter.html:12:3   SCRIPT_ELEMENT       error    <script> is not supported in email.
newsletter.html:2:1    HTML_MISSING_LANG    warning  <html> is missing a lang attribute.

1 file, 14 issues (1 error, 10 warnings, 3 info) — exit 1
Or in CI - GitHub Action
# .github/workflows/lint-emails.yml
- uses: alurulabs/emaillint/.github/actions/emaillint@main
  with:
    paths: 'emails/**/*.html'

Exit code 1 on any error-severity issue, so it gates merges. SARIF output feeds GitHub Code Scanning; --baseline fails only on new errors; --profile strict escalates warnings.

Where EmailLint fits

EmailLint does not replace visual email testing. It catches problems before you need to render and manually check the email - complementary layers, not rivals.

  1. Write email HTML
  2. EmailLint static analysis
  3. Fix structural / compatibility / accessibility issues
  4. Visual email testing
  5. Send
CapabilityEmailLintVisual testing platformsCan I Email
Static source analysis
Email-client compatibility rules
Deterministic, offline results
CLI + CI gating (exit codes, SARIF)
Severity profiles & baseline mode
Free, open source (MIT)
Renders/screenshots in real clients
Live compatibility reference lookup

Rule one for visual testing platforms: they render your email and show you the damage. EmailLint reads your source and tells you what will break and why - in seconds, offline, for free, on every commit.