Open Source · MIT License

Write HTML.
See it live.

Drop real HTML, CSS, and JavaScript into any Obsidian note. It renders as a live, interactive mini-webpage — sandboxed, isolated, and part of your document.

note.md — html-preview

Everything a webpage can do

No compromises. Full browser capabilities inside your notes, completely isolated from Obsidian.

Full JavaScript

Event listeners, DOM manipulation, timers, fetch API, Web Workers — everything works inside the sandbox.

Canvas & SVG

Draw graphics, create charts, animate vectors. The 2D canvas and SVG elements work exactly as expected.

CSS Layouts

Flexbox, Grid, responsive breakpoints, animations, transitions — complete CSS3 support with media queries.

🔒

Sandboxed Iframe

Each preview runs in an isolated iframe. No CSS or JS leaks into Obsidian or other previews.

Auto-Resize

Preview height adjusts automatically to content using ResizeObserver. No manual height guessing.

Fullscreen Mode

Expand any preview to fill the screen for complex layouts or presentations. One click to toggle.


See it in action

Click the tabs to see different previews — all live, all interactive.

counter

Three steps. That's it.

From zero to live HTML in your notes.

01

Install the plugin

Copy main.js, manifest.json, and styles.css into your vault's .obsidian/plugins/html-preview/ folder.

02

Write your HTML

In any note, open a html-preview code block and write standard HTML, CSS, and JavaScript.

03

See it live

Switch to Reading Mode. Your code renders as an interactive, sandboxed webpage inside the note.


</>
HTML Preview Coming Soon
Render HTML code blocks as live, sandboxed webpages
sunshinelife83 v1.0.0

Install from Community Plugins

Once approved by the Obsidian team, you'll be able to install directly from the Community Plugins browser — no manual setup needed.

Currently under review. You can still install manually from GitHub in the meantime.

Follow progress on GitHub

Quick install

Clone the repo, build, and copy three files into your vault. Or download the latest release directly from GitHub.

Download Release
$git clone https://github.com/sunshinelife83/obsidian-html-preview.git
$cd obsidian-html-preview
$npm install && npm run build
$cp main.js manifest.json styles.css ~/.obsidian/plugins/html-preview/