@kszongic/html2text-cli
v1.0.0
Published
Strip HTML tags and decode entities — simple CLI tool to convert HTML to plain text
Maintainers
Readme
@kszongic/html2text-cli
Strip HTML tags and decode entities — convert HTML to plain text from the command line.
Zero dependencies. Works with files or stdin.
Install
npm install -g @kszongic/html2text-cliUsage
# Convert a file
html2text page.html
# Pipe from stdin
curl -s https://example.com | html2text
# Pipe from echo
echo "<h1>Hello</h1><p>World & friends</p>" | html2text
# Hello
# World & friendsFeatures
- Strips all HTML tags
- Decodes common HTML entities (
&,<,{,{, etc.) - Removes
<script>and<style>blocks - Converts
<br>and block-level tags to newlines - Collapses excessive blank lines
- Zero dependencies
Options
| Flag | Description |
|------|-------------|
| -h, --help | Show help |
| -v, --version | Show version |
License
MIT © 2026 kszongic
