C Playground

    Loading playground...

    Run C code online, free

    Write, compile and run C programs from your browser with GCC 13.2. There is nothing to install and no account: type your code and press Run, or Ctrl+Enter.

    When you press Run, your code is sent to Wandbox, a free online compiler service, which compiles and runs it and sends back the output. Unlike Python, which runs on your device, C code leaves your browser, so do not include passwords or other secrets.

    Giving your program input

    Use the stdin box
    Programs that read with scanf or fgets get their input from the stdin box above the editor. Type everything your program will read, separated by spaces, before you press Run.
    See compiler messages
    Compiler errors and warnings appear in the terminal with their line numbers, so you can fix them and run again.

    How to run C code online

    1. Write or paste your C program, including a main function.
    2. If it reads input, type the values into the stdin box.
    3. Press Run and read the output in the terminal.

    Frequently asked questions

    Which C compiler is used?

    GCC 13.2, compiling C, through the Wandbox online compiler service.

    Is my C code private?

    Your code is sent to Wandbox to be compiled and run. Do not include passwords, keys or other secrets in it.

    Can I compile several files?

    No. Only the file that is open in the editor is compiled and run.

    Where can I find C examples?

    The C examples cover basics, control flow, functions, arrays, strings and pointers.