- What is StyLua?
- StyLua is the most widely used code formatter for Lua. It reads your code and prints it back with one consistent layout, much like Prettier does for JavaScript. This tool runs StyLua, compiled to WebAssembly, in your browser.
- How do I format Lua code online?
- Paste your Lua into the input box, pick your indentation and quote style, then click Format. The clean version appears below. Click the copy button to copy it, or download it as a .lua file.
- Can I format Roblox scripts?
- Yes. StyLua understands Luau, the version of Lua that Roblox uses, including type annotations and compound operators like +=. Paste your script from Roblox Studio, format it, and paste it back.
- Does formatting change how my code runs?
- No. Formatting only changes indentation, spaces, line breaks, and the quote characters around strings. The string values themselves stay the same, so your code runs exactly as before.
- Which versions of Lua are supported?
- Lua 5.1, 5.2, 5.3, and 5.4, LuaJIT, and Luau. That covers Roblox, LÖVE, Neovim configs, World of Warcraft addons, and most other places Lua is used.
- Is my Lua code kept private?
- Yes. StyLua runs entirely in your browser as WebAssembly. Your code is never uploaded to a server or saved anywhere, so you can safely paste in code from a private project. Once the page has loaded you can even use it offline.