.pug
🌐 WebText-based

.pug File — Pug Template

text/x-pug

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

PUG

Drop a .pug file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-pug

Quick Facts

Extension.pug
Full NamePug Template
MIME Typetext/x-pug
CategoryWeb
TypeText-based (human-readable)
Typical Size1 KB – 20 KB
First Appeared2010

What Is a .pug File?

Pug (formerly Jade) is a high-performance template engine for Node.js that uses significant whitespace and a concise syntax to generate HTML. PUG files eliminate the need for closing tags, angle brackets, and much of HTML's verbosity — an element is defined by its tag name, followed by optional classes (.class), IDs (#id), and attributes in parentheses, with content after a space or on indented lines below. Pug supports mixins for reusable template blocks, includes for template composition, extends/block for template inheritance, conditionals, loops, and inline JavaScript. The format compiles to HTML and is used in Express.js applications, static site generators, and email template systems. Pug's concise syntax can represent complex HTML structures in significantly fewer lines than raw HTML. The engine was renamed from Jade to Pug in 2016 due to a trademark issue. While Pug's non-HTML syntax requires learning, developers who adopt it often find it dramatically more productive for writing HTML-heavy templates. The format supports filters for embedding other languages (Markdown, CoffeeScript) and can produce pretty-printed or minified HTML output.

How to Open .pug Files

VS Code
WebStorm
Sublime Text
any text editor

Related File Extensions

More Web File Extensions

Other web formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.