Loadstring from Source

Processed in your browser

Paste Lua or Luau source and get a loadstring that embeds the code directly — no remote URL required.

Source

Lua source

Waiting for source

Paste the Lua body only — Labmorf adds the loadstring wrapper.

Output

Generated loadstring

0 charactersLua / Luau

Inline loadstring vs HttpGet

Some executors and test snippets need the script body in the file itself instead of fetching it with game:HttpGet. Labmorf wraps your source in a long-bracket literal so quotes and nested brackets inside the code stay valid.

Optional protected execution adds the same pcall wrapper used by the URL generator. Nothing is uploaded — the wrapper string is built entirely in your browser.

Frequently asked questions

When should I use source mode instead of a URL?

Use source mode for short scripts, local testing, or when you already have the Lua text and do not want to host it online. Use the URL generator when the script lives on GitHub or another raw host.

How are quotes handled inside my code?

Labmorf uses Lua long-bracket literals ([=[ ... ]=]) and picks a bracket level that does not appear inside your source.

Does Labmorf run my code?

No. It only formats the loadstring wrapper. Execution happens only if you paste the output into an executor.

Related tools