Toolvito

Processed online by Toolvito

Programming Language Converter

Paste your code and choose the direction. The converted code is shown only when it parses without errors and keeps the names of your classes and functions.

Choose what to do

Task
Convert code with AI

Up to 4,000 characters: one class or a few functions.

Your code is sent to the Toolvito server and parsed there; it is never run. AI conversions are written by a language model that runs on the server itself. Nothing is sent to another company. 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.

What you can do

  • Convert code with AI: Java to Kotlin, Kotlin to Java, JavaScript to TypeScript, Java to TypeScript or TypeScript to Java, up to 4,000 characters at a time (one class or a few functions). A language model that runs on the Toolvito server writes the code; then code checks it.
  • Convert TypeScript to JavaScript: the types are removed from the parse tree, without AI. Enums become a plain object, and constructor parameter properties become this.x = x. You can keep every line and column where it was.
  • Check the syntax of JavaScript, TypeScript, TSX, Java or Kotlin: each error with its line and column, and JSX closing tags that do not match.
  • See type conversions: what Number(), parseInt(), parseFloat(), String(), toFixed() and Boolean() give for your values, with TypeScript code to copy.

How the AI result is checked

  1. Your code must parse first. Fix syntax errors before you convert.
  2. The answer is parsed in the new language. If it has syntax errors, the model gets one more try with the error positions. You see code only when it parses.
  3. Every class, interface, enum, function, method and field of your code must be in the answer (a Java getName() may become the Kotlin property name).
  4. The answer may add no numbers (other than 0 and 1) and no texts that your code does not have.
  5. From JavaScript to TypeScript, the types are removed from the answer again by code and the result is compared with your JavaScript. A difference is shown as a note.

What it does not do

It does not compile, type-check or run your code, and it converts one file at a time, not a whole project. Build and test the result before you use it. For TypeScript types, run the TypeScript compiler.

Type conversions in TypeScript

TypeScript types are removed before the code runs, so converting a string to a number works as in JavaScript: Number(value) needs the whole text to be a number (empty text gives 0), parseInt(value, 10) reads the digits at the start, and parseFloat(value) reads a decimal number at the start. Try your own values with See type conversions.

Related tools