---
name: "commonmark"
section: "1"
platform: "linux"
package: "php-league-commonmark"
version: "1.5.7-2"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/commonmark"
---

# commonmark(1)

parse Markdown

## NAME

commonmark - parse Markdown

## SYNOPSIS

**commonmark** \[*OPTIONS*\] \[*FILE*\]

## DESCRIPTION

If no file is given, input will be read from STDIN

## OPTIONS

**-h**, **--help**    Shows help and usage information

**-v**, **--version** Shows the currently installed version

**--safe**        Escapes all raw HTML input and removes unsafe URLs

## EXAMPLES

Converting a file named document.md:

-

  commonmark document.md

Converting a file and saving its output:

-

  commonmark document.md \> output.html

Converting from STDIN:

-

  echo -e '# Hello World!' \| commonmark

Converting from STDIN and saving the output:

-

  echo -e '# Hello World!' \| commonmark \> output.html

See also:

Full documentation can be found at http://commonmark.thephpleague.com/
