Use HTML to Pug
Convert HTML markup into readable Pug without evaluating the result. Start with the sample, select the options and run the tool. Copy or download the result after reviewing it.
Behavior and limits
Convert HTML markup into readable Pug without evaluating the result. HTML parsing may normalize missing elements and malformed markup. Text and attribute values are escaped against Pug interpolation. Raw script/style bodies use literal Pug blocks. Review whitespace and dynamic-template intent; the output is not a lossless source round trip.
Example input
<!doctype html><html><head><title>Example</title></head><body><h1>Hello Ada</h1><p>Welcome <b>back</b>!</p></body></html>
Expected behavior for the example
Produces indented Pug with a doctype, title, heading and paragraph.
Check important output in the application that will consume it. Use the tool directory to find related formats and tasks.
Frequently asked questions
How does HTML to Pug handle my input?
Convert HTML markup into readable Pug without evaluating the result. HTML parsing may normalize missing elements and malformed markup. Text and attribute values are escaped against Pug interpolation. Raw script/style bodies use literal Pug blocks. Review whitespace and dynamic-template intent; the output is not a lossless source round trip.
Is my input uploaded or saved automatically?
Processing runs locally in this browser. Input and results are not saved automatically. Downloads happen only when you choose them. The static preview blocks scripts and external resources when one is available.