PhpStorm 2023.3 Help

Use AI to convert files to another language

With AI Assistant, you can convert your code from one programming language to another.

Convert the whole file to another language

  1. Open a file you want to convert, place the caret anywhere in the editor, and right-click to open the context menu.

    Alternatively, press Alt+Enter.

  2. Select AI Actions and then Convert File to Another Language.

    Convert File to Another Language action in context menu
  3. In the list that opens, select the language you want to convert the current file to.

    Target Language list

    After the conversion, the converted file replaces the original file. Also, the file extension changes to the language of conversion.

    Converted file with updated extension
Last modified: 20 February 2024