js_of_ocaml
js_of_ocaml: A focused OCaml-to-JavaScript compiler with browser bindings and Dune support. Ranked #19 of 28 in Code Transpilers by our editors (7.2/10); pricing: Open source; best for OCaml developers targeting browsers or Node.js.
At a glance
- Editor score7.2 / 10
- PricingOpen source
- Best forOCaml developers targeting browsers or Node.js
- Paid fromFree
- Intermediate outputNo
- Facts checked22 Sep 2026

Where it wins
- Compiles OCaml bytecode for browsers and Node.js
- Includes browser API and JavaScript value bindings
- Supports Dune, PPX extensions, Lwt and JSON derivation
Where it doesn't
- Requires compiling programs with OCaml bytecode tools first
- Its scope is centered on OCaml-to-JavaScript workflows
- Support channels are documentation and community
Our verdict on js_of_ocaml
js_of_ocaml turns OCaml bytecode programs into JavaScript for execution in web browsers and Node.js. It is aimed at OCaml developers who want to bring OCaml programs to those environments, including solo developers and small teams. The project is open source and distributed as packages through opam. Its workflow has two stages: compile with OCaml bytecode tools, then process the result with js_of_ocaml. That makes it a specialized compiler in an existing OCaml toolchain, rather than a general-purpose transpiler.
Its feature set reaches beyond basic code conversion. Browser API and JavaScript value bindings support interaction with those environments, while Dune support fits Dune-based JavaScript compilation. PPX syntax extensions, Lwt integration, JSON derivation and TyXML integration add options for OCaml projects using those tools. Source maps and debugging output are available, as are linking and standalone runtime build commands. Node.js is supported alongside browsers; the listed integrations also include QuickJS-NG. The companion wasm_of_ocaml project is a separate WebAssembly compiler, not a JavaScript output mode.
The main trade-off is focus: js_of_ocaml is for OCaml bytecode and JavaScript targets, so it is not a fit for teams seeking a language-neutral transpiler. Its two-stage compilation process also means projects need OCaml bytecode compilation before JavaScript generation. The project provides command-line access, while support channels are documentation and community. Choose it if your OCaml project needs browser or Node.js output and its bindings and integrations match your stack. If you need a different source language, target, or support model, look for a tool designed around those requirements.
Your product? Our editors can test js_of_ocaml in depth and publish a review, labelled as paid · from $149/mo →
js_of_ocaml pricing
js_of_ocaml fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | Free |
| Source languages | Not verified |
| Target languages | Not verified |
| Syntax-version conversion | No |
| Intermediate output | No |
| CLI access | Yes |
| API access | No |
| Conversion mode | Not verified |
| Deployment | Self-hosted |
| Platforms | Web |
| Support | Docs, Community |
| Built for | Solo, Small business (editorial estimate) |
| Integrations | 5 integrations: Dune, Lwt, TyXML, Node.js, QuickJS-NG |
| Pricing | Open source |
| Website | ocsigen.org |
| Facts checked | 22 Sep 2026 |
js_of_ocaml integrations
js_of_ocaml lists 5 integrations on its own site.
- Dune
- Lwt
- TyXML
- Node.js
- QuickJS-NG
Alternatives to js_of_ocaml
- BabelFlexible ECMAScript transforms with CLI, Node.js APIs, and browser compilation.9.3
- SWCAn open-source compiler with minification and bundling for JavaScript and TypeScript workflows.9.2
- Kotlin/JSA free Kotlin-to-JavaScript toolchain for browser and Node.js projects.8.8
See all js_of_ocaml alternatives →
Used js_of_ocaml? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used js_of_ocaml for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
js_of_ocaml is listed in our Code Transpilers directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/js-of-ocaml/"><img src="https://www.itechguides.com/best/badge/js-of-ocaml.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


