.FS

FS File

Visual F# Source File
Ask a question
QUICK ANSWER

An .fs file is an F# source code file - plain text containing code for Microsoft's functional-first .NET language. Open it with Visual Studio 2022, VS Code with the Ionide extension, or any text editor. It is safe to view; risk arises only if you compile and run untrusted code.

Developer: Microsoft (F# language design by Don Syme, Microsoft Research) Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 1, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the FS file format?

.fs is the source file extension for F#, a functional-first, strongly typed programming language developed by Don Syme at Microsoft Research. F# targets the .NET runtime and compiles to .NET Intermediate Language via the F# compiler, fsc.

An .fs file is plain UTF-8 text containing an ordered sequence of module or namespace declarations, open import statements, type definitions, let bindings, and expressions. Crucially, order matters in F#: the compiler processes declarations top-to-bottom, and files within a project must be listed in the .fsproj project file in explicit compilation order - unlike C# or Java, where intra-project declaration order is generally irrelevant.

F# supports functional programming idioms (immutable data by default, pattern matching, discriminated unions, computation expressions) alongside object-oriented features inherited from .NET. The language has evolved from version 1.0 (2005, Microsoft Research) to F# 9.0 (2024).

Companion extensions include .fsi (F# interface/signature files, analogous to C header files) and .fsx (F# script files, executed without explicit compilation via dotnet fsi). The Fable compiler can transpile .fs source to JavaScript, enabling browser and Node.js targets.

.fs files are supported natively by Visual Studio 2022, JetBrains Rider, and Visual Studio Code with the Ionide extension.

Security & safety

RISK: LOW

Plain text source code; no executable risk when viewed. Risk arises only if you compile and run untrusted F# code.

Format details

in a nutshell
FULL NAMEVisual F# Source Fileaka F# source file, FSharp source
DEVELOPERMicrosoft (F# language design by Don Syme, Microsoft Research)since 2005 (F# 1.0, Microsoft Research); Visual Studio integration since 2010 (VS 2010)
MIME TYPEtext/plain
TYPEplain-text source code file
STANDARDOpen · royalty-free
This extension is also used by…
  • BRKSYS FS (file-system image) - Some emulator/OS toolchains use .fs for raw filesystem images; unrelated to F# source.
  • Haskell module (rare) - Occasionally .fs suffix appears in older Haskell codebases, but .hs is the standard; very rare.

Programs that open FS files

Windows4 apps
Notepad Open-source Open the .fs file via File → Open; syntax highlighting available via F# language plugin.
Visual Studio 2022 Freemium Open the .fsproj (or .sln) in VS; .fs files appear in Solution Explorer, double-click to edit with full IntelliSense.
Visual Studio Code + Ionide Open-source Install Ionide-fsharp extension from the VS Code Marketplace; open the folder containing .fsproj to get IntelliSense and F# support.
JetBrains Rider Paid Open the .fsproj or .sln file; Rider has built-in F# support with refactoring tools.
macOS2 apps
Visual Studio Code + Ionide Open-source Install Ionide-fsharp; open .fsproj folder. Full F# language server support on macOS.
JetBrains Rider Paid Open .fsproj or .sln file directly.
Linux1 app
Visual Studio Code + Ionide Open-source Install Ionide-fsharp extension; open project folder.

Technical details

deep spec
LanguageF# - functional-first, strongly typed .NET language developed by Don Syme at Microsoft Research
EncodingUTF-8 text; BOM optional; Visual Studio defaults to UTF-8 without BOM
Compiler`fsc` (F# compiler); compiles `.fs` files to .NET IL; invoked via `dotnet build` in MSBuild projects
Compilation orderFiles must be listed in `.fsproj` top-to-bottom; order is semantically significant - forward references are not allowed
Language versioningF# language version set via `LangVersion` property in `.fsproj`; current is F# 9.0 (2024)
ParadigmFunctional-first (immutable by default, pattern matching, discriminated unions, computation expressions) with full OOP support
Type systemHindley-Milner type inference; explicit type annotations optional in most contexts
Module systemTop-level `module` or `namespace` declarations; circular references between files are not permitted
Companion extensions`.fsi` (interface/signature file), `.fsx` (script), `.fsproj` (MSBuild project file)
Runtime targets.NET 6+ on Windows, Linux, macOS; also JavaScript via the Fable transpiler
Scripting mode`.fsx` files run via `dotnet fsi` without explicit compilation; `.fs` files require a project or direct `fsc` invocation
IDE supportVisual Studio 2022, Visual Studio Code with Ionide extension, JetBrains Rider
Released2005 (F# 1.0, Microsoft Research); Visual Studio integration since 2010 (VS 2010)
Latest versionF# 9.0 (2024)
Open standardYes · royalty-free
Specificationfsharp.org

FS conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with FS files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about FS files.

Frequently asked questions

How do I open an .fs file?
Any text editor works for reading. For development with IntelliSense, use Visual Studio 2022 (Windows) or VS Code with the Ionide extension (all platforms).
Is .fs only for Windows?
No. F# and .NET are cross-platform since .NET Core (2016). .fs files compile and run on Windows, macOS, and Linux.
What is the difference between .fs, .fsi, and .fsx?
.fs is a compiled source file, .fsi is an interface/signature file (optional), .fsx is a script run directly with dotnet fsi without needing a full project.
Why does my .fsproj care about file order?
F# compiles files strictly top-to-bottom; later files can reference types from earlier files but not vice versa. The order in .fsproj is the compilation order.
Can I open an .fs file in Notepad?
Yes - it is plain text. You just won't get syntax highlighting or compiler feedback without a proper editor/IDE.

References

1Microsoft Docs - F# guidelearn.microsoft.com
2F# Language Specificationfsharp.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.DATProgram Data File (generic)
4.JPGJPEG Image
5.EXEWindows Executable (Portable Executable)
6.RPMSGRestricted Permission Message
7.ICSiCalendar data file
8.PARTPartial Download File
9.BINCD/DVD Disc Image (BIN/CUE)
10.JSONJavaScript Object Notation file

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z