Glow Markdown: Terminal Markdown Viewers Compared (2026)
September 11, 2026 · 10 min read
Glow Markdown and Other Terminal Markdown Viewers: mdcat, bat
The glow markdown reader from Charm renders a .md file as styled text inside your terminal, with headings, lists, code blocks, and word wrapping. This guide installs Glow, walks through its flags and styles, and compares it with mdcat and bat so you can pick the right terminal Markdown viewer for the job.
What Does Glow Do?
Glow is a command-line tool written in Go that turns Markdown into readable, coloured terminal output. Run glow README.md and you get rendered headings, bullet lists, syntax-highlighted code blocks, and links, all wrapped to a sensible width. Run glow with no arguments and it opens a full-screen TUI that lists the Markdown files in the current directory and lets you browse them.
Under the hood it uses Glamour, the same rendering library that powers the GitHub and GitLab CLIs when they show a README or issue body. That's why output from gh repo view and from Glow look alike.
One historical note, because old articles still mention it: earlier versions of Glow had a "stash" feature that synced documents through Charm Cloud. The v2.0.0 release notes state that the stash feature has been removed. The current major version is v3.0.0, released in August 2026, and it's a local reader only. If a tutorial tells you to glow stash, it's out of date.
How Do I Install Glow?
Glow ships through most package managers. The Glow README lists the current commands; these are the ones you'll use most.
# macOS
brew install glow
# Arch Linux
pacman -S glow
# Windows
winget install charmbracelet.glow
scoop install glow
# Debian / Ubuntu (Charm's apt repository)
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install glow
# Any platform with Go 1.21 or newer
go install charm.land/glow/v3@latest
Fedora and RHEL users add Charm's yum repository with the snippet from the README and then run sudo yum install glow. There are also snap, Nix, FreeBSD, Void, and Termux packages. The Go module path changed to charm.land/glow/v3 with the v3 release, so an older go install github.com/charmbracelet/glow@latest line may fetch a stale version.
Check the install with glow --version, then run glow in any folder that has a README to see the TUI. Press ? inside it to list the hotkeys.
Glow Markdown Flags That Matter
Four glow markdown flags cover almost every day-to-day use. Everything else lives in the config file.
glow README.md # render a file
glow -p README.md # render inside your pager (less by default)
glow -w 80 README.md # wrap at 80 columns instead of the terminal width
glow -s light README.md # use the light style (dark is the other built-in)
glow -s mystyle.json f.md # use a custom Glamour style
glow github.com/charmbracelet/glow # fetch and render a repo README
cat notes.md | glow - # read from stdin
The -p pager flag is the one we reach for most. Without it, a long README scrolls straight past. With it, Glow hands the rendered output to less (or whatever $PAGER is set to), so you get search and scrollback. Glow also accepts an http or https URL and a bare github.com/owner/repo path, which is handy for reading a project's README before you clone it.
Run glow config to open the YAML config file in your $EDITOR. The README documents the keys: style, mouse, pager, width, all, showLineNumbers, and preserveNewLines. Setting pager: true and width: 80 there means you can drop the flags.
Custom Glow Styles With a Glamour JSON File
The -s flag accepts dark, light, auto (the default, which picks based on your terminal background), or a path to a JSON file. Glamour's style gallery also shows dracula, tokyo-night, and notty, each stored as JSON in the library's styles/ directory, so you can pass any of them as a file.
A style file is a flat JSON object with one key per Markdown element. Here is the shape, taken from the top of Glamour's dark.json:
{
"document": { "block_prefix": "\n", "block_suffix": "\n", "color": "252", "margin": 2 },
"heading": { "block_suffix": "\n", "color": "39", "bold": true },
"h1": { "prefix": " ", "suffix": " ", "color": "228", "background_color": "63", "bold": true },
"code_block": { "margin": 2 }
}
Colours are 256-colour terminal codes as strings. Copy dark.json, change the numbers, and pass the file with -s. The keys you'll edit most are document.margin (the left indent), heading.color, and the code_block.chroma block that controls syntax highlighting colours.
Glow vs mdcat vs bat: Which Terminal Markdown Viewer?
These three get lumped together, but only two of them render Markdown. The third highlights it.
| Feature | Glow | mdcat | bat |
|---|---|---|---|
| Renders Markdown to styled text | Yes | Yes | No, highlights the raw source |
| Inline images | No | Yes, in iTerm2, Kitty, WezTerm, VS Code, Ghostty | No |
| Tables | Yes | Yes, no inline markup inside cells | Shown as source |
| Code block highlighting | Yes (Glamour and Chroma) | Yes (syntect) | Yes, for the fence contents |
| Built-in pager | -p flag | Run as mdless | Automatic when output is long |
| Browse a folder of files (TUI) | Yes | No | No |
| Language | Go | Rust | Rust |
mdcat describes itself as a "fancy cat for Markdown" and is the only one of the three that can display images inline. That works in terminals with an image protocol: iTerm2, Kitty, WezTerm, the VS Code terminal, and Ghostty. Its README notes two gaps: no footnotes, and no inline markup or wrapping inside table cells.
Install mdcat with cargo install mdcat or a distro package. Copy or symlink the binary to mdless and it pages automatically.
bat is "a cat clone with syntax highlighting and Git integration". Point it at a .md file and you see the raw Markdown with the syntax coloured, line numbers, and a Git gutter. Headings stay as # lines and bold stays as **asterisks**.
That's the right tool when you're editing a file and want to see the source, and the wrong tool when you want to read it. On older Debian and Ubuntu releases the binary is installed as batcat, so alias it.
We prefer Glow for reading and bat for inspecting. mdcat wins only when a document depends on images and you're in a terminal that can show them.
What a Terminal Markdown Viewer Cannot Render
Terminal output is text, so some Markdown features have no equivalent there. The list below is the same for Glow, mdcat, and every other terminal reader we've tried.
- Mermaid diagrams. A fenced
mermaidblock renders as a code block containing the diagram source. No terminal viewer draws the diagram. See the Mermaid diagrams in Markdown post for where it does render. - Images. Glow shows the alt text and the URL. Only mdcat draws the image, and only in the terminals listed above.
- Raw HTML. Tags such as
<details>or<kbd>are printed as text or dropped. - Math.
$E = mc^2$stays as source. - Links you can click. Some terminals make URLs clickable, but that's the terminal's feature, not the viewer's.
When a document leans on any of those, open it in a browser-based editor. Paste the file into the editor and the preview draws the Mermaid diagram, loads the image, and renders the HTML. The Markdown stays the same; only the renderer changes.
Here's a snippet that shows the difference. Every line renders in the browser preview below; in Glow the image is a placeholder and the table is plain boxes.
Reading READMEs and Code Blocks With Glow
The most common file people open with the glow markdown reader is a README. Everything in the README Markdown guide renders in the terminal: badges become links with alt text, the install code block gets highlighted, and the feature table lines up. The one thing to watch is width. A table wider than the terminal wraps awkwardly, so glow -w 100 or a wider window helps.
Code blocks are where the three tools differ most. Glow highlights a fence based on its language tag, using the Chroma colours from its style file. mdcat does the same with syntect. bat highlights the whole file as Markdown, so a fenced Python block inside it gets Markdown colouring, not Python colouring. If you care about the fence contents, use Glow or mdcat. The Markdown code block guide covers the language tags each highlighter recognises.
If you live in Neovim, the glow.nvim plugin opens a Glow preview of the current buffer with :Glow; it needs the glow binary on your PATH. Our Neovim Markdown guide covers editing setups beyond that one command.
Common Glow Markdown Problems
Glow markdown output scrolls off the screen. You forgot -p. Add it, or set pager: true in glow config so paging is the default.
Colours look wrong on a light terminal. Glow defaults to auto, which usually detects the background correctly. If it doesn't, force -s light or set style: light in the config.
go install github.com/charmbracelet/glow@latest gives an old build. The module moved to charm.land/glow/v3 in v3.0.0. Use that path, or a package manager.
Terminal Markdown Viewer FAQ
Reach for the glow markdown reader when you want a README, changelog, or notes file to look like a document instead of source code, and add -p so long files page. Keep mdcat for image-heavy files in a capable terminal and bat for inspecting raw syntax. When a file needs diagrams, images, or HTML, paste it into the editor and read it there.