Open-source project
shd101wyy/vscode-markdown-preview-enhanced avatar
shd101wyy/vscode-markdown-preview-enhanced

Markdown Preview Enhanced: a preview you open yourself, and the exceptions under its privacy page

One of the "BEST" markdown preview extensions for Visual Studio Code

2,106 stars268 forksTypeScriptNOASSERTION

At a glance

What is it?
Markdown Preview Enhanced is a VS Code extension that runs math, diagrams, pandoc export and executable code chunks on top of the built-in preview, and its privacy headline hides a CDN default and 3 remote image hosts. It fits writers who export the same file to PDF, slides or print, and it does not fit environments that forbid remote rendering.
Who is it for?
Markdown Preview Enhanced earns its place in any VS Code setup where a note has to become a PDF, a slide deck or a printed handout, and its diagram engines run locally once you install Graphviz or pandoc yourself. It does not earn one where loading math from the jsdelivr CDN is forbidden, where no PlantUML server is reachable, or in a setup that never exports anything.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 14 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 21, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A preview that refuses to open on its own

Getting Started takes 3 steps and the third one is where first-time users stall. You open a project folder with File and Open Folder, you open a Markdown file, and then nothing renders. This preview does not start by itself. Three commands bring it up: right-click the editor and choose Markdown Preview Enhanced: Open Preview to the Side, press ctrl-k v with cmd-k v on macOS, or run Markdown Preview Enhanced: Open Preview from the Command Palette. Once the pane is up, the keybinding table covers the rest of the session, including scroll sync and the code chunk shortcuts.

text
<kbd>cmd-k v</kbd> or <kbd>ctrl-k v</kbd>                      | Open preview to the Side
<kbd>cmd-shift-v</kbd> or <kbd>ctrl-shift-v</kbd>              | Open preview
<kbd>cmd-k shift-l</kbd> or <kbd>ctrl-k shift-l</kbd>          | Open locked preview to the Side
<kbd>cmd-k cmd-shift-l</kbd> or <kbd>ctrl-k ctrl-shift-l</kbd> | Toggle preview lock
<kbd>ctrl-shift-s</kbd>                                        | Sync preview / Sync source
<kbd>shift-enter</kbd>                                         | Run Code Chunk
<kbd>ctrl-shift-enter</kbd>                                    | Run all Code Chunks

Every row maps to 1 command, and the cmd key stands for ctrl on Windows. Scroll sync runs both ways through ctrl-shift-s, which also reads Sync preview / Sync source, so a writer can move from pane to pane in either direction without reaching for a scrollbar.

Step 2 hides a sharper constraint than the manual preview does. Opening an entire drive as the workspace skips note indexing, and note indexing covers wikilinks, backlinks, tags and the graph, with a warning raised in the process. Those 4 features are note-graph features, and they need a bounded folder to walk. The folder you choose in step 1 decides whether they ever work, and changing it later means reindexing from scratch.

Diagrams and exports lean on binaries already on the machine

Automatic scroll sync, math typesetting, mermaid, PlantUML, WebSequenceDiagrams, pandoc, PDF export, code chunks and a presentation writer make up the advertised surface. Two projects are credited with the original ideas, Markdown Preview Plus and RStudio Markdown, and what separates this extension from a plain read-only preview is where the work happens rather than how it looks.

Diagrams for Mermaid, Graphviz, Vega, WaveDrom, D2 and TikZ render locally through bundled or system-installed tools, so the output depends on what already sits on your machine. Pandoc, ebook and PDF export work the same way, using locally installed tools with no upload involved. That is the extension's real bargain: nothing phones home, and nothing arrives precompiled either. A missing Graphviz install is a blank diagram, not a fallback image.

PlantUML is the exception, because it can be pointed at a server through the plantumlServer config key instead of a local .jar file. Execution is bound into the editor as well: shift-enter runs 1 Code Chunk and ctrl-shift-enter runs all of them, so a fenced block in a note runs where it is written instead of being copied into a separate terminal.

