Fable

Fable alternatives

Fable is a free, open-source compiler for using F# across several targets: JavaScript and TypeScript are stable, Dart and Python beta, Rust alpha, and PHP and Beam experimental. The web-based tool can import JavaScript modules and NPM packages.

These alternatives suit people who need a different source language, broader browser or server options, faster JavaScript builds, or code translation across languages.

  1. JJava source-to-source compiler for TypeScript and JavaScriptAPIOpenFree

    JSweet uses Java as its source language rather than F#. Java programs become TypeScript or JavaScript for browsers, mobile Web views and Node.js, with Oracle's Java compiler and Microsoft's TypeScript compiler producing type-checked output. Generated code can work directly with JavaScript programs and libraries. This fits teams with Java code or Java language features who want web targets without Fable's F# and .NET setup.

    Trade-off: The move means leaving behind F# features and Fable's collection of target languages. Suits: Teams with Java code aimed at browsers, mobile Web views or Node.js.

  2. SJScala-to-JavaScript compiler for browser, Node.js and serverless appsAPIOpenFree

    Scala.js turns Scala programs into JavaScript for browsers, Node.js and serverless environments. Strong typing catches mistakes such as mixing strings and numbers, while JavaScript libraries and APIs remain available through typed or dynamic access. Its ecosystem includes React, Angular, Vue, Three.js and Chart.js integrations. Choose it when Scala and those JavaScript integrations matter more than F# targets.

    Trade-off: Adopting Scala replaces F# and leaves out Fable's Python, Dart, Rust, PHP and Beam targets. Suits: Teams using Scala for browser, Node.js or serverless software.

  3. JOOCaml bytecode-to-JavaScript compiler for browsers and Node.jsAPIOpenFree

    Js_of_ocaml takes OCaml bytecode and emits JavaScript that runs in browsers or Node.js, using an existing OCaml installation without recompiling libraries. Its library supplies bindings for much of the browser API and a typed bridge between OCaml and JavaScript values. It is a focused choice for OCaml projects that need JavaScript delivery rather than Fable's F#-based, multi-target workflow.

    Trade-off: The workflow centers on OCaml-to-JavaScript rather than F# and Fable's broader target set. Suits: OCaml developers delivering applications to browsers or Node.js.

  4. CConcise language that emits modern JavaScriptAPIOpenFree

    CoffeeScript uses its own syntax and produces equivalent JavaScript without an interpreter at runtime. CoffeeScript 2 emits modern syntax such as classes and arrow functions, and existing JavaScript libraries can be used from either language. It suits teams wanting a concise JavaScript-oriented language and direct library access, but it does not provide Fable's TypeScript, Python, Dart, Rust, PHP or Beam targets.

    Trade-off: Only JavaScript is produced, so F# features and Fable's additional targets are not part of the deal. Suits: Web developers seeking a concise language centered on JavaScript.

  5. BJavaScript compiler for current and older browser environmentsAPIOpenFree

    Babel works from modern JavaScript source, not F#, and rewrites it for current or older browsers and other environments. Its toolchain transforms syntax, can add third-party polyfills such as core-js, performs codemods, and converts React JSX. Pick it when your project is already JavaScript or React-based and needs broad environment compatibility, instead of Fable's F# source and cross-language targets.

    Trade-off: Babel does not compile F# or offer Fable's targets outside JavaScript and TypeScript. Suits: JavaScript and React teams supporting a range of browser versions.

  6. SFast platform for compiling JavaScript and TypeScriptAPIOpenFree

    SWC turns JavaScript and TypeScript into code for major browsers, while also providing minification, WebAssembly transforms, custom plugins and webpack, Rspack and Jest integrations. It is aimed at development tooling and reports faster compilation than Babel. Choose it for a JavaScript or TypeScript build pipeline, not for F# source or Fable's broader target list.

    Trade-off: You lose F# input and Fable's language targets beyond JavaScript and TypeScript. Suits: JavaScript or TypeScript teams needing fast build tooling.

  7. SCross-language code search and AI-assisted migration serviceAPIOpenFree

    SourceMeld works across more than 20 programming languages, offering semantic search, similar-pattern discovery and AI-assisted migration. Its migration tools suggest translations, map dependencies and provide side-by-side comparison and validation. This is better for finding and moving code between languages than Fable's compiler workflow, but it is a freemium API or self-hosted service rather than a free open-source compiler.

    Trade-off: It is freemium and focused on migration, not F# compilation into application targets. Suits: Teams searching or migrating code across many languages.

  8. COpen-source backend for translating code with language modelsAPIOpenFree

    CodeTransEngine translates code across programming languages with large language models. It supports direct translation, few-shot prompting and other algorithms, distributed inference through vLLM, OpenAI-compatible APIs, and test-case evaluation in Singularity containers. It fits teams needing translation and automated checking rather than Fable's predictable F# compiler output and library workflow.

    Trade-off: Model-based translation is a different workflow from Fable's compiler and target guarantees. Suits: Teams translating code between languages and evaluating results.

