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

Vault HTML Preview

chengmiaofanchengmiaofan1 downloads

Preview local HTML files from your vault in a dedicated view, styles and scripts included.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

Preview local .html files inside Obsidian — styles and scripts included — without leaving the app or opening a browser.

Why

HTML files in a vault are normally treated as plain text. This plugin registers a real view for .html / .htm, so clicking a file in the file explorer renders it in place.

Features

  • Renders .html / .htm in a dedicated view
  • Scripts and styles run, so self-contained pages (forms, dashboards, reports) work as written
  • Injects <base href> so relative images / CSS / JS sitting next to the file keep resolving
  • Toolbar: reload, open in the system browser, copy path
  • File context menu entry: "Open in HTML preview"
  • Two safety switches (see Settings)

Usage

  • Click any .html file in the file explorer.
  • Or use the command palette: "Open HTML preview (pick a file)".
  • Or right-click a file and choose "Open in HTML preview".

Install

Community plugins

Settings -> Community plugins -> Browse -> search "HTML Preview" -> Install -> Enable.

Manually

Copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/html-preview/, then enable it under Settings -> Community plugins -> Installed plugins.

Settings

Setting Default What it does
Allow backdrop-filter (frosted glass) off Pages that use backdrop-filter: blur() stack their blur layers with Obsidian's own compositing, which makes the window smear while scrolling. Off keeps previews crisp. Turn it on to render exactly as written.
Let the previewed page reach Obsidian (allow-same-origin) off Off keeps every preview in an opaque sandbox: scripts run, but the page cannot touch your vault or the app. Turn it on if the page needs localStorage or the clipboard — for example a self-made form with autosave.

Security

  • A preview runs the page's own JavaScript. Only preview HTML you trust.
  • The sandbox defaults to allow-scripts allow-forms allow-modals allow-popups allow-downloads without allow-same-origin, so a preview cannot reach into Obsidian or your vault.
  • Turning on allow-same-origin relaxes that: the preview then shares Obsidian's origin. Use it for your own files only.
  • The plugin itself makes no network requests, has no telemetry, and reads only files inside the vault.
  • A previewed page runs exactly as written, so it may reference remote resources (images, fonts, scripts). That is the page's own behaviour, not the plugin's. Preview HTML you trust.

Implementation notes

  • Obsidian's app:// resource URLs can be fetched, but cannot be used as an iframe src (the protocol does not support being framed), so the file text is written into iframe.srcdoc.
  • contain: paint on the frame keeps repaints inside the preview pane.

Development

Plain CommonJS, no build step — main.js is the shipped file. Edit it and reload the plugin (Settings -> Community plugins -> reload, or the "Reload app" command).

License

MIT

HealthExcellent
ReviewPassed
About
Preview local .html and .htm files inside Obsidian with styles and scripts running so self-contained pages (forms, dashboards, reports) render as written. Inject base href for relative assets, open or reload previews from the toolbar or context menu, and keep previews sandboxed by default for safety.
HTMLFilesInterface
Details
Current version
1.0.1
Last updated
13 hours ago
Created
13 hours ago
Updates
2 releases
Downloads
1
Compatible with
Obsidian 1.4.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
chengmiaofanchengmiaofanserena
GitHubserena-sheng
  1. Community
  2. Plugins
  3. HTML
  4. Vault HTML Preview

Related plugins

Front Matter Title

Define a title in frontmatter to be displayed as the filename.

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.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Advanced URI

Control everything with URI.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Local REST API with MCP

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

ChatGPT MD

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

Quick Explorer

Perform file explorer operations (and see your current file path) from the title bar, using the mouse or keyboard.