Online F# Compiler
Compile and run F# online with F# 10 on .NET 10. Write your program, press Run, and fsc compiles it and starts it, with compiler errors and output shown beside your code. Programs can read input with Console.ReadLine as they run.
How to run F# code online
- This page opens with F# selected, so you can start typing straight away.
- Write your code in the editor, or open files from your computer: single files, or a whole project as a .zip.
- Press Run, or Ctrl+Enter. The output appears in the panel beside the editor, and when the program asks for input you type it there and press Enter.
- Share a copy with a link, or save your files to your computer.
F# 10 (.NET 10) on Online IDE
- Your program is compiled with the F# compiler, fsc, and runs on .NET 10.
- Only the file in the active tab is compiled, so keep the whole program in that one file.
- Code at the top level runs from top to bottom, so no [<EntryPoint>] function is needed.
- Console.ReadLine() or stdin.ReadLine() reads a line of input, and printf and printfn write to the output panel.
Example: an F# program that reads input
open System
let fizzBuzz n =
match n % 3, n % 5 with
| 0, 0 -> "FizzBuzz"
| 0, _ -> "Fizz"
| _, 0 -> "Buzz"
| _ -> string n
printf "Count up to: "
match Int32.TryParse(Console.ReadLine()) with
| true, limit -> [ 1 .. limit ] |> List.iter (fizzBuzz >> printfn "%s")
| _ -> printfn "That is not a whole number."
Features of this tool
- Simple and fastA clean, lightweight editor that opens instantly.
- Powered by AceThe Ace code editor, with syntax highlighting, autocompletion and bracket matching.
- Interactive programsType input into the terminal while your program runs.
- Several filesWork in tabs, open files or a .zip from your computer, and save the project back to disk.
- Made for learningHelpful for beginners to learn and practice programs.
- Light and dark themesPlus 39 editor themes, a choice of coding fonts, and Vim, Emacs or VS Code keys.
- Keep your outputCopy or download the program output in one click.
- Share by linkSave your code in the cloud and open it anywhere.
Frequently asked questions
Which F# version does Online IDE use?
F# 10 on .NET 10, compiled with fsc on Linux.
Can I use more than one F# file?
No. Only the file in the active tab is compiled, so put the whole program in that one file.
How does an F# program read input?
Call Console.ReadLine() or stdin.ReadLine(), then type into the output panel while the program waits and press Enter.
Can I use NuGet packages?
No. The .NET class library and FSharp.Core are available, but NuGet packages are not installed and programs cannot download them.
Contact us
For any feedback, queries or issues, please feel free to contact us or write to . We value your input and are committed to providing the best possible experience for our users.