HTML to Jade Converter (Jade is now called Pug) rewrites angle-bracket HTML as whitespace-indented Pug syntax in your browser, with no upload and no server round-trip. It collapses div tags into .class/#id shorthand where possible, keeps other attributes in parentheses, and preserves nested structure and inline text so the resulting Pug template compiles back to equivalent HTML.
Teams migrating an Express.js or Node.js view layer from raw HTML templates to Pug often have dozens of existing pages to convert by hand. Running each file through this html to pug converter turns that manual, error-prone rewrite into a one-paste operation, correctly handling void elements, comments, and attribute lists so the migrated Pug template engine markup keeps the same DOM output.
Pug (formerly Jade) is a whitespace-sensitive HTML template language. Instead of angle brackets you write tag names with attributes in parentheses and nest children using indentation. It compiles to standard HTML.
In Pug, .foo is shorthand for div(class="foo") and #bar is shorthand for div(id="bar"). Combined: .card#main = div(class="card" id="main").
No — this tool converts HTML → Pug only. Compiling Pug → HTML requires the Node.js Pug compiler. Run it locally with npx pug --pretty file.pug.
"Jade" was trademarked by another software company, so the project was renamed to Pug in 2016. The syntax is identical.
Whether you're migrating a legacy Express app to a Pug template engine or just want to see how a chunk of markup looks in Jade/Pug syntax, this free HTML to Jade converter gives you an instant, accurate conversion with zero setup. Bookmark this html to pug converter alongside the JS Prettifier and JSON Validator for your everyday Node.js template work.