ToolFeather
Developer / SEORuns in your browser

Lua Syntax Checker

Paste Lua code and instantly find syntax errors — with the exact line and column of the first problem.

Quick presets

Lua Syntax Checker

Lua code–
Report
—
–

Globals used accidental globals are a common Lua bug

Runs in your browser — nothing you enter is uploaded or stored.

ToolFeather · Line-level errors
Scratchpad auto-saved
Stored in this browser (localStorage)

About the Lua Syntax Checker

Lua's error messages at runtime can be terse, and in environments like Roblox a single misplaced end or missing then can stop a whole script. This checker parses your Lua the same way an interpreter's front-end does and reports the first syntax error with its exact line and column, so you can jump straight to it — before you run the code.

Paste your code and press check. If it's well-formed you get a clear "valid" confirmation; if not, you see exactly where parsing failed and why (an unexpected token, an unclosed block, a missing keyword). It validates structure and grammar — it doesn't run the code, so it won't catch logic bugs or undefined variables at runtime.

Parsing happens entirely in your browser using a Lua parser, so your scripts are never uploaded — safe for game code and proprietary logic alike.

Examples

Missing end → "unexpected end of file" with the line pinpointed.
if x then with no closing → the exact line of the unclosed block.
Valid script → a clean "✓ Valid Lua" confirmation.

Common Lua syntax errors and how to fix them

Error messageLikely causeFix
'end' expectedAn if / for / while / function block was never closedAdd the matching end
'then' expectedAn if or elseif has no thenPut then after the condition
unexpected symbol near '='Used = (assignment) where == (comparison) was meantUse == inside conditions
unfinished stringA quote was never closedClose the string, or escape a stray quote
malformed numberAn invalid numeric literalFix the number (e.g. no double dots)
'<name>' expectedA keyword or identifier is missingCheck for a missing variable or keyword

Lua reserved keywords

Using one of these as a variable name causes a syntax error: and break do else elseif end false for function goto if in local nil not or repeat return then true until while.

Frequently asked questions

8 answers
Does this run my Lua code?
No — it only parses it to check the grammar and structure. That makes it safe and instant, but it means it catches syntax errors, not runtime errors like calling a nil value or logic mistakes.
Does it support Roblox Luau?
It parses standard Lua (5.1–5.3) grammar, which covers the vast majority of scripts. Some Luau-specific syntax (like type annotations) isn't standard Lua and may be flagged; for pure syntax checking of ordinary Lua it works well.
What does the line and column mean?
They point to where the parser first couldn't continue — usually at or just after the real mistake. Check that line and the ones just above it for a missing keyword, bracket or 'end'.
Is my code uploaded anywhere?
No. Parsing runs entirely in your browser, so your scripts never leave your device.
Why does it stop at the first error?
Lua parsers report the first point where the grammar breaks. Fix that error and re-check to reveal any later ones.
What Lua versions does the checker support?
It parses standard Lua 5.1–5.3 grammar, which covers the overwhelming majority of scripts including most Roblox code. Purely Luau-specific extensions (such as type annotations) aren't standard Lua and may be reported.
Why does the error point to the line after my mistake?
Parsers report the point where the grammar first can't continue, which is often the line after a missing 'end', 'then' or closing bracket. Check the flagged line and the ones just above it.
Does a 'valid' result mean my script will run correctly?
It means the syntax is well-formed. It won't catch runtime errors (calling a nil value, wrong argument types) or logic bugs — only that the code parses.