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
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

BetterHTMLReader

Bartłomiej KomendarczukBartłomiej Komendarczuk63 downloads

Renders .html files and htmlrender code blocks with full CSS and JavaScript support in a secure sandboxed iframe.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

An Obsidian plugin that displays HTML properly, with its CSS and JavaScript, instead of showing nothing or raw markup.

Features

  • Open .html / .htm files directly in Obsidian as fully rendered pages. The view refreshes when the file changes.
  • Inline HTML in notes with a htmlrender code block. The block resizes to fit its content.
  • Local resources: relative <link rel="stylesheet">, <script src> and images are resolved from your vault, relative to the HTML file or note.
  • Remote resources (CDNs, web APIs) work as in a normal browser.
  • #anchor links inside the page work.

Example

```htmlrender
<style>button { padding: 8px 16px; }</style>
<button onclick="this.textContent = 'Clicked!'">Click me</button>
```

The opening ```htmlrender and the closing ``` must each be on their own line, with the HTML on the lines between them. Putting everything on one line is not a valid code block and will not render.

Installation

From the community plugin directory

Settings → Community plugins → Browse → search for BetterHTMLReader.

Manually

  1. Download main.js, manifest.json and styles.css from the latest release.
  2. Put them in <vault>/.obsidian/plugins/better-html-reader/.
  3. Reload Obsidian and enable the plugin in Settings → Community plugins.

Security

HTML is rendered in an <iframe> with sandbox="allow-scripts allow-popups allow-forms allow-downloads" and without allow-same-origin. Scripts in the page run, but they cannot access Obsidian's API, your vault, or other notes.

Additional safeguards:

  • Only local .css and .js files outside hidden folders (e.g. .obsidian) are inlined, so a page cannot pull your notes or plugin configs into its sandbox.
  • A Content-Security-Policy blocks fetch/XHR to local vault resources; requests to the web are allowed.
  • Pop-up dialogs (alert, confirm) are disabled.

What the plugin cannot prevent: an HTML page can still load remote content (trackers, remote scripts) and show its own UI. Only open HTML from sources you trust.

Limitations

  • Scripts cannot use localStorage, cookies or same-origin APIs (a consequence of the sandbox).
  • fetch of local vault files from within the page is blocked.
  • Embedding with ![[file.html]] is not supported; use a htmlrender block.
  • .html files are read-only in Obsidian; edit them in an external editor.

Development

No build step. Copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/better-html-reader/ and reload.

License

MIT

HealthExcellent
ReviewPassed
About
Render .html/.htm files and htmlrender blocks as fully rendered pages with CSS, JS, images and anchors that auto-refresh on file change. Load local resources relative to the file and run remote assets in a sandboxed iframe that blocks access to your vault and Obsidian API; open only trusted HTML.
HTMLFilesAttachments
Details
Current version
1.0.0
Last updated
2 weeks ago
Created
2 weeks ago
Updates
1 release
Downloads
63
Compatible with
Obsidian 1.4.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Bartłomiej KomendarczukBartłomiej Komendarczukbelluu
GitHubbelluu
  1. Community
  2. Plugins
  3. HTML
  4. BetterHTMLReader

Related plugins

Custom Attachment Location

Customize attachment location with variables($filename, $data, etc) like Typora.

Pixel Perfect Image

Pixel perfect 100% image resizing, copy to clipboard, show image in Finder/Explorer, and much more.

Embed HTML

Adds support for embedding HTML files.

File Cleaner Redux

Helps with cleaning up empty files and unused attachments in the vault.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Advanced URI

Control everything with URI.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

Share Note

Instantly share/publish a note, with the full theme and content exactly like you see in Obsidian. Data is shared encrypted by default, and only you and the person you send it to have the key.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.