Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Ormolu

github.com

  • Free plan
  • Windows
  • macOS
  • Linux
  • Web
7.7 Club score Visit github.com

What Ormolu is

Ormolu formats Haskell source code using GHC’s parser, which avoids parsing problems caused by haskell-src-exts. It applies one consistent style designed to produce minimal diffs, and that style cannot be configured. The project aims for idempotence, so code already formatted to its rules should remain unchanged when formatted again.

Ormolu provides release binaries for Linux, macOS, and Windows, and can also be installed with cabal or stack. Ormolu Live offers a browser version. Listed editor integrations cover Emacs, VS Code, and Vim through neoformat or vim-ormolu; Haskell Language Server also has built-in support for using Ormolu as a formatter. For continuous integration, the project recommends the run-ormolu GitHub Action. Ormolu locates a matching Cabal file to read default language extensions and dependencies. Files named .ormolu can provide fixity overrides and module re-export instructions. CPP support is experimental and limited to simple cases where conditionals surround top-level declarations. The project is open source and free.

Who it suits

Ormolu suits Haskell developers who want a consistent formatter across local editors, browser use, or continuous integration. Its fixed style fits teams that can adopt one formatting approach.

Good to know, and what to watch

  • Uses GHC’s parser
  • Aims to produce minimal diffs
  • Available as binaries for Linux, macOS, and Windows
  • Integrates with Emacs, VS Code, and Vim
  • Haskell Language Server has built-in support
  • Formatting style cannot be configured
  • CPP support is experimental
  • CPP handling covers only simple top-level cases

Ormolu

Free

Open source

Getting started

  1. Open the Ormolu project website
  2. Install a Linux, macOS, or Windows release binary
  3. Install with cabal or stack instead
  4. Try Ormolu Live in a browser
  5. Connect it through Emacs, VS Code, Vim, or Haskell Language Server
  6. Use the run-ormolu GitHub Action for continuous integration

Limits to check

The formatter uses a single non-configurable style. CPP support works only experimentally in simple cases where conditionals surround top-level declarations.

The Club's review

Ormolu is a free formatter for Haskell source code. It best suits developers and teams who want the same formatting rules in editors and continuous integration. Its consistent output is useful for keeping reviews focused, provided the project can live with a fixed style.

Overview

Ormolu uses GHC’s parser, which avoids parsing problems associated with haskell-src-exts. It aims to leave already formatted code unchanged and to keep formatting diffs small. That gives teams a predictable baseline, but there are no style options for projects that want to tune layout to local preferences.

Key features

Ormolu can read default language extensions and dependencies from the matching Cabal file. Its .ormolu configuration supports fixity overrides and module re-export instructions, adding project context without making the formatting rules configurable.

Developers can install it through release binaries for Linux, macOS, and Windows, or use cabal or stack. Ormolu Live offers a browser-based way to try formatting before setting up a local installation.

Editor integrations cover Emacs, VS Code, and Vim through neoformat or vim-ormolu. Haskell Language Server has built-in support for Ormolu, and the project recommends the run-ormolu GitHub Action for CI. These routes make it practical to apply the same formatter during editing and automated checks, rather than relying on contributors to remember separate conventions.

Pricing

Ormolu is open-source software, with the Ormolu plan priced at no cost. There are no paid tiers in the stated pricing model. The license permits redistribution and use in source and binary forms subject to its conditions, and provides the software “as is.”

Platforms

Ormolu supports Linux, macOS, Windows, and the web through Ormolu Live. The web option is useful for trying the formatter; release binaries cover the three desktop operating systems, with cabal and stack as installation alternatives. Haskell is its supported language, so it is not a general-purpose formatter for mixed-language projects.

Who it's for

Ormolu is a strong fit for Haskell developers who value consistent formatting across a team and want to connect it to their editor, language server, or CI workflow. Its minimal-diff aim can help keep formatting changes from obscuring substantive code review. Teams that require configurable style should look elsewhere, as should projects that depend on complex CPP: support is experimental and limited to simple cases where conditionals surround top-level declarations.

Pros and cons

  • Pros: GHC’s parser avoids the parsing problems associated with haskell-src-exts.
  • Pros: Editor, Haskell Language Server, and GitHub Action options support a consistent workflow from local editing to CI.
  • Pros: Cabal-aware defaults and .ormolu overrides account for project context without requiring broad configuration.
  • Cons: The formatting style is fixed, which rules it out for teams that need control over layout.
  • Cons: CPP support is experimental and only handles simple top-level conditional cases.
  • Cons: It formats Haskell only, so projects with other languages need additional tools.

Alternatives

For another free Haskell formatter, consider Fourmolu. Choose Prettier for open-source formatting across its listed API, extension, desktop, and web platforms. Spotless is another free option, with a Windows, macOS, and Linux footprint.

For language-specific alternatives, Scalafmt formats Scala, while Black is a Python formatter. Biome is an open-source toolchain for web projects, and Taplo offers a free option. The Accessibility Test Framework for Android is listed as a free alternative for Android accessibility testing.

Browse more options in Code Formatting Tools.

Verdict

Choose Ormolu if your Haskell project needs one dependable style applied across editors and CI, and minimal formatting diffs matter more than personal style preferences. Its GHC parser and project-aware defaults make it a considered fit for Haskell work. Look elsewhere if configurable formatting or reliable support for complex CPP is essential.

The verdict

Ormolu offers a consistent Haskell formatter with editor, language server, and CI options. Its fixed style and limited experimental CPP handling are key constraints to consider.

Questions people ask

What language does Ormolu format?

Ormolu formats Haskell source code.

Is Ormolu free?

Yes. It is open source and listed as free.

Which platforms are supported?

Supported platforms are Linux, macOS, Windows, and web through Ormolu Live.

Can I configure its formatting style?

No. Ormolu implements one consistent style that does not admit configuration.

Which editors can use Ormolu?

Integrations are listed for Emacs, VS Code, and Vim through neoformat or vim-ormolu. Haskell Language Server also has built-in support.

Does Ormolu provide an API?

The listing identifies a library API.

What the maker publishes

Browser version
Ormolu can be tried in a browser through Ormolu Live. source
CI integration
The project recommends the run-ormolu GitHub Action to keep a project formatted. source
Editor integrations
The README lists integrations for Emacs, VS Code, and Vim through neoformat or vim-ormolu. source
Formatting style
It implements one consistent formatting style that does not admit configuration and aims to produce minimal diffs. source
Idempotence
The project aims to ensure formatting already formatted code does not change it. source
Installation
The release page provides binaries for Linux, macOS, and Windows, and the project can also be installed with cabal or stack. source
Language server
Haskell Language Server has built-in support for using Ormolu as a formatter. source
License
The project’s license permits redistribution and use in source and binary forms subject to stated conditions and provides the software “as is.” source
Limitations
CPP support is experimental and works only in simple cases where CPP conditionals surround top-level declarations. source
Maintainer history
The README credits Mark Karpov as author and main maintainer during his employment at Tweag from 2019 to 2026. source
Maker
Tweag describes itself as a software innovation lab and lists Ormolu among its Haskell ecosystem tools. source
Parser
It uses GHC’s parser to avoid parsing problems caused by haskell-src-exts. source
Project configuration
Ormolu finds the matching Cabal file to read default language extensions and dependencies, and supports fixity overrides and module re-export instructions in .ormolu files. source
Purpose
Ormolu is a formatter for Haskell source code. source

Checked against the maker's pages on 9 Oct 2026.