HTML TO PUG - Online Converter

This application is currently under development and released as an experimental public demo.


Insert your plain HTML code that you want to convert into the editor below.

PASTE YOUR HTML CODE HERE <!DOCTYPE html> <html lang="en"> <head> <title>Pug</title> <script type="text/javascript"> if (foo) bar(1 + 5) </script> </head> <body> <h1>Pug - node template engine</h1> <div id="container" class="col"> <p>You are amazing</p> <p>Pug is a terse and simple templating language.</p> </div> </body> </html>

Your HTML will be converted to PUG syntax and show up in the editor below.

THE CONVERTED OUTPUG WILL APPEAR HERE doctype html head title Pug script(type='text/javascript'). if (foo) bar(1 + 5) body h1 Pug - node template engine #container.col p You are amazing p Pug is a terse and simple templating language.

What is Html to Pug

This project combines multiple open source projects to create a simple user interface for web developers that are using pug in their web projects. We're using "Bootstrap" as base template using a free "Boostwatch" template. The code-editors are based on "Ace" and the backend is running "html2pug" and "html2jade" plugins to convert your html content to pug syntax. You find a list of included projects/licenses here.

What is Pug

"Pugjs is a high performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. For bug reports, feature requests and questions, open an issue. For discussion join the chat room."

-- quote from github.com/pugjs/pug community

What about Jade

Jade has been renamed to pug due to copyright conflicts. "Jade is a high performance template engine heavily influenced by Haml and implemented with JavaScript for node and browsers." Source

How to use this tool

Our Html to Pug realtime converter does all the work for you. If you have a html snippet simply paste it into the left editor. Our backend will perform the conversation from html to pug styled syntax and print the pug output in the right editor.