Lua Minifier

Transform text and structured data locally in your browser.

Minifying Lua safely

The minifier tokenises the source, so it removes -- line comments and --[[ ]] block comments without touching strings or [[long strings]], then drops every space that is not needed between tokens. It keeps a space where two tokens would otherwise merge, such as 2- -3 or 1 .."". local a = 1 + 2 plus print( a ) becomes local a=1+2 print(a).