I love writing in Markdown and would like to be able to write and preview Markdown content in Notepad++.

Are there any WYSIWYG Markdown plugins for Notepad++?

  • It sounds like you want to edit rich text using markdown syntax; Notepad++ is of course just a plain text editor, but which supports syntax highlighting. If you really need offline editing capability, you might want to instead look at a desktop editor that supports it, like this open source one – Geoff Apr 22 '13 at 17:16
  • 1
    Perhaps the 'question' at hand is to find a plug-in to do something like the netbeans markdown plugin; this supplies some syntax highlighting and also has a preview mode. The preview mode can be configured to save the HTML version, which I find quite handy for readme files. – will Mar 31 '15 at 22:54
  • There is an open issue for native Markdown support on the Notepad++ GitHub repository, but it doesn't seem to have gotten much traction. – Steven Vascellaro Jan 2 at 15:35

There's a project called Markdown Syntax Highlighting for Notepad++ on GitHub.

This project adds custom language highlighting for Markdown:

enter image description here

There's a version available for both the standard color scheme and the dark (ZenBurn) theme. After installation, you'll find a new option in the Language dropdown.

enter image description here

  • 7
    How can I view the preview? – srk Apr 22 '13 at 17:03
  • 16
    @srk: I don't think you can. If you want a proper Markdown editing experience, I would recommend looking at MarkdownPad. Otherwise, you may have to construct a macro maybe to render the document and open it in a browser. But that would be a horrible workflow I guess :\ – Der Hochstapler Apr 22 '13 at 17:06
  • @srk: It's syntax highlighting just as the one I suggested. At least from what I can tell. – Der Hochstapler Apr 22 '13 at 17:08
  • 3
    It's pretty bad syntax highlighting, eg # inside a link highlights to the end of the line like a comment. The project hasn't been touched in 2 years. There are a number of forks, but it is hard to tell which is better. – NateS Oct 5 '14 at 12:40
  • "The project hasn't been touched in 2 years", that's not true anymore. "Latest commit a18079b on Dec 8, 2017". – gerleim Mar 12 at 8:24

MarkdownViewer++ is a Notepad++ plugin that lets you type a file using Markdown and see the preview in real time, in a preview panel.

To clarify: unlike Markdown Syntax Highlighting for Notepad++, which was recommended by Oliver Salzburg here, it doesn't support syntax highlighting and inline rendering. The text file is treated as a normal one, and the plugin shows it rendered in another pane.

A picture will make it clearer:

(Click here to see it at full size)

Among its features:

  • It supports CommonMark
  • You can export the result to HTML or to PDF
  • The preview panel can be moved around, resized at will, and docked

How to install it

