19 Answers
19

If you want to test in a browser, you could try StackEdit, as pointed out by @Aaron or Dillinger since Notepag seems to be down now. Personally I use Dillinger since it just works and saves all my documents in my browser's local database.

dillinger.io also seems to be down now, although it is still the first listed when you google "markdown online viewer", so it might just be me. I successfully used stackedit.io to preview and edit my readme.md.
– AaronJan 10 '17 at 16:31

Dillinger ist ok. Has been ok most of the time.
– threeAug 13 '17 at 17:34

StackEdit formats "definition lists", github doesn't. StackEdit puts triple backtick code blocks on there own line (useful for use in numbered lists), github doesn't. There are other differences. The only safe bet is to trial and error with a gist and delete it when you are done.
– Bruno BronoskyApr 7 at 2:18

The problem with this solution is that GitHub (so far) shows inline diffs of the changes which makes a preview quite unusable if you want to get an impression of how the changes look like and not what actually changed.
– B12ToasterJan 16 '16 at 12:16

2

@B12Toaster You can create a new file on the repository using GitHub website (without saving it) and name it xxx.md and paste your code there. File extension is .md so you can preview your changes. You will update util you finish, then copy the file content and paste it over the original readme.md file.
– Mahmoud ShahoudApr 23 at 12:17

This is a pretty old question, however since I stumbled upon it while searching the internet maybe my answer is useful to others.
I just found a very useful CLI tool for rendering GitHub flavored markdown: grip. It uses GitHub's API, thus renders quite well.

Frankly, the developer of grip, has a more elaborate answer on these very similar questions:

Developer notes

Typically, I wrap my code in an IIFE, but in this case, I didn't see the need, and thought I'd keep it concise

I haven't bothered supporting backlevel IE

For conciseness, I have omitted the error handling code (do you believe me?!)

I'd welcome JavaScript programming tips

Ideas

I'm considering creating a GitHub repository for this HTML file, and putting the file in the gh-pages branch, so that GitHub serves it as a "normal" web page. I'd tweak the file to accept a complete URL - of the README (or any other Markdown file) - as the query string. I'm curious to see whether being hosted by GitHub would sidestep the GitHub API request limit, and whether I run afoul of cross-domain issues (using an Ajax request to get the Markdown from a different domain than the domain serving the HTML page).

Original version (deprecated)

I've preserved this record of the original version for curiosity value.
This version had the following issues that are solved in the current version:

It required some related files to be downloaded

It didn't support being dropped into the same directory as the README.md

If you're using Pycharm (or another Jetbrains IDE like Intellij, RubyMine, PHPStorm, etc), there are multiple free plugins for Markdown support right in your IDE that allow real-time preview while editing. The Markdown Navigator plugin is quite good. If you open an .md file in the IDE, recent versions will offer to install supporting plugins and show you the list.

Markdown​Preview, the plugin for Sublime Text mentioned in an earlier comment is not compatible with ST2 any more, but only supports Sublime Text 3 (since spring 2018).

What's neat about it: it supports GFM, GitHub Flavored Markdown, which can do a bit more than regular Markdown. This is of relevance if you want to know what your .mds will look like on GH exactly. (Including this bit of info because the OP didn't add the GFM tag themselves, and others looking for a solution might not be aware of it either.)

You can use it with the GitHub API if you are online, though you should get a personal access token for this purpose because API calls without authentication are limited. There's more info on Parsing GFM in the plugin's docs.