---
name: "html-to-markdown"
section: "1"
platform: "linux"
package: "php-league-html-to-markdown"
version: "5.1.1-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/html-to-markdown"
---

# html-to-markdown(1)

convert HTML to Markdown

## NAME

html-to-markdown - convert HTML to Markdown

## SYNOPSIS

**html-to-markdown** \[*OPTIONS*\] \[*FILE*\]

## DESCRIPTION

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

## OPTIONS

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

## EXAMPLES

Converting a file named document.html:

-

  html-to-markdown document.html

Converting a file and saving its output:

-

  html-to-markdown document.html \> output.md

Converting from STDIN:

-

  echo -e '\<h1\>Hello World!\</h1\>' \| html-to-markdown

Converting from STDIN and saving the output:

-

  echo -e '\<h1\>Hello World!\</h1\>' \| html-to-markdown \> output.md
