Toolvito

Works on this device. File exports run online.

Code Syntax Checker

Paste code or choose a file. The checker reads it with the language’s own rules and shows the first syntax error with its line and column, or says that the syntax is right. The code is only read, never run.

Check the syntax

Check Python, Bash or sh

Check Python, Bash or sh

Sends the code in the box above to the Toolvito server, where the language’s own parser reads it. Nothing is run.

More options

The Python version the code must run on. 3.8 to 3.11 are checked best-effort.

JavaScript, JSON, YAML, XML and TOML checks run in your browser. Choosing Check on the server sends the code in the box to Toolvito. 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 code

  1. Paste the code or choose a file. The language is found from the file name or the first line; you can also choose it.
  2. JavaScript, JSON, YAML, XML and TOML are checked at once in your browser.
  3. For Python, Bash and sh, press “Check on the server” below: their own parsers (Python’s ast module, bash -n, dash -n) read the code on the Toolvito server.
  4. Press the line number to go to the error, fix it and check again.

Which checker reads which language

  • JavaScript: acorn 8.19.0, with the newest ECMAScript syntax it knows, as a script or as a module (import and export). JSX and TypeScript syntax (such as type annotations) is not JavaScript and is reported as an error.
  • JSON (RFC 8259), YAML 1.2, XML 1.0 (well-formed, no DTD check) and TOML 1.0: the readers of this site.
  • Python: ast.parse of Python 3.12 on the server, with the grammar of Python 3.8 to 3.12 (older grammars are best-effort, as the Python documentation says). Warnings such as an invalid escape sequence are listed too.
  • Bash: GNU bash 5.2 with -n, which reads the commands without running them; tick extglob for patterns such as +(…). POSIX sh: dash with -n, so Bash-only syntax such as arrays is an error there.

Limits you should know

  • Each parser reports the first syntax error only. Bash and sh give the line, not the column.
  • Only the syntax is checked: a misspelt variable, a wrong type or a missing file is found only when the code runs, and nothing is run here.
  • PHP, Ruby, Go and other languages are not checked here.

Related tools