Two compiled entry points, desktop and browser

package.json declares 2 compiled outputs rather than 1: ./out/native/extension.js as main and ./out/web/extension.js as browser. That pair explains why the same listing shows up in the VS Code Marketplace and on VS Code for the Web at vscode.dev, since the web bundle needs a different host entry than the desktop one.

json
"name": "markdown-preview-enhanced",
"version": "0.8.39",
"license": "NCSA",
"main": "./out/native/extension.js",
"browser": "./out/web/extension.js",
"l10n": "l10n/bundle.l10n.json",
"packageManager": "[email protected]",

The browser development loop builds the web variant and serves a crossnote directory on port 6789, while a separate script puts the extension host on port 5000 over TLS using certificate and key paths under your home directory.

bash
node build.js --web-dev
npx http-server ./crossnote -p 6789 --cors

One detail a skim misses: the top-level repository entries contain no crossnote directory and no out directory, yet the scripts serve both by name. Neither is checked in, so both have to be produced by the build before those two commands do anything useful. Nothing in the repository layout says which task creates them.

The privacy headline and the CDN default beneath it

This extension does not collect, transmit, or share your data with any external service, and the privacy section adds that there is no telemetry, no tracking and no phone-home. The 6 bullets underneath narrow that claim in ways the headline does not.

Math typeset through KaTeX or MathJax runs locally or through a CDN JavaScript library you configure, and the default named for that setting is jsdelivr. The out-of-the-box math path is therefore a network fetch, not a local render, which makes the headline true only for a configuration the extension does not choose for you. PlantUML is rendered through your own PlantUML server or a local .jar file, and kroki.io is called out as the one remote service you would have to configure explicitly.

Image upload is opt-in, but it ships inside the same build. imgur, sm.ms and qiniu are wired in as targets, and each one needs API credentials you supply before an upload will do anything. Read the headline as a statement about defaults plus intent, not as a statement about the reachable network surface of the code.

Pinned toolchain: pnpm 10, Nix files, husky hooks on install

The package manager is pinned as [email protected] and pnpm-lock.yaml is committed, so a contributor needs pnpm rather than npm or yarn. Three environment files sit beside it, flake.nix with its flake.lock, shell.nix and .envrc for direnv, plus .tool-versions for version managers that read that format. Linting and formatting go through eslint.config.mjs and prettier.config.js, and the build runs gulpfile.js.

bash
gulp copy-files && gulp clean-out && node build.js
pnpm check:eslint
pnpm test:unit

A git hook installs itself from .husky/ because the prepare script runs husky during install, so any install leaves a hook in the working tree without asking. That is the 1 unexpected step in a contributor setup and it is not optional.

The unit command is the part worth reading twice:

bash
mocha --ui tdd --reporter spec test/find-fragment-target-line.test.js test/block-id-helpers.test.js test/rank-by-closeness.test.js

The command line stops after the third suite name, so the full count of suites is not something the visible file settles. The 3 names still point at real internals: heading fragment targeting, block identifiers and closeness ranking, which are the pieces behind link navigation and backlinks. The last push landed on 2026-10-02 on the develop branch, 5 days after the 0.8.39 build dated 2026-09-27.

Filed under Other, described as one of the BEST

The repository description calls it one of the BEST markdown preview extensions for Visual Studio Code, and the marketplace metadata claims far less. The categories array holds 1 value, Other, and keywords holds 1 value, markdown, so the listing is not filed in a Markdown category despite everything the feature list covers. A reader browsing by category has to know the name already.

Naming follows the same minimal pattern. displayName is the placeholder %displayName% and description is %description%, both resolved at load time through l10n/bundle.l10n.json. Alongside that bundle sit package.nls.json and 10 localized copies, covering az, es, fr, ja, ko, nl, pt-br, tr, zh-cn and zh-tw.