To install it, use Notepad++'s plugin manager: open Notepad++ and go to PluginsPlugin ManagerShow Plugin Manager, then scroll to MarkdownViewer++, select it, and click on Install. It will automatically download the plugin and install it. At this point the editor must be restarted, and it will ask you whether you want to do it immediately (so there's no risk of losing your work).

  • 3
    Too bad it doesn't support syntax highlights. I need it for highlighting code. – SAm Jun 24 '17 at 9:09
  • 1
    Last versions of Notepad++ don't include the Plugin Manager anymore. It's easy to install it by copying the required DLL ( github.com/nea/MarkdownViewerPlusPlus#installation ) – tehnicaorg Jan 10 at 9:18
  • @SAm you can use this in conjunction with the Markdown Syntax plugin with no problems in my experience – seneyr Jul 2 at 15:00

If you want to automatically preview Markdown in Notepad++ you can use the HTML Preview plugin (version 1.3 and higher) in combination with a Markdown tool. In the HTML preview plugin you can define a filter (a program that will be executed on a source file automatically before previewing the file).

You can define a filter using a menu option (changing the provided sample file does not work), or manually if you put Filters.ini file in the folder plugins\Config\PreviewHTML. An example of Filter.ini file is enclosed in the Preview plugin archive file available from PreviewHTML web page.

This is an example of Filters.ini file that uses a Python Markdown implementation:

; Content of Filters.ini file
[Markdown]
Extension=.md
Language=Markdown
Command=python -m markdown "%1"
  • This answer would be better with a few things made clearer. (1) With which menu item one can define a filter? (2) Do you mean the program should take tab X in NPP as input and send output to tab Y in NPP as HTML, which can then be previewed with HTML Preview? Could you specify what exactly is markdown in your command line? I'm trying to get this working with markdown2, but no success yet. – RolfBly Feb 17 '15 at 13:52
  • 4
    It is a little tricky to make this working:1. install python with "pip" (msi installer for python version 3.4.3 does this) 2.install markdown :"pip install markdown" 3. install the version >v1.3 of PreviewHTML, this is important because the plugin manager only provides the v1.2: get it manually from git repo fossil.2of4.net/npp_preview/info/fb02a79e74ace3be 4.create the filter from the menu "plugin/Preview HTML/Edit Filter Definitions" - here paste the Script. And then it works! – pdem Apr 16 '15 at 12:27
  • it just not work. – Mostafa Apr 24 '17 at 7:10
  • 1
    @pdem's instructions work beautifully! To install version 1.3, unzip the downloaded 1.3 files, copy the .dll to the Notepad++/plugins folder and the PreviewHTML folder to the Notepad++/plugins/Config folder and restart Notepad++. – nzn Jul 19 '17 at 5:28

The "Edditoria" GitHub repository has a number of bugs (for example, # inside a link is broken) and hasn't been updated for years. After trying out the most active forks, this one is much better.

  • seems this has changed in 2018 markdown_npp has not been updated for 5 years, but Edditoria/markdown-plus-plus has been updated only 2 months ago – TmTron Jan 16 at 10:23
  • @TmTron Good point, though the original repo has seen only a couple commits in all these years. Even the fork I mentioned didn't work perfectly, but it's something. – NateS Jan 16 at 13:40

I found a simpler workflow is to use the Markdown extension in Chrome, do your edits in Notepad++, then point Chrome at your file and reload after each change.

There is no need for complex configuration, and it gets the job done for me.

  • Best solution IMHO. Thanks. – Jpsy Feb 9 at 12:31

For syntax highlighting I would go for the solution of Oliver Salzburg.

Here I found a link to a nice trick if you want to preview Markdown in Notepad++ (link to the "trick").

The Gist: There is a Notepad++ extension called NPP_EXEC, which executes scripts. Combine it with the Perl (Python, Node.js, etc.) Markdown script to generate HTML output into a tab.

It is not very verbose, but I hope this still helps others that want the same. (Like me:))

This is a version, that could be used (it with a Node.js implementation of md2html), for people that don't like to wade through documentation:

NPP_SAVE
SET OUTFILE = C:\temp\md2html.html
cmd /c md2html "$(FULL_CURRENT_PATH)" > $(OUTFILE)
NPP_RUN chrome $(OUTFILE)
  • Please insert the gist or contents of the link. Links break and fade away which means that that part of your answer becomes meaningless to future visitors. – Tog Oct 8 '13 at 8:53
  • @Tog Thanks for the Tip. Will do. :) – winner_joiner Oct 8 '13 at 11:07
  • This answer assumes the reader is either familiar enough with NPP_EXEC or willing to wade through its documentation to find out what exactly the script should be and how to get the output of a markdown-to-html converter in a new tab of Notepad++. – RolfBly Feb 15 '15 at 21:40
  • @RolfBly i hope my Update helps you. this is how i use it, there are surely better or nicer ways. :) – winner_joiner Feb 16 '15 at 10:47
  • 1
    NPP_RUN $(OUTFILE) ie without chrome, also works. Launches your default browser with c:\temp\md2html. – RolfBly Feb 18 '15 at 14:13

Just a few tweaks to winner joiner's answer. I now have two NPP_EXEC scripts, each under a keyboard shortcut.

One creates an HTML version of the Markdown file, with the same filename in the same directory, launches it in the default browser and shuts the console window. You then alt-tab over to the browser to admire the results.

NPP_SAVE
SET OUTFILE = "$(CURRENT_DIRECTORY)\$(NAME_PART).html"
cmd /C \Python34\python.exe -m markdown2 "$(FULL_CURRENT_PATH)" > $(OUTFILE)
NPP_RUN $(OUTFILE)
NPP_CONSOLE 0

The other does the same, except does not launch it in the browser (NPP_RUN $(OUTFILE) isn't there). I find this handy when I've already run the first script once: just alt-tab over to the browser and hit F5 to refresh it, rather than opening a new tab with the most recent edits.

You can save each script with its own name, stick it in the Macro menu with NPP_EXEC's Advanced Options, and then assign a keyboard shortcut to it via menu SettingsShortcut Mapper.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.