Embeddable code playgrounds

for education, documentation, and fun

Embed interactive code snippets directly into your product documentation, online course, or blog post.

msg = "Hello, World!"
let msg: string = "Hello, World!"
create table data(message text);
insert into data values ('Hello, World!');
select * from data;
msg="Hello, World!"
echo $msg
#include <stdio.h>

void main() {
    const char* msg = "Hello, World!";
    printf("%s\n", msg);
and many more!

Education, documentation, fun

Make education more effective — add interactive exercises to your courses.
Increase product adoption — allow developers to interact with your software in tutorials and how-tos.
Engage readers — embed executable code examples in your articles and blog posts.


Try everything

Supports 25 playgrounds out of the box, plus custom sandboxes if you need them.

programming languages
JavaScript TypeScript Python Rust C# Go Java C++ Kotlin C PHP Dart Swift Ruby Lua Elixir Zig Haskell Julia F# Clojure OCaml Nim Odin

PostgreSQL MySQL SQLite Redis ClickHouse

curl Fetch API HTTP


And more to come!

Bring your own environment

Codapi is not limited to the boring run command. You can lint, test and benchmark code, or run custom commands.

Codapi goes beyond a fixed set of programming languages and tools. Build your own playgrounds with custom packages and software, and use them for fun and profit.

Use templates and multi-file playgrounds for larger projects. This gives your students or readers a more immersive, "desktop-like" programming experience.

Integrate in minutes

Codapi is specifically designed for embedding in articles, product documentation, online courses, mobile apps, etc. — so it's very lightweight.

Integration via JavaScript widget:

<!-- code snippet -->
<pre>print("hello world!")</pre>

<!-- playground widget attaches to the previous snippet -->
<codapi-snippet sandbox="python" editor="basic">

<!-- playground script -->
<script src="">

Or an API:

authorization: bearer ***
content-type: application/json

    "sandbox": "python",
    "command": "run",
    "files": {
        "": "print(\"hello world\")"

Available as a cloud service and as a self-hosted version. Self-hosting is especially useful in enterprise environments to provide playgrounds for working with internal products and libraries.

Codeapi is in private beta. Request access if you are interested in trying it out.

Join the beta


Curious about real-world use cases? Here are a few:

Mastering curl curl, bash

API tutorials beyond OpenAPI fetch, javascript, python

SQL join flavors postgres, sqlite

Built-in functions in Go 1.21 go

Trying Odin odin


Cloud version processes submitted code in the data center located in Germany. The code is discarded immediately after processing. No data is stored or shared with third parties.

Self-hosted version processes everything locally. No internet access required.

Codapi does not track you or use any kind of telemetry.