$linuxjunkies
>

mdcat(1)

mdcat renders Markdown files in the terminal with syntax highlighting and formatting.

UbuntuDebianFedoraArch

Synopsis

mdcat [OPTION]... [FILE]...

Description

mdcat is a terminal Markdown viewer that displays Markdown files with proper syntax highlighting, colors, and formatting. It supports CommonMark and GitHub Flavored Markdown, making documentation readable directly in the terminal without converting to HTML or PDF first.

mdcat automatically detects terminal capabilities and adjusts output accordingly, supporting 24-bit true color, hyperlinks, and inline images where available. It can paginate long documents and respects terminal width for proper text wrapping.

Common options

FlagWhat it does
-p, --paginatepaginate output if it exceeds terminal height (use pager)
-c, --no-colordisable colored output, use plain text
--columns NUMset column width for output (default: terminal width)
-i, --dump-headersdump document structure showing headers
--no-hyperlinksdisable terminal hyperlink escape sequences
-h, --helpshow help message and exit
-V, --versiondisplay version information

Examples

display README.md with syntax highlighting in the terminal

mdcat README.md

view a long manual file with pagination through less or more

mdcat -p MANUAL.md

render Markdown without color for plain text output

mdcat -c DOCUMENT.md

format output to 80 columns regardless of terminal width

mdcat --columns 80 file.md

pipe Markdown content from stdin to mdcat

cat file.md | mdcat

display multiple Markdown files sequentially with formatting

mdcat *.md

Related commands