Why convert LUAU to HTML?
People convert Luau to .HTML to publish, document, or share code with color-coded syntax on a website or in a blog post. The HTML is purely presentational: it preserves every character of the original source but renders it as a formatted, browser-viewable page.
How to convert LUAU to HTML
Pygments (command line) OPEN-SOURCE
Install with pip install Pygments, then run pygmentize -l lua -f html -O full,style=default -o out.html script.luau to produce a complete highlighted page. Luau uses the lua lexer.
VS Code (copy as HTML) EASIEST
Open the .luau file, install a "Copy With Syntax Highlighting" extension, then copy the styled selection and paste it into an .html file.
About these formats
A .luau file is a plain-text source code file written in Luau, the scripting language Roblox derived from Lua 5.1 with an added gradual type system. It holds the code that drives Roblox…
Open .LUAU details →An HTML file is a web page - plain text with markup tags that a browser turns into the formatted page you see. To view it, double-click and it opens in your browser (Edge, Chrome, Firefox,…
Open .HTML details →Quality & what to watch
- The HTML is read-only; it displays the code but cannot run it.
- Luau is highlighted with a Lua lexer, so a few Luau-only tokens (type annotations, string interpolation) may color imperfectly.
- Highlighting adds
<span>wrappers and CSS, so the output is far larger than the plain source.
Frequently asked questions
Will the HTML run my Luau code?
Which language should I pick in the highlighter?
Can I embed the result in an existing page?
full option in Pygments) and add the stylesheet once.