Documentation
Learn more about BeautifyLua, its features, and the differences between Lua and Luau.
About BeautifyLua
BeautifyLua is designed to be a simple, fast, and highly-configurable code formatter for both standard Lua (5.1+) and Luau, the dialect used by Roblox. Our goal is to provide a developer-friendly tool that helps maintain a consistent code style across your projects, improving readability and maintainability.
The tool uses a powerful AI model to parse your code and re-print it according to modern best practices, running entirely in your browser to ensure your code remains private and secure.
Lua vs. Luau
While Luau is a superset of Lua 5.1, it introduces several new syntax features and type annotations. BeautifyLua is trained to handle both gracefully.
-- Luau with types
local function add(a: number, b: number): number
return a + b
endlocal x = 10
x += 5 -- x is now 15When you toggle between Lua and Luau modes in the editor, the formatter adjusts its parsing and formatting rules to accommodate these differences automatically.