Alpine.js Online Compiler

About the Alpine.js compiler

Lightweight JavaScript framework for reactive UIs. Runs in your browser. Run Alpine.js code in your browser with no install and no signup — the editor, the input and the output share one screen. Alpine.js compiles and runs on your own device through WebAssembly, so once the page has loaded it keeps working without a network connection.

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 Alpine.js example

This is the program the Alpine.js editor opens with — run it as it is, then change it.

<!DOCTYPE html>
<html>
<head>
  <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>
  <style>
    body { font-family: sans-serif; padding: 2rem; }
    button { padding: 0.5rem 1rem; margin: 0.25rem; cursor: pointer; }
    .counter { font-size: 2rem; margin: 1rem 0; }
  </style>
</head>
<body>
  <div x-data="{ count: 0, items: ['Alpine.js', 'is', 'awesome'] }">
    <h1>Alpine.js Demo</h1>
    <div class="counter" x-text="count"></div>
    <button @click="count++">+</button>
    <button @click="count--">-</button>
    <button @click="count = 0">Reset</button>
    <ul>
      <template x-for="item in items" :key="item">
        <li x-text="item"></li>
      </template>
    </ul>
    <input x-model="items[0]" placeholder="Edit first item..." style="width: 100%; padding: 0.5rem; margin-top: 1rem;" />
  </div>

The editor opens with the full program.

More Web UI Frameworks compilers

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