More near it on Code Transpilers

  1. 27
    PR
    PureScript Registryregistry.purescript.org

    The PureScript Registry stores PureScript packages and metadata and provides an API for package operations.

    5.2 APIOpenFree —
  2. 26
    S
    Sucrasesucrase.io

    Sucrase is a fast alternative to Babel for development builds targeting modern JavaScript runtimes.

    5.7 APIOpenFree Free tier
  3. 25
    K
    Kalaigithub.com

    Kalai is a source-to-source transpiler that converts Clojure code into other programming languages.

    5.7 APIOpenFree Free tier
  4. 23
    T
    TeaVMteavm.org

    TeaVM is an ahead-of-time compiler that turns Java bytecode into JavaScript and WebAssembly for browsers.

    6.0 APIOpenFree Free tier
  5. 22
    M
    Mitosismitosis.builder.io

    Mitosis transforms JSX components into components for multiple frameworks.

    6.0 APIOpenFree Free tier
  6. 21
    V
    Valavala.dev

    Vala is a programming language for native application development that compiles to C and produces native binaries.

    6.1 APIOpenFree Free tier
  7. 20
    C
    Cythoncython.org

    Cython is an optimising static compiler for Python and the extended Cython language, used to write C extensions for Python.

    6.1 APIOpenFree Free tier
  8. 19
    J
    J2ObjCdevelopers.google.com

    J2ObjC is an open-source command-line tool from Google that translates Java source code to Objective-C for iOS.

    6.1 APIOpenFree Free tier
  9. 18
    R
    ReScriptrescript-lang.org

    ReScript is a strongly typed language that compiles to clean, efficient JavaScript.

    6.1 APIOpenFree Free tier
  10. 15
    O
    Opalopalrb.com

    Opal is a Ruby-to-JavaScript source-to-source compiler that includes an implementation of Ruby corelib and stdlib.

    6.3 APIOpenFree Free tier
  11. 14
    KJ
    Kotlin/JSkotlinlang.org

    Kotlin/JS transpiles Kotlin code, the Kotlin standard library, and compatible dependencies to JavaScript.

    6.3 APIOpenFree Free tier
  12. 12
    B
    Brythonbrython.info

    Brython implements Python 3 in the browser and lets developers run Python code in HTML pages.

    6.3 APIOpenFree Free tier
  13. 11
    S
    Skulptskulpt.org

    Skulpt is an entirely in-browser implementation of Python.

    6.3 APIOpenFree Free tier
  14. 10
    TP
    TypeScript Playgroundtypescriptlang.org

    TypeScript Playground is an online environment for writing and sharing TypeScript-like code.

    6.3 APIOpenFree Free tier
  15. 9
    DP
    Dart pubdart.dev

    Pub is Dart’s package manager for managing package dependencies.

    6.3 APIOpenFree Free tier
  16. 8
    C
    ClojureScriptclojurescript.org

    ClojureScript is a compiler for Clojure that emits JavaScript.

    6.4 APIOpenFree Free tier

Questions

Is Fable free and open source?

Yes. Fable is free, open source and available on the web.

Which Fable targets are stable?

JavaScript and TypeScript are the stable targets; Dart and Python are beta, Rust is alpha, and PHP and Beam (Erlang) are experimental.

Can Fable use JavaScript packages?

Yes. F# code can import JavaScript modules and use NPM packages. JavaScript dependencies are listed in package.json.

What Python version does Fable require?

Python 3.12 or later is required for Fable's Python target; Python 3.10 and 3.11 are deprecated.

Do all NuGet libraries work with Fable?

No. Compatibility varies by library, so check whether a NuGet package supports Fable before adopting it.

Does Fable have an online editor?

Yes. The Fable homepage links to an online Fable REPL.