English · 简体中文
A fully local Markdown reader for Chrome and Edge. It turns file:// Markdown files and any online
.md URL into a clean, GitHub-flavoured reading view — outline, folder tree, in-page search,
auto-refresh, syntax highlighting and Mermaid — with no build step, no backend, no account and no
telemetry.
Everything is vendored and runs offline. The extension never uploads a single byte of your documents.
| Reads what you already have | .md .markdown .mdx .mkd .mdown .mdc (case-insensitive, query strings included) plus local .txt, both from file:// and http(s):// |
| Never hijacks real pages | A page is only rendered when it actually is plain text (a single <pre> body) — Web apps that merely end in .md are left untouched |
| Outline that follows you | Auto-generated table of contents, scroll-spy highlighting, click to jump, configurable depth |
| Folder browsing | Sibling files of the current document, plus a full folder tree in the side panel via the File System Access API |
| In-page search | Case-insensitive matching, hit count, previous/next, highlight-all |
| Live reload | Watches the file you are editing; re-renders within ~1 s while keeping your scroll position |
| Encoding safe | UTF-8 by default, automatic GBK fallback for legacy Chinese files (no more mojibake) |
| Big-file guard | Files above a configurable threshold are shown as plain text first, with an opt-in "render anyway" |
| 16 real plugin switches | GFM, emoji, sup/sub, insert, mark, footnote, abbreviation, definition list, alerts, heading anchors, copy button, highlight.js, Mermaid, TOC, safe external links, task checkboxes |
| Make it yours | Light/dark/auto, 5 accent palettes, content width, font, size, code wrap, wide tables, custom CSS |
| Import / export | Settings as JSON; reset to defaults in one click |
| Bilingual UI | English and 简体中文, switchable at runtime |
| Reading view | Dark theme |
|---|---|
![]() |
![]() |
| Quick panel | Settings |
|---|---|
![]() |
![]() |
- Grab
markdown-reader-1.0.0.zipfrom the latest release and unzip it. You should end up with a folder that containsmanifest.jsondirectly inside. - Open
chrome://extensions(oredge://extensions) and enable Developer mode. - Click Load unpacked and select the unzipped folder.
- Open the extension's Details and turn on Allow access to file URLs — without it, local
.mdfiles still render, but the sibling-file list cannot be listed. - Optional: remap the shortcuts at
chrome://extensions/shortcuts.
git clone https://github.com/swfk2154/Markdown-reader.gitLoad the cloned folder the same way. There is no build step: files are plain scripts, so after an edit you only need to hit Reload on the extensions page.
Chrome 114+ is required (Manifest V3 + Side Panel API). Firefox is not supported — it has no
side_panelequivalent.
If another Markdown extension is installed, disable it first: two extensions matching
file://*.mdwill fight over the same page.
| Action | How |
|---|---|
| Open a document | Just open a .md file in the browser, or an online Markdown URL |
| Toggle centred layout | Alt+Shift+C |
| Toggle theme | Alt+Shift+T |
| Toggle auto-refresh | Alt+Shift+R |
| Toggle in-page side bar | Alt+Shift+B |
| Open the folder/outline/search side panel | Toolbar icon → Open file side panel (MV3 caps commands at 4, so the panel is not bound to a shortcut) |
| Quick settings | Toolbar icon → panel with Appearance / Reading / Plugins / Info |
| Full settings | Panel → Full settings page |
The side panel has three views: Files (folder tree + saved folders), Outline, Search. Folders are remembered across restarts; after a restart Chrome asks you to re-authorise the folder once — that is a browser security rule, not a permission the extension can keep on its own.
| Permission | Why it is needed |
|---|---|
storage |
Save your settings and UI preferences locally |
sidePanel |
Render the folder / outline / search side panel |
webNavigation |
Detect when a .md URL finishes loading so a broken file path can be repaired |
host_permissions: file:///* |
Read local Markdown files and list sibling files |
- No analytics, no crash reporting, no remote config, no update pings.
- No account, no login, no subscription, no paywall.
- The only network requests are to the document's own URL (refresh + encoding detection).
- All parsing happens in the page; nothing is uploaded, ever.
- Settings live in
chrome.storage.local; folder handles live in IndexedDB. Uninstall and both are gone.
Zero-build by design: the shipped code is the source code.
manifest.json # MV3 manifest
icons/ # 16 / 48 / 128 PNG
lib/ # vendored, offline dependencies (no CDN, no network)
marked.min.js # Markdown parser
purify.min.js # DOMPurify sanitiser
highlight.min.js # syntax highlighting
mermaid.min.js # diagrams
github-markdown.css # GitHub typography
hljs-themes.css
src/
content/ # content script, IIFEs loaded in numeric order
00-core.js # namespace, defaults, storage, i18n, plugin registry
10-render.js # render kernel, plugin pipeline, sanitiser, delegation
20-toc.js # outline + scroll-spy
30-search.js # in-page search
40-tree.js # sibling discovery, directory-page beautifier
50-appearance.js # theme, typography, custom CSS
60-refresh.js # encoding detection, auto-refresh
70-main.js # orchestration entry
background/service-worker.js
shared/idb.js # folder handle persistence
options/ # full settings page
popup/ # toolbar quick panel
sidepanel/ # native side panel
viewer/ # reader page for files opened from the folder tree
tools/
verify.mjs # static self-check (manifest refs, JS syntax, icons, MV3 rules)
pack.py # validate + build a clean distributable
make_icons.py # regenerate the icons
docs/screenshots/
Design notes:
- Content scripts are classic IIFEs, because MV3 content scripts cannot use ES modules. An order
is fixed in
manifest.jsonand a singlewindow.MDVnamespace is shared. - Settings propagate through
chrome.storage.onChanged, not through the service worker — one less hop, one less failure mode. - Folder handles are persisted in IndexedDB from the service worker, because
FileSystemHandlecannot be JSON-serialised intochrome.storage. - The reader page reuses
10-render.jsso the two entry points can never drift apart.
node tools/verify.mjs # manifest / references / JS syntax / icons / MV3 rules
python tools/pack.py # runs the same checks, then builds dist/MDV + a zipverify.mjs currently validates 68 files and 17 scripts. pack.py refuses to produce a package if
any check fails, so a broken zip cannot be published by accident.
- Read-only. This is a viewer, not an editor. Task checkboxes change visually only and are never written back to disk.
- No maths rendering. KaTeX is not bundled; formulas are shown as plain text.
- Documents are read as plain text only. Nothing inside a Markdown file is executed, and no cookies or credentials are attached to the request beyond what the browser would send for that URL.
- Folder tree has no absolute paths. The File System Access API does not expose them, so files
opened from the tree are served through an extension page instead of a
file://URL. mermaid.min.jsis ~3.3 MB, the only heavy dependency. Remove that one line frommanifest.jsonand turn the Mermaid plugin off if you never draw diagrams.- Chrome/Edge only. No Firefox build.
MIT © 2026 swfk2154



