# Ormolu

> A formatter for Haskell source code

Source: https://talira.ai/catalog/ormolu-6ed3km1p
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / formatting](https://talira.ai/categories/developer-tools/formatting)
- Platforms: linux, macos, windows, web[^3]
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [Tweag](https://talira.ai/orgs/tweag.md)
- Creator: Mark Karpov

Ormolu is a formatter for [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md) source code that uses GHC's own parser, so it handles modern Haskell syntax and extensions. It has one style with no configuration, but the input's layout guides the output: whether a construct is on one line or several is your choice, while the result stays consistent. It aims for minimal diffs and is idempotent, so formatting formatted code changes nothing. It runs from the command line (binaries for Linux, macOS and Windows), inside haskell-language-server, in Emacs, VS Code and Vim, in CI with the run-ormolu GitHub Action, in the browser with Ormolu Live (ormolu-live.tweag.io), and as a library. Tweag maintains it, BSD-3-Clause licensed.

## Links

- GitHub: https://github.com/tweag/ormolu

## Problems it solves

- format Haskell code consistently across a team without arguing about style
- a Haskell formatter with no configuration to maintain
- check in CI that every Haskell file in a project is formatted
- format Haskell on save in VS Code or Emacs
- a Haskell formatter that understands modern GHC extensions
- keep formatting diffs small when reformatting Haskell code

## Features

- uses GHC's own parser
- one style with no configuration
- input layout chooses single-line or multi-line output
- minimal diffs and idempotent output
- magic comments and regions to leave code unformatted
- binaries for Linux, macOS and Windows
- built into haskell-language-server
- Emacs, VS Code and Vim integrations
- run-ormolu GitHub Action
- Ormolu Live in the browser
- usable as a Haskell library

## Limitations

- CPP support is experimental: Ormolu leaves CPP sections unchanged, which works only when conditionals surround top-level declarations

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.40 out of 1.
Signals: backing 0.50, extensibility 0.20.

- backed by Tweag
- created by Mark Karpov

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [Haskell](https://talira.ai/catalog/haskell-jjq1dx6f.md)

## Alternatives

- [rustfmt](https://talira.ai/catalog/rustfmt-r30f7ns1.md): A tool for formatting Rust code according to style guidelines
- [Biome](https://talira.ai/catalog/biome-0x0507a7.md): One fast toolchain that formats and lints JavaScript, TypeScript, JSON, CSS, HTML, GraphQL, YAML and Markdown.

## Sources

[^1]: https://github.com/tweag/ormolu/blob/master/LICENSE.md (checked 24 Nov 2026)
[^2]: https://github.com/tweag/ormolu (checked 24 Nov 2026)
[^3]: https://github.com/tweag/ormolu/releases/latest (checked 24 Nov 2026)
