HTML to PUG Converter
Convert HTML to clean Pug (Jade) template syntax — paste, convert, and copy instantly.
Converted Pug will appear here...About HTML to PUG Converter
Pug (formerly known as Jade) is a high-performance template engine for Node.js and Express applications. It uses indentation-based syntax instead of closing tags, resulting in cleaner, more readable code. Converting existing HTML to Pug is a common need when migrating projects or adopting Pug in your workflow, and this tool makes that process effortless.
This converter runs entirely in your browser using the native DOMParser API — no data is ever sent to a server. It supports fragment mode to convert HTML snippets without wrapping them in a full document structure, handles attributes, IDs, classes (with Pug shorthand syntax), nested elements, comments, and self-closing tags. Your code stays private and the conversion is instant.
How to Use
Paste HTML
Copy your HTML code and paste it into the left input pane.
Convert
Click "Convert" to transform your HTML into Pug template syntax.
Copy Result
Use the copy button to grab your Pug output.