Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Code Emitter

mokeyishmokeyish62k downloads

Allow code blocks to be executed interactively in a sandbox like Jupyter notebooks. Supported language Rust, Kotlin, Python, JavaScript, TypeScript, etc.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates17

This plugin allows code blocks to be executed interactively like in Jupyter Notebooks. It has no external environment requirements (such as system installations of compilers), because code execution works via local sandboxes using JavaScript or WebAssembly technology, or network requests to online Playgrounds. This means it can support all platforms supported by Obsidian.

Supports all Obsidian supported platforms, including:

  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Supported languages:

Language Provider
C/C++ Sololearn
C# Sololearn
Go Sololearn
Haskell https://play.haskell.org
HTML & CSS Shadow DOM
Java Sololearn
JavaScript JS Sandbox (qiankun)
Kotlin https://play.kotlinlang.org
Python WebAssembly (Pyodide)
R Sololearn
Rust https://play.rust-lang.org
Swift Sololearn
TypeScript TypeScript Compiler + JS Sandbox
V https://play.vosca.dev/
Wenyan Wenyan Compiler + JS Sandbox

[!NOTE]
Only Python, TypeScript, and JavaScript are run in a local sandbox (JS/WebAssembly). Others will send code to third-party website to evaluate the results (e.g.: https://play.kotlinlang.org, https://play.rust-lang.org). Please take care to avoid sending your potentially-sensitive source code.

Ads: You might like my other plugins 🤪

  • Obsidian Enhancing Export

.

Installation

  1. Search Code Emitter in the Community plugins section of Obsidian, and install it.

Examples

Python

Install numpy through micropip. All available packages are listed here (search for whl).

Using numpy

import micropip
await micropip.install('numpy')  
import numpy as np
a = np.random.rand(3,2)
b = np.random.rand(2,5)

print(a@b)

Using matplotlib

import micropip
await micropip.install('matplotlib')

import matplotlib.pyplot as plt

fig, ax = plt.subplots()             # Create a figure containing a single Axes.
ax.plot([1, 2, 3, 4], [1, 4, 2, 3])  # Plot some data on the Axes.
plt.show()                           # Show the figure.

HTML & CSS

<div><span class="h">Hello</span><span class="w">world</span></div>

<style>
.h {
  color: red;
}
.w {
  color: green;
}
</style>

Any languages that support CORS

Here is the example to support Ruby.

const url = 'https://api2.sololearn.com/v2/codeplayground/v2/compile';

const runCode = async (code: string, lang: 'cpp' | 'go' | 'c' | 'java' | 'cs' | 'swift' | 'rb') => {
  const header = {
    'User-Agent': 'Obsidian Code Emitter/0.1.0 (If this is not allowed, please let me know)',
    'Accept': 'application/json, text/plain, */*',
    'Accept-Language': 'en-US',
    'Content-Type': 'application/json',
  };

  const res = await fetch(url, {
    'headers': header,
    'body': JSON.stringify({
      'code': code,
      'codeId': null,
      'input': '',
      'language': lang
    }),
    'method': 'POST',
  });
  return (await res.json()) as {
    success: boolean,
    errors: string[],
    data: {
      sourceCode: number,
      status: number,
      errorCode: number,
      output: string,
      date: string,
      language: string,
      input: string,
    }
  };
};

const ruby_code = `
puts "Hello World12"
`;


console.log((await runCode(ruby_code, 'rb')).data.output);

License

This plugin sandbox contains codes from https://github.com/umijs/qiankun, which is licensed under

  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

And other codes is licensed under

  • GPL-3.0 license (LICENSE-GPL-3.0 or https://opensource.org/licenses/GPL-3.0)
54%
HealthGood
ReviewRisks
About
Execute code blocks interactively inside Obsidian notes like Jupyter notebooks. Run Python, TypeScript and JavaScript locally via JS/WebAssembly sandboxes, or evaluate many other languages through online playgrounds with cross-platform desktop and mobile support. Avoid sending sensitive source code to remote services.
Markdown
Details
Current version
0.4.0
Last updated
Last year
Created
4 years ago
Updates
17 releases
Downloads
62k
Compatible with
Obsidian 0.12.0+
License
GPL-3.0
Report bugRequest featureReport plugin
Author
mokeyishmokeyish
github.com/mokeyish
GitHubmokeyish
  1. Community
  2. Plugins
  3. Markdown
  4. Code Emitter

Related plugins

Importer

Import data from Notion, Evernote, Apple Notes, Microsoft OneNote, Google Keep, Bear, Roam, and HTML files.

Outliner

Work with your lists like in Workflowy or Roam Research.

Various Complements

Complete words similar to auto-completion in an IDE.

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Fantasy Statblocks

Create, manage and view a Fantasy Bestiary with Dungeons and Dragons style statblocks.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.

Auto Link Title

Automatically fetches the titles of links from the web.

Automatic Table Of Contents

Create a table of contents in a note that updates itself when the note changes.

Consistent attachments and links

Move note attachments and update links automatically.

Advanced Slides

Create Markdown-based presentations.