md-to-text-lite
A zero-dependency Python micro-tool to strip Markdown formatting and extract clean, readable plain text.
The Problem
When you scrape websites, process LLM outputs, or prepare documents for Text-to-Speech (TTS), you often end up with Markdown strings full of **bold**, [links](url), and # Headers. You just want the plain text, but importing heavy HTML/Markdown parsers like beautifulsoup4 or markdown just to strip text is overkill.
The Solution
md-to-text-lite uses pure standard library regex to intelligently strip markdown syntax while preserving the actual content. It runs in microseconds.
Installation
pip install md-to-text-lite
Usage
from md_to_text_lite import markdown_to_text
md_string = """
# Hello World
This is a **bold** statement with a [link](https://github.com).
* List item 1
* List item 2
"""
clean_text = markdown_to_text(md_string)
print(clean_text)
# Output:
# Hello World
# This is a bold statement with a link.
# List item 1
# List item 2
Features
- Zero Dependencies: Pure Python standard library (
re). - Intelligent Stripping: Keeps the alt-text of images and text of links, removes URLs.
- Code Blocks: Removes multi-line code blocks entirely (since you usually don't want to read code aloud or count it in word metrics).
Metadata
Release files for md-to-text-lite 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| md_to_text_lite-0.1.0.tar.gz | 4.4 kB | With provenance | Details for md_to_text_lite-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| md_to_text_lite-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for md_to_text_lite-0.1.0-py3-none-any.whl |
Total release size: 8.4 kB
Release files / md_to_text_lite-0.1.0.tar.gz
| Download URL | md_to_text_lite-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
393b74d41b5f85b9296ee3f2b1589a070224bc1b3c62b6612ed19cb5eaaf0004
|
|
BLAKE2b-256 checksum How to use checksums |
c81ffd2781f23c06b7ca5cd1c9f932242bbcbfe6e985fd21303264961f6594e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / md_to_text_lite-0.1.0-py3-none-any.whl
| Download URL | md_to_text_lite-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5226b972e9a410b8b4284f244db036e229d9fbe6718eb3145a3e72ba85547bc4
|
|
BLAKE2b-256 checksum How to use checksums |
cdd521515053183f8367307f691dbab1e791fb9d28b4f2d5d1ad8a453d183abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logSecurity for md-to-text-lite 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for md_to_text_lite-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.