F# Online Compiler

About the F# compiler

Functional-first .NET language. Compiled online. Run F# code in your browser with no install and no signup — the editor, the input and the output share one screen. F# is executed by a remote runtime: your code is submitted to it and the output is returned to this page.

Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.

A F# example

This is the program the F# editor opens with — run it as it is, then change it.

open System
type Student = {
    Name: string
    Scores: int list
}
let average s = float (List.sum s.Scores) / float (List.length s.Scores)
let grade score =
    match score with
    | s when s >= 90.0 -> "A"
    | s when s >= 80.0 -> "B"
    | s when s >= 70.0 -> "C"
    | _ -> "D"
let students = [
    { Name = "Alice"; Scores = [92; 88; 95] }
    { Name = "Bob"; Scores = [87; 91; 83] }
    { Name = "Charlie"; Scores = [95; 90; 98] }
    { Name = "Diana"; Scores = [78; 82; 75] }
]
printfn "Student Report:"
printfn "%s" (String.replicate 40 "-")
students
|> List.sortByDescending average
|> List.iteri (fun i s ->
    let avg = average s

The editor opens with the full program.

More JVM Languages compilers

Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.