FREEDOM251

Freedom251 › Code Formatting Tools

Fantomas

Free plan LinuxMacWebWindows

Visit Fantomas Alternatives Pricing

Fantomas's own site

What Fantomas is

Fantomas is a formatter for F# source code that applies a consistent style according to configuration. Its default formatting follows Microsoft's F# style guide, with settings also available for G-Research conventions. It is installed as a .NET tool; local installation is recommended when a repository needs to keep using a fixed version. The command line accepts folders or files ending in `.fs`, `.fsi`, `.fsx`, `.ml`, or `.mli`. Its documentation assumes source files can already be parsed by the F# compiler. A limited set of formatting options can be placed in `.editorconfig` and read automatically by the command-line tool. For automated checks, `dotnet fantomas check` identifies formatting drift and exits with a failure code when files need changes. Setup guides are available for JetBrains Rider, Visual Studio Code, and Visual Studio, and the official site links to an online tool for trying the formatter and its settings. Fantomas is free and available under the Apache 2.0 license. The project is described as an fsprojects incubation project.

Who it suits

Fantomas suits F# developers who want formatting rules applied consistently across files or checked in an automated workflow. It also fits teams using Rider, Visual Studio Code, or Visual Studio.

What it does well

  • Default rules follow Microsoft's F# style guide.
  • Supports G-Research formatting conventions.
  • Check command flags files needing formatting.
  • Setup guides cover three listed editors.

What to know first

  • Source files must already parse with the F# compiler.
  • Only a limited set of options can be stored in `.editorconfig`.
  • Accepts only the listed file extensions.

Plans

PlanBilled and limitsPrice
FantomasF# source code formatting · .NET tool · Apache 2.0 licenseFree

As fsprojects.github.io lists them, read 9 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the Fantomas website.
  2. Install Fantomas as a .NET tool; use a local installation when the repository needs a fixed version.
  3. Choose configuration options, including supported settings in `.editorconfig`.
  4. Set up the formatter in JetBrains Rider, Visual Studio Code, or Visual Studio using the maker's guides.
  5. Run Fantomas on a folder or supported source file.
  6. Run `dotnet fantomas check` to report formatting drift.

Fantomas is an opinionated formatter for F# code, best suited to developers who want a shared style across editors and repositories. Microsoft-aligned defaults and a CI check make it a practical fit for F# projects; it cannot format source that the F# compiler cannot parse.

Overview

Fantomas applies configured formatting to F# source files and folders. Its defaults follow Microsoft's F# style guide, and it offers settings for G-Research conventions. That gives teams a defined starting point without requiring them to design a style from scratch, though the focus on F# makes it the wrong choice for a repository that needs one formatter for several languages.

Fantomas is installed as a .NET tool. A local installation is recommended so a repository can pin its version, which helps collaborators and automated checks use the same formatter. The command line accepts files ending in .fs, .fsi, .fsx, .ml or .mli, or folders containing them. Source files are expected to parse with the F# compiler before formatting, so Fantomas does not resolve syntax errors as part of the formatting process.

Key features

  • Style defaults and settings: Microsoft-style defaults provide a useful baseline, with settings for G-Research conventions. A limited set of options can be kept in .editorconfig and read automatically by the command line tool, so teams wanting broad control over formatting rules may find the configuration surface restrictive.
  • Formatting checks: dotnet fantomas check reports formatting drift and exits with a failure code when files need formatting. That makes it suitable for CI enforcement, where a failing check can prompt contributors to format before merging.
  • Editor setup: Setup guides cover JetBrains Rider, Visual Studio Code and Visual Studio. The editor integrations and online tool for trying Fantomas and its settings make it easier to evaluate in common F# workflows.
  • Library and issue reporting: The tool and library use the Apache 2.0 license, and a library API supports use from other software. The package page directs users to an online bug reporting tool that opens an issue with reproduction details. Fantomas is an fsprojects incubation project.

Pricing

Fantomas is free and open source. Its sole Fantomas plan costs nothing and includes F# source code formatting, the .NET tool and an Apache 2.0 license. There is no paid tier or free trial to weigh; the free plan is the product.

Platforms

Fantomas is associated with web and self-hosted platforms, and its supported platforms also include Linux, macOS and Windows. The online tool offers a way to try formatting in a browser, while the .NET tool supports repository-based use. Editor integration is available.

Who it's for

