FindSoftware

Juice

JavaScript library that inlines CSS rules into the style attributes of HTML, used for HTML emails and embeds.

Juice is a JavaScript library that moves CSS rules into the style attribute of the HTML elements they match, for HTML emails and for embedding HTML in third-party websites. It takes an HTML string, a file or a cheerio document, and an options object controls how media queries, font faces, table attributes and template code blocks are handled. A command-line tool does the same for HTML files and whole directories.

The default module runs on Node.js. A separate browser entry exposes the inlining functions for code bundled for the browser, without the file and remote-resource functions. The project site hosts a web client for trying the library on a page of HTML.

Worth knowing

Rules that use pseudo-classes such as :hover cannot be inlined, so they stay in a style tag.

Identity

Status
Active
Maintainer
Automattic4
First release
201110

Rendering and deploy

Install with
npm install3

Releases

Current major version
129
Last release
2026-11-109

Adoption

GitHub stars
3,2862
npm downloads a week
4,634,5996
Contributors
678
Dependent repositories
7,6457
Dependent packages
4417

Why these figures do not compare

Sources

  1. 2026-11-16: links
    automattic.github.io/juice/
  2. 2026-11-16: links, License, Written in, GitHub stars
    api.github.com/repos/Automattic/juice
  3. 2026-11-16: links, Categories, Runtime, Install with
    raw.githubusercontent.com/Automattic/juice/master/README.md
  4. 2026-11-16: Maintainer, License, License model
    raw.githubusercontent.com/Automattic/juice/master/LICENSE.md
  5. 2026-11-16: Minimum runtime
    raw.githubusercontent.com/Automattic/juice/v12.2.3/package.json
  6. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-01:2026-11-07/juice
  7. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/juice
  8. 2026-11-16: Contributors
    api.github.com/repos/Automattic/juice/contributors
  9. 2026-11-16: Current major version, Last release
    api.github.com/repos/Automattic/juice/releases/tags/v12.2.3
  10. 2026-11-16: First release
    registry.npmjs.org/juice

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON