Install
Not yet on the Marketplace — install manually via .vsix until then.
2
In VS Code: open Extensions (
Ctrl+Shift+X / Cmd+Shift+X), click the ⋯ menu → Install from VSIX…
3
Right-click any supported file in the Explorer and choose Exact File Preview: Open Preview, or open it from the Command Palette.
What it does
- Opens a sandboxed webview panel beside the active editor showing the file exactly as-is
- HTML and SVG previewed with scripts blocked — no code execution, no network requests
- Markdown rendered safely: headings, bold, italic, lists, code blocks;
javascript:links stripped - JSON pretty-printed and HTML-escaped; invalid JSON falls back to escaped raw text with a note
- XML and plain text shown as escaped readable code
- Files over 2 MB are refused with a clear message — no content embedded
- No server, no network calls, no code execution, no file mutation, no telemetry
Supported file types
.html
Sandboxed iframe — scripts blocked
.svg
Rendered as image — scripts inert
.md
Basic safe Markdown render
.json
Pretty-printed and escaped
.xml
Escaped readable code
.txt
Escaped plain text
Commands
One command, four entry points:
- Command Palette: Exact File Preview: Open Preview
- Explorer context menu (right-click a supported file)
- Editor context menu (right-click in an open supported file)
- Editor title bar icon (when a supported file is active)
Requirements
- VS Code 1.75 or later
- No npm install or build step — works out of the box
Known limits
- HTML files that load external CDN resources (Bootstrap, Tailwind, Google Fonts) will look bare — this is intentional; the preview is static and sandboxed
- Markdown renderer is basic: no tables, footnotes, or embedded HTML
- SVG features that require script or external resources are silently inert
- Not yet on the VS Code Marketplace — manual .vsix install required
- No live reload on file save