Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Lua Beautifier

Use our Lua beautifier to format messy code neatly. Beautify your code quickly and copy the output for commits and docs. Fast and simple to use.

Lua Beautifier



Last updated: February 26, 2026

Created by: Eon Tools Dev Team

Reviewed by: Sugam Baskota



What this does

So you have got some Lua, maybe pulled from a game script or a config, and it is crammed together with no indentation, making the logic hard to trace. This beautifies it. Paste your Lua, click Beautify, and you get it back indented around its blocks so it reads cleanly.

How to use it

  1. Paste your Lua code into the box.
  2. Click Beautify.
  3. Copy the beautified code with the Copy button.

How it works

The tool runs your Lua through a beautifier that re-indents the code around its block structure. Lua marks out blocks with keywords, the likes of function and end, if and then, do and for, and the beautifier uses those to work out what should be indented and by how much. Everything happens in your browser, so the script you paste stays with you.

Why blocks need indenting

Lua turns up in a lot of places: game engines, embedded scripting, configuration. The code you run into is not always tidy. Because Lua structures its logic with paired keywords rather than braces, indentation is what makes that structure visible, a function body stepped in from its function and end, a loop stepped in from its for, and so on. Run a flat block through and those layers reappear, so you can follow what the code is doing.

It is a beautifier, so it works on how the code looks. It re-indents your code, it does not check it for errors or run it.

Questions people ask

Does beautifying change how my Lua runs?

No. It only changes indentation and spacing. The code does exactly what it did before.

What does it base the indentation on?

Lua's block keywords, such as function, end, if, and do. The beautifier uses them to decide what sits inside what.

Will it catch mistakes in my code?

No. It is a beautifier, not a checker. It tidies the layout but does not look for errors.

Is my code uploaded?

No. It runs in your browser, so the Lua you paste stays on your machine.

References

  1. Lua.org. Lua 5.4 Reference Manual. https://www.lua.org/manual/5.4/


Sugam Baskota

Sugam Baskota is a senior software engineer and Computer Science graduate from UT Arlington, with interests in user scripts, browser extensions, developer tooling, and productivity systems. He spends time building practical utilities and extensions in the kinds of workflows Eon is designed to simplify. At Eon Tools, he reviews useful, password, and developer tools.