Works on this device. File exports run online.
Code Inspector
Paste code and the page checks it as you type: the first syntax error with its line and column, every bracket that does not match, the complexity of each function, and the indentation. JavaScript, JSON, YAML, XML and CSS are checked in your browser; Python is checked by Python’s own parser on the server.
Inspect code
Syntax
Brackets
Complexity
Indentation
How to check your code
- Paste the code into the box, or press Or open a code file.
- Leave Language on Find out from the code, or choose it.
- Read the four results under the box: syntax, brackets, complexity and indentation. Press line … to jump to a problem in the box.
- For Python, press Check Python in the box below the inspector.
What each check means
- Syntax: whether the code can be read at all, by the rules of the language: JavaScript up to ES2025 (as a module or a classic script), JSON (RFC 8259), YAML 1.2, XML 1.0 with namespaces, and the structure of CSS (comments, strings, blocks and property: value declarations). The first error is shown, because what follows it cannot be read reliably.
- Brackets: every ( [ { with its closing ) ] }, skipping brackets inside strings and comments. Choose the comment style (C, Java and JavaScript; Python; SQL; or none) if the language is not one of the above.
- Complexity (cyclomatic): 1 for each function, plus 1 for each if, loop, case, catch, conditional (?:), &&, || and ??, and default value. Up to 10 is simple, 11 to 20 moderate, 21 to 50 complex, above 50 very hard to test.
- Indentation: tabs and spaces mixed in one indent, files that use both, the indent step and lines off it, and spaces at line ends.
Worked example
The sample has two functions. total has a complexity of 5: 1, plus the for loop, the if, the && and the ?: operator. shipping has 4: 1, plus the default value of country, the ?: and the ||. Delete the last } of total and the bracket check reports: This { is never closed, at line 2.
Limits you should know
- Syntax checks find code that cannot be read, not mistakes in what it does: a misspelt variable or a wrong type is valid syntax.
- The running time (big-O) of code cannot be worked out reliably by reading it, so it is not shown.
- CSS property names and values are not checked; PHP, Java, C# and SQL syntax are not checked here (the bracket check works for them).
Privacy
The browser handles the local checks. Choosing Check Python sends the code to Toolvito for syntax parsing. The parser checks the code without executing it. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.