Works on Windows, Mac, Linux, iPhone, iPad and Android, nothing to install.
What is Syntax Coder?
Syntax Coder rewrites a program in another programming language so that it does the same job. Paste code written in Python, C, C++, C#, Java, JavaScript, TypeScript, Go, Rust, PHP, Ruby, Lua, BASIC, Visual Basic, Pascal, Fortran or COBOL, pick a target, and you get the matching program in any of 62 languages: modern ones such as Python, Java, C#, Go, Rust, Swift and Kotlin, scripting languages such as PHP, Ruby, Lua, Perl, Bash and PowerShell, data languages such as R, Julia, MATLAB and SQL, classic ones such as line-numbered BASIC, QBasic, Visual Basic, VBA, Pascal, Fortran, COBOL, ALGOL 68, Ada and Smalltalk, functional and logic languages such as Haskell, F#, Elixir, Scheme and Prolog, home-computer BASIC and assembler for the Commodore 64, BBC Micro and Z80, and robot and PLC languages (Arduino, URScript for Universal Robots, ABB RAPID, KUKA KRL, FANUC KAREL, Staubli VAL3 and IEC 61131-3 Structured Text; logic only, robot motion is not converted). A Sort by box lists the languages A to Z, by type, by era (with the year each first appeared) or in popular groups.
It goes all the way down too. Syntax Coder can turn a program into x86-64 assembler and into real machine code: the bytes a 64-bit Linux PC runs, shown next to each instruction, with a button to download them as a working program.
It is not a text search-and-replace and it is not an AI guess. Syntax Coder reads your program the way a compiler does, works out what each line means, then writes that meaning out in the new language, so loops, conditions, functions, input and output all behave the same.
Why use it?
Learning a second or third language is much easier when you can see a program you already understand written side by side in the new one. Every converted program keeps your comments and your variable names, so you can line the two up and learn the new keywords, types and punctuation one line at a time.
It is also a quick way to move a small routine from an old system to a new one: an old QBasic or Pascal calculation into Python, a Python check into C# or Java, or a loop into a SQL procedure. Each conversion comes with plain notes on anything that needs a human look, such as text joins in C or recursion in COBOL.
The Check it panel runs your original program in the page and shows what it prints, so you know exactly what the converted program should print as well.
How to use it
- Paste your code into the left box, or choose an example to see how it works.
- Leave From on Auto-detect, or pick the language your code is written in.
- Choose the language you want in To. The converted program appears straight away and updates as you type.
- Read the notes under the result, then press Copy or Download.
- Open Check it, type any input values one per line, and press Run to see what the program prints.
Tips:
- Keep to the core: variables, numbers, text, if / else, while, for and repeat loops, functions, print and keyboard input all convert. Lists, classes, files and libraries are not converted yet.
- Machine code: works with whole numbers. Press Download Linux program, then run chmod +x program and ./program on any 64-bit Linux computer.
- Swap: the arrow button swaps the two languages so you can convert the result back again.
When to use it
- When you are learning a new language and want to see familiar code written in it.
- When you are teaching and want one example shown in several languages.
- When you need to move a small calculation or routine from an old program to a new one.
- When you are curious what your code looks like as assembler, or as the bytes a processor actually runs.
Common questions
Which languages can it read and write?
It reads 17: Python, C, C++, C#, Java, JavaScript, TypeScript, Go, Rust, PHP, Ruby, Lua, classic BASIC and QBasic, Visual Basic and VBA, Pascal or Delphi, Fortran and COBOL. It writes 62: all of those plus Swift, Kotlin, Perl, R, Julia, Bash, PowerShell, MATLAB or Octave, PostgreSQL and SQL Server SQL, x86-64 assembler and machine code, Dart, Scala, Zig, Objective-C, F#, Haskell, Elixir, Scheme, Prolog, Tcl, Forth, Logo, ALGOL 68, Ada, Modula-2, Smalltalk, VBScript, AutoHotkey, Windows Batch, Commodore 64 BASIC, BBC BASIC, and ARM64, 6502 and Z80 assembler, plus robot and PLC languages (Arduino, URScript for Universal Robots, ABB RAPID, KUKA KRL, FANUC KAREL, Staubli VAL3 and IEC 61131-3 Structured Text; logic only, robot motion is not converted). Use Sort by to list them A to Z, by type of language, by era or in popular groups.
Is C+ a language?
No. People usually mean C or C++, and both are here. C# (C sharp) is a separate language from Microsoft, and it is here too.
Does my code leave my computer?
No. Reading, converting and running all happen inside your browser. Nothing you type is uploaded.
Will the converted program always give exactly the same output?
For the parts it converts, yes, apart from small differences in how languages show decimals (2.5 against 2.500000, for example). Anything that cannot be matched exactly is listed in the notes.