Share C code with CodeThis

The language underneath most of computing. Share POSIX, pointer arithmetic, and tight loops with clean highlighting.

Paste C now

What you get

  • C-aware syntax highlighting via CodeMirror
  • Instant shareable link — no signup required
  • Optional expiration (7 days, 30 days, permanent)
  • Password protection for private pastes
  • Works with the REST API and MCP server
  • Rich markdown and MDC components alongside code

Common use cases for C pastes

  • Embedded and firmware snippets
  • OS primitives and syscalls
  • Bit-twiddling utilities
  • Algorithm textbooks

Example

#include <stdio.h>

int count_bits(unsigned int n) {
    int count = 0;
    while (n) { n &= (n - 1); count++; }
    return count;
}

Related languages

Ready to share some C?