Toolvito

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

Check Python on the server

Check Python (Python’s own parser)

The Python in the box above is read by Python’s own parser and tokenizer on the server: the first syntax, indentation or tab error with its line, the complexity of every function, and the indentation. The code is never imported or run.

When you run a task here, Toolvito receives the information you submit for processing. 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.

How to check your code

  1. Paste the code into the box, or press Or open a code file.
  2. Leave Language on Find out from the code, or choose it.
  3. Read the four results under the box: syntax, brackets, complexity and indentation. Press line … to jump to a problem in the box.
  4. 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.

Related tools