URL: http://premailer.io/

Premailer is a Python library for turning a HTML + CSS into HTML with all the CSS embedded as inline style attributes. This is sadly very necessary to ensure that your fancy HTML emails look spiffy across all email clients and email webapps.

So, last week I put together a little site to test the library via a browser: Premailer.io

It's just a simple webapp with a form where you can enter HTML in three different ways; textarea, by URL and by file upload.

You can also override all the possible advanced options that premailer supports.

What's kinda cool is that you can get a preview of how the HTML document will look like in an iframe that is dynamically loaded with the result from the conversion.

The webapp is of course open source and available on github.com/peterbe/premailer.io. The front-end is an AngularJS app and the build system is Lineman.js. The server is a Falcon server running on uWSGI via Nginx.

There's very little fancy here. There's no limitations or protections. I just hope it becomes handy for people to test premailer out.

The inspiration came from MailChimp's CSS Inliner Tool which is cute but very basic and doesn't allow you the same kinds of input.

If anybody with some AngularJS or highlight.js chops has time I'd love to help fix why the HTML is not syntax highlighted.

Comments

Nlls

Hey Peter,
premailer.io seems to be broken at the moment. Always gives a server error back, regardless of how big or small of a Html I put in the text-area.
Did you turn off support?

Best,
Nils

Peter Bengtsson

Thanks for letting me know. I'll take a look.

Peter Bengtsson

Seems to work now.

Denis Ferreira Iongbloed

Hi folks!

I'm new about HTML and css to inline set, and I use Knime program for automate some process and ETL. Are ther some example or some pluggind/extension to be used with the program? Can you send me some information about how to integrate it? It can be a great step for you to access more users about it and get more space into automation program's.

Your email will never ever be published.

Previous:
Find what indentation your files use July 7, 2015 Python
Next:
Visual speed comparison of AngularJS and ReactJS July 20, 2015 Web development, AngularJS, JavaScript
Related by category:
How I run standalone Python in 2025 January 14, 2025 Python
Switching from Next.js to Vite + wouter July 28, 2023 JavaScript
How to SSG a Vite SPA April 26, 2025 JavaScript
An ideal pattern to combine React Router with TanStack Query November 18, 2024 JavaScript
Related by keyword:
mincss "Clears the junk out of your CSS" January 21, 2013 Python, Web development
CSS selector simplifier regular expression in JavaScript December 20, 2017 Web development, JavaScript
Ultrafast loading of CSS September 1, 2017 Web development, JavaScript
csso and django-pipeline February 28, 2018 Python, Django, JavaScript