- Home
- Online C Compiler
Online C Compiler
Write, compile and run C programs online. This free C compiler uses GCC, supports scanf input, and shows output and compiler errors instantly — no installation or signup.
Click Run or press ⌘ ↵ to execute your C code.
Program reads input? .
How to use Online C Compiler
- Write or paste C code in the editor, or pick a program from Examples.
- If your program uses
scanforfgets, type the values in the Input tab. - Click Run or press Ctrl + Enter (⌘ + Enter on Mac) to compile and execute.
- Read the program output, or the compiler errors and warnings, in the Output panel.
- Click Share for a live link, or download your code as
main.c.
Features
GCC compiler
Programs are compiled with GCC and run in a secure sandbox, with the C standard library — stdio.h, stdlib.h, string.h, math.h and more.
Clear compile errors
Compiler errors and warnings stream into the output panel in red, and the status bar tells you whether compilation or execution failed.
Standard input
Provide stdin in the Input tab and read it with scanf, getchar or fgets.
VS Code editor
Monaco — the editor behind VS Code — with C syntax highlighting, 4-space indentation and bracket matching.
Share in one click
Create a live Code Share link so others can view, edit and run the same program with you.
Autosave
Your code and input are saved in this browser, so nothing is lost when you reload.
What is an online C compiler?
An online C compiler lets you compile and run C programs without installing GCC, Clang or an IDE. You write code in the browser, it is compiled and executed on a remote server inside a sandbox, and the output is streamed back to you. It is ideal for students learning C, practising data structures and algorithms, and quickly testing snippets.
Related programming tools
Frequently Asked Questions
Everything you need to know about JSON Reader