A markdown viewer and editor that runs entirely in your browser — your files never leave your device
8
stars
8
commits
HTML
primary language
Sep 1, 2026
updated
A markdown viewer and editor that runs entirely in your browser. Your files stay on your machine — there is no upload endpoint, no account, and no server-side rendering.
Live at kingsbridge-consultancy.com/md-viewer
Drop a .md file on the page (or click Open), read it properly rendered, edit it with a
live preview, and save it straight back to disk. The whole app is one self-contained
index.html (~3.6 MB, ~1 MB over the wire) with every library and font embedded, so you can
also save the page and run it offline from file://.
Markdown files are everywhere now — every AI tool hands you one — but double-clicking a .md
file still gets you a wall of raw text, and most online viewers upload your document to a
server to render it. For work documents and private notes, that's a real cost of a "free"
tool. This renders locally instead.
The claim is checkable rather than promised: everything is inlined, so open devtools and watch the network tab, or read the source with view-source. Only the vendor libraries are minified — the app's own code ships readable.
.md, .markdown, .txt```mermaid fences, theme-aware (re-rendered on dark/light toggle)$inline$, $$display$$, \(...\), \[...\] — math is extracted
before markdown parsing so underscores/asterisks in TeX survive, and $ inside code spans
and fences is left alone> [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION].html — the rendered document as one self-contained file, styles and KaTeX fonts embedded.png — the preview rasterized via an SVG <foreignObject> painted onto a canvas, at up to
2× device scale. Remote images can't load inside an SVG-as-image, so they come out blank;
data: URIs are fineSVG button (real dimensions taken
from its viewBox, not mermaid's width="100%"), or a table for a CSV button (RFC-style
quoting, UTF-8 BOM so Excel reads accents correctly)file_handlers, so once installed, double-clicking a .md file opens it here. The launch
handle is a real FileSystemFileHandle, so Save writes straight back to the file you opened.
Works offlinelocalStorage, so a refresh or crash loses nothing⌘S / ⌘⇧S / ⌘O shortcutsRendering, editing, exports and per-block downloads work in any current browser. Two features depend on Chromium-desktop-only APIs and degrade gracefully elsewhere:
| Feature | API | Elsewhere |
|---|---|---|
| Save back to the original file | File System Access | falls back to a download |
Double-click a .md to open it here | file_handlers + launchQueue | not offered |
No package manager, no toolchain — just Python 3 and bash:
./build.sh
That inlines the vendored libraries and the KaTeX fonts into src/index.template.html and
writes index.html, then copies the PWA sidecars to the repo root. Edit
src/index.template.html, never index.html.
src/index.template.html the app (HTML/CSS/JS), with markers where libraries get inlined
vendor/ the bundled libraries + KaTeX .woff2 fonts
pwa/ manifest.json, sw.js and the icons
tools/make-icons.py regenerates the icons (hand-rolled PNG encoder, no dependencies)
build.sh the build
index.html the built, self-contained app (committed)
licenses/ full license texts for everything bundled
index.html is the entire product. Copy it anywhere a static file can be served, or open it
from disk. It needs no CORS, no CSP beyond allowing its own inline scripts, and no backend.
The manifest.json, sw.js and icon-*.png files beside it are only needed for the
installable-app behavior; serving index.html alone works fine without them. Installability
additionally requires HTTPS (or localhost).
MIT for this project's own code.
The built index.html bundles marked, DOMPurify, highlight.js, KaTeX and Mermaid, so their
licenses travel with any copy you distribute — see THIRD-PARTY-NOTICES.md
and licenses/. A summary is also embedded as a comment at the top of the built file.
Issues and pull requests are welcome. Two things to keep in mind:
src/index.template.html and run ./build.sh; don't hand-edit index.html.8 commits
Hacker News (1)
HTML
99.8%
A markdown viewer and editor that runs entirely in your browser — your files never leave your device
8
stars
8
commits
HTML
primary language
Sep 1, 2026
updated
A markdown viewer and editor that runs entirely in your browser. Your files stay on your machine — there is no upload endpoint, no account, and no server-side rendering.
Live at kingsbridge-consultancy.com/md-viewer
Drop a .md file on the page (or click Open), read it properly rendered, edit it with a
live preview, and save it straight back to disk. The whole app is one self-contained
index.html (~3.6 MB, ~1 MB over the wire) with every library and font embedded, so you can
also save the page and run it offline from file://.
Markdown files are everywhere now — every AI tool hands you one — but double-clicking a .md
file still gets you a wall of raw text, and most online viewers upload your document to a
server to render it. For work documents and private notes, that's a real cost of a "free"
tool. This renders locally instead.
The claim is checkable rather than promised: everything is inlined, so open devtools and watch the network tab, or read the source with view-source. Only the vendor libraries are minified — the app's own code ships readable.
.md, .markdown, .txt```mermaid fences, theme-aware (re-rendered on dark/light toggle)$inline$, $$display$$, \(...\), \[...\] — math is extracted
before markdown parsing so underscores/asterisks in TeX survive, and $ inside code spans
and fences is left alone> [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION].html — the rendered document as one self-contained file, styles and KaTeX fonts embedded.png — the preview rasterized via an SVG <foreignObject> painted onto a canvas, at up to
2× device scale. Remote images can't load inside an SVG-as-image, so they come out blank;
data: URIs are fineSVG button (real dimensions taken
from its viewBox, not mermaid's width="100%"), or a table for a CSV button (RFC-style
quoting, UTF-8 BOM so Excel reads accents correctly)file_handlers, so once installed, double-clicking a .md file opens it here. The launch
handle is a real FileSystemFileHandle, so Save writes straight back to the file you opened.
Works offlinelocalStorage, so a refresh or crash loses nothing⌘S / ⌘⇧S / ⌘O shortcutsRendering, editing, exports and per-block downloads work in any current browser. Two features depend on Chromium-desktop-only APIs and degrade gracefully elsewhere:
| Feature | API | Elsewhere |
|---|---|---|
| Save back to the original file | File System Access | falls back to a download |
Double-click a .md to open it here | file_handlers + launchQueue | not offered |
No package manager, no toolchain — just Python 3 and bash:
./build.sh
That inlines the vendored libraries and the KaTeX fonts into src/index.template.html and
writes index.html, then copies the PWA sidecars to the repo root. Edit
src/index.template.html, never index.html.
src/index.template.html the app (HTML/CSS/JS), with markers where libraries get inlined
vendor/ the bundled libraries + KaTeX .woff2 fonts
pwa/ manifest.json, sw.js and the icons
tools/make-icons.py regenerates the icons (hand-rolled PNG encoder, no dependencies)
build.sh the build
index.html the built, self-contained app (committed)
licenses/ full license texts for everything bundled
index.html is the entire product. Copy it anywhere a static file can be served, or open it
from disk. It needs no CORS, no CSP beyond allowing its own inline scripts, and no backend.
The manifest.json, sw.js and icon-*.png files beside it are only needed for the
installable-app behavior; serving index.html alone works fine without them. Installability
additionally requires HTTPS (or localhost).
MIT for this project's own code.
The built index.html bundles marked, DOMPurify, highlight.js, KaTeX and Mermaid, so their
licenses travel with any copy you distribute — see THIRD-PARTY-NOTICES.md
and licenses/. A summary is also embedded as a comment at the top of the built file.
Issues and pull requests are welcome. Two things to keep in mind:
src/index.template.html and run ./build.sh; don't hand-edit index.html.Hacker News (1)
8 commits
HTML
99.8%