Renamed in this browser

Locals and parameters become short names. Comments go away. print, strings, and names after a dot or colon stay. This does not encrypt the script.

Help Us Improve

—

(—)

Obfuscate Lua source

Rename locals in pasted Lua, strip comments, and minify the source. Globals stay readable. Free, with no signup.

What this Lua obfuscator does

Lua Obfuscator renames local variables and parameters, removes comments, and drops extra spaces. Global names such as print, strings, and names after a dot or colon stay as written. The result is harder to skim. It is not encrypted, and someone who reads Lua can still follow it.

What changes in the paste

Names, comments, and spaces. Not the strings.
  • Lua obfuscator

    Each local and parameter becomes a short name such as _0 or _1.

  • Comments removed

    Line comments and long comments are dropped. Text inside strings stays.

  • Globals left in place

    print, pairs, and other names that were not declared local stay readable.

  • Copy or download

    Copy the result, download a .lua file, or open it in a new tab.

How to obfuscate Lua

Paste one snippet. The renamed copy updates as you type.
  1. Paste Lua

    The sample is a local function with a comment. Replace it with your own source.

  2. Read the result

    Locals are short names. print and the quoted text are still there.

  3. Copy it

    Copy, download, or open the result. The page does not save it.

What this does not hide

A shorter name is not a secret.
  • Strings stay readable

    Quoted text and long brackets are copied as written, including words that look like names.

  • A global function name stays

    function greet() keeps greet, because other code may call it. local function greet is renamed.

  • Keep the paste under 100,000 characters

    Longer source is refused so the page stays responsive.

When you want the paste harder to skim

One snippet, in the browser.
  • A local helper

    Shorten the local names before you paste the snippet somewhere public.

  • A comment-heavy sample

    Drop the comments and the extra blank lines in one step.

  • A quick look at the difference

    Compare the source and the result on this page. Nothing is uploaded.

What you get

Renamed locals, still the same script.
  • No signup

    Paste and copy. There is no account step.

  • Free

    The result has no watermark.

  • Nothing is uploaded

    Renaming runs in the browser.

What the renamer covers

Locals, parameters, and comments.
  • Renamed

    local names, function parameters, and for-loop names, each in its own block.

  • Left as written

    Keywords, globals, table fields, method names, and strings.

  • Limit

    100,000 characters. A string or long comment that never closes stops the page.

Sources & References

What obfuscation means, and which Lua names are local.
  • “In software development, obfuscation is the practice of creating source or machine code that is intentionally difficult for humans or computers to understand.”
    — Wikipedia — Obfuscation (software)

    Obfuscation makes code harder to read: This page shortens local names and removes comments. It does not make the script impossible to read. en.wikipedia.org/wiki/Obfuscation_(software)

  • “Any variable name is assumed to be global unless explicitly declared as a local (see §3.3.7). Local variables are lexically scoped: local variables can be freely accessed by functions defined inside their scope (see §3.5).”
    — Lua 5.4 Reference Manual — Variables

    Lua treats undeclared names as global: Only names declared local are renamed. A global such as print stays, so the script can still call it. lua.org/manual/5.4/manual.html#3.2

Frequently Asked Questions

Quick answers about this tool—open a question to read more.