DevToolsmith

Pug to HTML

Render a safe Pug subset with JSON locals.

Runs 100% in your browser — nothing is uploaded

Input
Tip: drop a file here99 chars · 99 bytes · 7 lines
JSON locals
Tip: drop a file here45 chars · 45 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 Pug to HTML

Render a safe Pug subset with JSON locals. Start with the sample, select the options and run the tool. Copy or download the result after reviewing it.

Behavior and limits

Render a safe Pug subset with JSON locals. Supports tags, attributes, escaped interpolation, array loops and conditions. Function calls, executable JavaScript, includes, extends, mixins and filters are rejected. Unescaped interpolation is still HTML-escaped. Preview scripts and external resources are blocked.

Example input

doctype html
html
  body
    h1 Hello #{user.name}
    ul
      each item in items
        li= item
JSON locals
{"user":{"name":"Ada"},"items":["One","Two"]}

Expected behavior for the example

Produces a page with Hello Ada and two list items, One and Two.

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 Pug to HTML handle my input?

Render a safe Pug subset with JSON locals. Supports tags, attributes, escaped interpolation, array loops and conditions. Function calls, executable JavaScript, includes, extends, mixins and filters are rejected. Unescaped interpolation is still HTML-escaped. Preview scripts and external resources are blocked.

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.