# mjml-php

PHP package that converts MJML email markup to HTML.


Source: https://findsoftware.frbit.cloud/mjml-php/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- repository: https://github.com/spatie/mjml-php

### Identity

- status: active
- maintainer: SPATIE BVBA
- maintainerType: unknown
- parent: unknown
- firstRelease: 2023
- hqCountry: BE

### Kind

- category: email
- hosting: php, node
- language: php
- runtime: php, node
- runtimeMin: php 8.2
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: composer

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 1
- latestReleaseDate: 2026-07-23

### Adoption

- githubStargazers: 282
- packagistDownloads: 1674445
- npmWeeklyDownloads: not applicable
- contributors: 11
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: unknown
- dependentPackages: unknown

### Sources

- urls: https://api.github.com/repos/spatie/mjml-php (read 2026-11-16)
- maintainer: https://spatie.be/disclaimer (read 2026-11-16)
- hqCountry: https://spatie.be/disclaimer (read 2026-11-16)
- firstRelease: https://api.github.com/repos/spatie/mjml-php/releases?per_page=100 (read 2026-11-16)
- language: https://api.github.com/repos/spatie/mjml-php (read 2026-11-16)
- runtime: https://github.com/spatie/mjml-php/blob/1.3.0/composer.json (read 2026-11-16)
- runtime: https://github.com/spatie/mjml-php/blob/main/README.md (read 2026-11-16)
- runtimeMin: https://github.com/spatie/mjml-php/blob/1.3.0/composer.json (read 2026-11-16)
- category: https://github.com/spatie/mjml-php/blob/main/README.md (read 2026-11-16)
- installMethod: https://github.com/spatie/mjml-php/blob/main/README.md (read 2026-11-16)
- packagistDownloads: https://packagist.org/packages/spatie/mjml-php.json (read 2026-11-16)
- license: https://api.github.com/repos/spatie/mjml-php (read 2026-11-16)
- licenseModel: https://github.com/spatie/mjml-php/blob/main/LICENSE.md (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/spatie/mjml-php (read 2026-11-16)
- contributors: https://api.github.com/repos/spatie/mjml-php/contributors?per_page=1 (read 2026-11-16)
- currentMajor: https://github.com/spatie/mjml-php/releases/tag/1.3.0 (read 2026-11-16)
- latestReleaseDate: https://github.com/spatie/mjml-php/releases/tag/1.3.0 (read 2026-11-16)

## Notes

mjml-php is a PHP package that converts MJML, a markup language for responsive email, into HTML. It is installed with Composer and called from PHP code: `toHtml()` returns the converted HTML, and `convert()` also returns the errors MJML reports for the input. The conversion depends on the JavaScript mjml package, which must be installed on the server next to a Node.js executable. The package finds that executable itself, and an environment variable sets its path when it cannot.

## Worth knowing

The conversion needs Node.js on the machine that runs PHP. For Laravel projects the README describes a separate route through Sidecar, which deploys the conversion as a Lambda function instead.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