Fantomas suits F# developers and teams who want consistent formatting in editors and a command-line check that can flag style drift in CI. Repository-level version pinning is useful when a team wants predictable formatting across contributors. It is less suitable for projects whose files do not parse or for teams that need extensive configuration or formatting across multiple languages.

Pros and cons

  • Pro: Microsoft-aligned defaults and G-Research settings give F# teams a ready-made style baseline.
  • Pro: The CI check returns a failure code for formatting drift, so automated workflows can enforce consistency.
  • Pro: The Apache 2.0 license, free plan and library API support both direct use and integration.
  • Con: Source must already parse with the F# compiler, which limits its use while code is syntactically invalid.
  • Con: Only a limited set of settings are read from .editorconfig, which may not suit teams that want fine-grained style control.
  • Con: Its F# focus does not cover unrelated languages in a mixed-language codebase.

Alternatives

For a different language or ecosystem, consider Black, a free MIT-licensed Python code formatter; Fourmolu or Ormolu, both free Haskell formatters; or goimports, a free open source command-line tool. Prettier is a free open-source code formatter, with enterprise support and maintenance offered through Tidelift Subscription. rustfmt is another free formatter, with no paid plans stated. Ruff is made by Astral, which builds open-source, permissively licensed developer tools for the Python ecosystem. Accessibility Test Framework for Android is also listed as an alternative.

For more options, browse Code Formatting Tools.

Verdict

Choose Fantomas for an F# project that needs a free, licensed formatter with editor guides and a CI check for style drift. Its repository-friendly version pinning and Microsoft-based defaults make it a straightforward standardization choice. Look elsewhere if your source cannot yet parse, your team needs a wider configuration surface, or your project needs formatting beyond F#.

Verdict

Fantomas offers configurable F# formatting and a command-line check for identifying style drift. Its compiler-parsing requirement and limited configuration options are worth considering before adding it to a workflow.

Questions

How much does Fantomas cost?

Fantomas is listed as free and open source under the Apache 2.0 license.

Which languages and file types does it support?

The supported language is F#. The command line accepts folders or files ending in `.fs`, `.fsi`, `.fsx`, `.ml`, or `.mli`.

Which platforms are listed?

The listed platforms are web and self-hosted.

Which editors have setup guides?

The maker provides guides for JetBrains Rider, Visual Studio Code, and Visual Studio.

Can Fantomas check formatting in CI?

Yes. `dotnet fantomas check` reports formatting drift and exits with a failure code when files need formatting.

Who maintains Fantomas?

Fantomas is described as an fsprojects incubation project.

Facts from Fantomas's own pages

Bug reporting
The package page directs users to an online bug reporting tool that opens an issue with reproduction details. · nuget.org, 9 Oct 2026
CI checks
The `dotnet fantomas check` command reports formatting drift and exits with a failure code when files need formatting. · fsprojects.github.io, 9 Oct 2026
Configuration
A limited set of formatting options can be stored in `.editorconfig` and read automatically by the command line tool. · fsprojects.github.io, 9 Oct 2026
Editor integrations
The maker provides setup guides for JetBrains Rider, Visual Studio Code, and Visual Studio. · fsprojects.github.io, 9 Oct 2026
Input requirement
The documentation says source files are assumed to be parsable by the F# compiler before formatting. · fsprojects.github.io, 9 Oct 2026
Install
Fantomas is installed as a .NET tool, with local installation recommended so a repository can use a fixed version. · fsprojects.github.io, 9 Oct 2026
Library and license
The library and tool are available under the Apache 2.0 license. · fsprojects.github.io, 9 Oct 2026
Maintainer project
The official site describes Fantomas as an fsprojects incubation project. · fsprojects.github.io, 9 Oct 2026
Online tool
The official site links to an online tool for trying Fantomas and its settings. · fsprojects.github.io, 9 Oct 2026
Purpose
Fantomas is an opinionated formatter for F# source code that formats files based on configuration. · fsprojects.github.io, 9 Oct 2026
Release
The GitHub releases page lists version 8.0.7, released October 5, 2026. · github.com, 9 Oct 2026
Style guides
Its defaults follow Microsoft's F# style guide, with settings available for G-Research conventions. · fsprojects.github.io, 9 Oct 2026
Supported file types
The command line accepts folders or files ending in `.fs`, `.fsi`, `.fsx`, `.ml`, or `.mli`. · fsprojects.github.io, 9 Oct 2026

Where Fantomas stands on Freedom251

Look at these too