Free CSS Inliner Tool

Automatically inline your CSS styles into HTML tags. Essential for email templates, as many email clients require CSS to be written inline rather than in a style block.

Paste your HTML with CSS

Why Do I Need a CSS Inliner for HTML Emails?

Unlike web browsers, email clients (such as Microsoft Outlook, Gmail, Apple Mail, and Yahoo!) have notoriously inconsistent support for modern CSS. While a web browser perfectly understands a <style> block in the <head> of your document, many email clients will completely strip it out, leaving your beautiful HTML email looking broken and unstyled.

The most reliable way to ensure your styles render correctly across all email clients is to use inline CSS. A CSS inliner automates the tedious process of moving styles from your stylesheet directly into the style="" attributes of your HTML elements.

How Does Our Free CSS Inliner Work?

Our tool processes your HTML and CSS directly in your browser. It parses your DOM, matches the CSS selectors against your HTML elements, and automatically appends the styles directly to the elements as inline styles.

  • Combined Mode: If you already have your CSS inside a <style> tag in your HTML, use this mode. The tool will extract it and apply the styles inline.
  • Separate Mode: If you keep your HTML and CSS in separate files, simply paste them into their respective fields. The tool will merge them instantly.

CSS Inlining Best Practices for Email

  • Keep it simple: Avoid complex CSS selectors (like :nth-child or advanced pseudo-classes) as many email clients will ignore them, even when inlined.
  • Preserve Media Queries: Our tool intelligently leaves media queries (like @media (max-width: 600px)) in the <style> block since they cannot be inlined, ensuring your email remains responsive on mobile devices.
  • Use Tables for Layout: While not strictly a CSS rule, many desktop clients (like Outlook on Windows) require HTML <table> elements for structural layouts instead of CSS Grid or Flexbox.

Security and Privacy Guarantee

Your templates are completely safe. This CSS inliner runs 100% locally in your browser. We do not transmit, save, or store your HTML or CSS code on our servers, making it perfectly safe for proprietary email templates and internal communications.