Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

OCamlFormat

Free#24 of 34 in Code Formatting Tools

OCamlFormat: A configurable OCaml formatter with Dune, editor, RPC, and library integrations. Ranked #24 of 34 in Code Formatting Tools by our editors (6.9/10); pricing: Free plan; best for OCaml projects using Dune.

6.9/10Editor score
OCamlFormat6.9 Visit OCamlFormat

At a glance

  • Editor score
    6.9 / 10
  • Pricing
    Free plan
  • Best for
    OCaml projects using Dune
  • Free plan
    Yes
  • Paid from
    Free
  • Supported languages
    OCaml
  • Facts checked
    21 Sep 2026
OCamlFormat screenshot
  • Where it wins

    • Formats code, comments, docstrings, and code blocks in comments
    • Supports .ocamlformat profiles and .ocamlformat-ignore rules
    • Offers Dune, RPC, editor-plugin, and programmatic API integration
  • Where it doesn't

    • Focused on OCaml rather than multiple programming languages
    • Requires project configuration for tailored formatting profiles
    • Its feature set centers on formatting rather than broader code quality checks

Our verdict on OCamlFormat

OCamlFormat is an open-source automatic formatter for OCaml projects, with particular fit for teams using Dune. It formats OCaml source files as well as comments, docstrings, and OCaml code blocks inside comments. Developers can run it from the command line, apply formatting in place, or check whether files are formatted without changing them. Project-level behavior is controlled through .ocamlformat files, making the tool suitable for repositories that need shared formatting rules rather than ad hoc local preferences.

Configuration and repository control are central to the product. Formatting profiles and options allow projects to define how code should be presented, while .ocamlformat-ignore files exclude selected files from formatting. Dune integration through dune fmt connects formatting with an existing OCaml build workflow. Editor plugins extend the same formatting capability into development environments, and ocamlformat-rpc supports formatting requests through an RPC server. These options make OCamlFormat adaptable across command-line, build, editor, and tooling workflows without limiting use to a single interface.

The programmatic library API is useful when formatting needs to be embedded into another OCaml tool or development process. The MIT License and open-source distribution also suit projects that want to inspect, integrate, and adapt the formatter within their own workflows. OCamlFormat is a strong choice for OCaml teams seeking consistent formatting with explicit project rules and Dune support. Projects looking for a multi-language formatter or a broader suite of code analysis features should choose a different category tool, since OCamlFormat is narrowly focused on formatting OCaml code.

Your product? Our editors can test OCamlFormat in depth and publish a review, labelled as paid · from $149/mo →

OCamlFormat pricing

Plans Free planFree Free to use — no paid tier required for the core job.
See plans on github.com

OCamlFormat fact sheet

Free planYes
Paid fromFree
Supported languagesOCaml
Supported platformsNot verified
Editor integrationYes
Ignore filesYes
Changed-lines formattingNot verified
Library APIYes
License modelOpen_source
DeploymentSelf-hosted
SupportCommunity, Docs
Built forSolo, Small business, Mid-market, Enterprise (editorial estimate)
Integrations3 integrations: Dune, Editor plugins, ocamlformat-rpc
PricingFree plan
Websitegithub.com
Facts checked21 Sep 2026

OCamlFormat integrations

OCamlFormat lists 3 integrations on its own site.

  • Dune
  • Editor plugins
  • ocamlformat-rpc

Alternatives to OCamlFormat

See all OCamlFormat alternatives →

Used OCamlFormat? 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 OCamlFormat 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

Reviews come only from verified accounts. Sign in or create an account first — your e-mail is never shown.

Your rating

0 characters · at least 80, up to 3,000

Posted from your verified account. Reviews appear after an editor reads them, usually within two working days.

Featured on iTechGuides

Featured on iTechGuides — OCamlFormat 6.9/10

OCamlFormat is listed in our Code Formatting Tools directory. Add the badge to your site — it links back to this page.

<a href="https://www.itechguides.com/products/ocamlformat/"><img src="https://www.itechguides.com/best/badge/ocamlformat.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