Convert HTML email to a Node.js template literal

Paste the template and get it as an exported constant. The conversion runs in your browser.

The HTML is processed in your browser and not sent anywhere.

Result

Using the output

The output looks like `export const mailTemplate = \`…\``. Turn placeholders into ${customer.name}, wrap the template in a function, and pass it as the html field to Nodemailer, Resend or Amazon SES.

Frequently asked questions

What happens to backticks?

Backticks inside the HTML are escaped as \` so the template literal stays valid.