JSON to CSV
Turn a JSON array into a spreadsheet-ready CSV file.
Turn HTML into Pug templates — shorthand classes and ids, indentation, no closing tags.
Drop an HTML file here, or click to choose one
Converted on your device — the file is never uploaded
The HTML to Pug Converter rewrites markup as Pug templates, using the shorthand for classes and ids, keeping attributes and comments, and leaving script and style contents untouched.
Pug templates are HTML with the noise removed: no angle brackets, no closing tags, structure by indentation. Moving an existing page over means rewriting every element, which is exactly the sort of mechanical work worth handing to a tool.
Paste HTML and get Pug. Classes and ids become the shorthand Pug exists for — div.card#intro, and a div with a class drops the tag name entirely — while attributes that cannot be shortened are kept in brackets, properly quoted. Short text sits on the same line as its tag, longer text becomes a piped block, comments are kept, and script and style contents are preserved verbatim so nothing inside them is reformatted. The browser’s own parser reads the markup, so even sloppy HTML converts the way a browser would understand it.
div.card#intro, and a div with a class drops the tag name entirely.
Data attributes and awkward names are quoted correctly in brackets.
Script and style blocks keep their contents exactly as written.
The browser’s own parser handles unclosed and sloppy markup.
HTML comments become Pug comments, or can be dropped.
A page, a component, or a fragment.
Two spaces, four spaces or tabs.
Keep them as Pug comments, or leave them out.
Paste it into your template and carry on from there.
None, historically — Jade was renamed Pug in 2016 after a trademark dispute. The output here works with Pug 2 and 3.
Yes. Anything that is not a plain class or id goes into brackets, quoted correctly, including data attributes and ones with awkward characters in their names.
A script block keeps its contents exactly as written, indented under the tag, because reformatting code inside it would change what it does.
Yes, doctype included. For a fragment, only what you paste is converted — no html or body wrapper is invented.
What people who use the HTML to Pug Converter think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the HTML to Pug Converter. It takes half a minute and no account.
Write the first reviewTurn a JSON array into a spreadsheet-ready CSV file.
Turn CMYK print percentages into RGB and HEX for screens.
All 148 CSS colour names as HEX — and the nearest name for any colour.
Bhori, ana, roti, tola and grams — with carat purity and a price per bhori.
Type Bangla the way it sounds — ami banglay gan gai becomes আমি বাংলায় গান গাই.
Turn a spreadsheet of dates into a calendar file for Google, Outlook or Apple.
Degrees to radians and back, with exact multiples of π and trig values.
How many grams in a cup of flour, sugar, butter, rice or 36 more.