What is the difference between Jade and Pug?
They are the same template language. Jade was renamed to Pug in 2016 after a trademark dispute with a Canadian company that owned the Jade name. Any document written in Jade syntax compiles identically with the modern pug npm package — the keywords, indentation rules, and shorthand selectors are unchanged.
How does Jade indentation translate to HTML nesting?
Pug uses whitespace instead of closing tags. Each indent level becomes one level of HTML nesting. The converter detects the indent step (commonly 2 spaces) and emits matching </tag> closers when indentation decreases. Mixing tabs and spaces breaks parsing — pick one and stick to it.
Does the converter handle Pug class and id shorthand?
Yes. div.card becomes <div class="card">, h1#hero becomes <h1 id="hero">, and a.btn.primary becomes <a class="btn primary">. Standalone .card with no tag defaults to <div class="card"> per the Pug specification.
Can it compile Pug mixins, includes, or extends?
No. File-based directives (include, extends, block) require a file system to resolve, which a browser-based tool cannot access. For mixin and inheritance compilation, run the pug CLI locally or use a Node.js build step. This converter handles the indent-to-HTML transformation that 90% of Pug snippets need.
What happens to Pug interpolation like #{variable}?
Interpolation tokens like #{name} or !{html} require runtime variables. This converter outputs them as literal text in the HTML, so you can review the structure. To produce final HTML with values substituted, run pug.compile() in Node.js with a locals object.
Is my template uploaded to your servers?
No. Jade-to-HTML compilation runs entirely in your browser. Templates containing proprietary layouts, internal copy, or product names never leave your device. Open DevTools Network tab and click Run — no requests are made.
Why does my Pug fail with "unexpected token"?
The two most common causes are mixed tabs and spaces (Pug forbids mixing) and inconsistent indent depth (a child indented 3 spaces under a parent indented 2 spaces). Check your editor settings — most editors can replace tabs with spaces and show a visible indent guide.
Can the converted HTML be used without a Node.js server?
Yes. The output is plain HTML5 — no Pug runtime, no Node.js, no build step. Drop it into any web server, static host, CDN, or email template. This is the main reason developers compile Pug ahead of time: serve a small HTML file, not a runtime template engine.