Skip to content
All posts
4 min read
markdown
tutorial
editor
preview
guide

Edit & Preview Markdown in the Browser: A Complete Tutorial (2026)

A hands-on tutorial for editing and previewing Markdown online — when to use a live editor, a paste-and-render previewer, or a read-only viewer, with keyboard shortcuts and a real workflow.

Editing and previewing are the two halves of every Markdown workflow, and choosing the right tool for each saves real time. This tutorial walks through the three browser tools for writing and reading Markdown — a live editor, a paste-and-render previewer, and a read-only viewer — and shows when each one is the right call.

By the end you'll have a repeatable write → preview → polish loop that works on any device with no install.

The three tools and when to use each

ToolUse it when…Mode
Markdown Editor OnlineWriting or editing from scratchTwo-way edit + live preview
Markdown PreviewerChecking how a snippet rendersPaste → instant render
Markdown Viewer OnlineReading a finished .md fileClean, read-only view

Think of it as write, check, and read — three distinct jobs.

Part 1: Writing in the live editor

Open the Markdown editor for a split-pane workspace: source on the left, rendered GitHub Flavored Markdown on the right, updating as you type.

Essential keyboard shortcuts

ActionShortcut
BoldCtrl/⌘ + B
ItalicCtrl/⌘ + I
Insert linkCtrl/⌘ + K
Find & replaceCtrl/⌘ + F
Toggle inline codeCtrl/⌘ + /
Format documentCtrl/⌘ + Shift + F
Toggle previewCtrl/⌘ + Shift + P
Focus modeCtrl/⌘ + .
FullscreenF11

Select text first, then hit the shortcut — more reliable than typing delimiters around long phrases.

A first document

# Project Atlas

A short description of what this does.

## Features

- Live preview
- GitHub Flavored Markdown
- Export to HTML and PDF

## Quick start

```bash
npm install
npm run dev
```

> Tip: see the [cheat sheet](/blog/markdown-cheat-sheet) for full syntax.

Watch the preview update live. The editor autosaves your draft locally, so a refresh won't lose work.

What the editor renders

  • GFM: tables, task lists, strikethrough, autolinks, fenced code with highlighting.
  • Mermaid diagrams and KaTeX math (see the Mermaid guide).
  • Heading anchors for in-page navigation.

Part 2: Checking a snippet with the previewer

Sometimes you don't want to edit — you just pasted Markdown from a chat, a PR, or an LLM and want to see if it renders correctly. That's the Markdown Previewer: paste or drop a .md file, get the rendered result instantly.

This is the fastest way to answer "is this table malformed?" or "did that fence close?" without opening a full editor. For a structural check rather than a visual one, pair it with the GFM checklist.

Part 3: Reading a finished file

To read a Markdown document — a README someone sent you, downloaded docs, exported notes — use the Markdown Viewer Online. Drag-and-drop or paste, and get a clean, readable page with:

  • Dark mode for comfortable reading.
  • An outline navigator for long documents.
  • A printable layout.

No editing UI, no distractions — just the content rendered well.

The complete loop

Here's the write → check → read workflow in practice:

  1. Draft in the editor with live preview and shortcuts.
  2. Format with Ctrl+Shift+F (or the formatter) to normalize whitespace and bullets.
  3. Audit structure with the heading audit and link checker.
  4. Preview a final snippet in the previewer if you only changed a section.
  5. Read/share the finished file in the viewer or export with Markdown to HTML / PDF.

Doing it programmatically

If you're building this loop into an app, the render API is the same engine as the editor preview — render Markdown to sanitized HTML server-side and show it in your product. Validate first with the validate API so malformed input never reaches your renderer.

Common questions

Is my content uploaded? The browser editor and tools process content locally — nothing leaves your browser unless you call the API.

Does it work offline? After first load, the editor works in the browser without a connection.

Which Markdown flavor? GitHub Flavored Markdown (CommonMark + tables, task lists, strikethrough, autolinks). See CommonMark vs GFM.

Quick reference

JobTool
Write / editEditor
Check a snippetPreviewer
Read a fileViewer
FormatFormatter
ExportHTML / PDF

Master the write/check/read split and you'll stop forcing one tool to do three jobs. Start in the editor, and reach for the previewer and viewer when the task is checking or reading rather than writing.

Written by Markdown Viewer Team. Found this useful? Try the editor →

Keep reading

Hand-picked articles related to this one.