The documentation site ships in 10 languages, English, 简体中文, 繁體中文, 日本語, 한국어, Français, Español, Português, Nederlands and Türkçe. Azerbaijani therefore has a string bundle with no translated manual to load into it, and Türkçe has both. That gap is harmless in practice and easy to miss when scanning the file list.

Licensing runs through the University of Illinois/NCSA Open Source License, declared as NCSA in package.json, which is why GitHub classifies the repository as Other. The project also asks for sponsorship through GitHub Sponsors, PayPal and Wechat Pay, so funding is a standing request in the README rather than an occasional one.

Where Markdown Preview Plus or RStudio Markdown still win

The 2 projects credited for inspiration are also the honest alternatives, and neither mention comes with a feature comparison. What the repository does show is the shape of its own pipeline: rendering engines sit inside the extension, export leaves through pandoc and a presentation writer installed locally, and execution happens in the editor through shift-enter and ctrl-shift-enter rather than through an external kernel.

That difference decides the outcome for one specific reader. RStudio Markdown renders through the R toolchain, so anyone already living in that environment has an export path with nothing to assemble. For everybody else the concentration cuts the other way, since the extension carries the pandoc path, the chunk runner and the diagram list in 1 package and offers no documented way to switch parts of it off.

Two cases put it out of scope entirely. A team whose policy forbids loading math from a CDN is in direct conflict with the jsdelivr default, and a writer who wants the preview to appear on save is in conflict with a preview that stays closed until a command is issued. On a machine with no Graphviz, no pandoc and no reachable PlantUML server, the advertised feature list collapses back to scroll sync and a local preview while the setup cost stays exactly where it was.

Editorial conclusion

Markdown Preview Enhanced earns its place in any VS Code setup where a note has to become a PDF, a slide deck or a printed handout, and its diagram engines run locally once you install Graphviz or pandoc yourself. It does not earn one where loading math from the jsdelivr CDN is forbidden, where no PlantUML server is reachable, or in a setup that never exports anything. Verify first that your binaries are on PATH, that the CDN default suits your policy, and that the folder you open is small enough for note indexing to finish.

Frequently asked questions

Does Markdown Preview Enhanced send my Markdown files to a server?

Markdown content renders locally and never leaves your machine, and the extension reports no telemetry, no tracking and no phone-home. Diagram and export paths reach out only where configured: math can load from a CDN library with jsdelivr named as the default, and PlantUML can be pointed at your own server through the plantumlServer config key.

How do I open the preview for the first time in Markdown Preview Enhanced?

Open a folder, open a Markdown file, then invoke it yourself, since the preview does not start on its own. Use ctrl-k v for the side pane, cmd-k v on macOS, or run Markdown Preview Enhanced: Open Preview from the Command Palette.

Which diagram engines does Markdown Preview Enhanced support, and do I have to install them?

Mermaid, Graphviz, Vega, WaveDrom, D2 and TikZ render locally using bundled or system-installed tools, so at least some of them depend on your machine. PlantUML goes through a server you configure yourself or a local .jar file instead.

Can Markdown Preview Enhanced run code inside a Markdown file?

Yes, code chunks run from the editor. shift-enter runs a single Code Chunk and ctrl-shift-enter runs all of them.

What license is Markdown Preview Enhanced released under?

The University of Illinois/NCSA Open Source License, declared as NCSA in package.json. GitHub does not classify that identifier and lists the repository license as Other.

How do I build Markdown Preview Enhanced from source?

The repository pins [email protected] and expects the build to run through gulp with node build.js. Checks run with pnpm check:eslint and pnpm check:prettier, and unit tests with pnpm test:unit, and husky installs a git hook from the prepare script during install.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. shd101wyy/vscode-markdown-preview-enhanced on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/shd101wyy-vscode-markdown-preview-enhanced.svg)](https://hysenlabs.com/projects/shd101wyy-vscode-markdown-preview-enhanced)

Was this useful?