DevToolsmith

HTML to Pug

Convert HTML markup into readable Pug without evaluating the result.

Runs 100% in your browser — nothing is uploaded

Input
Tip: drop a file here121 chars · 121 bytes · 1 line
Result
0 chars · 0 bytes · 0 lines

Up to 200,000 input characters and 2 million output characters. Processing stays on this device.

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.