--- id: inscriptis version: "2.7.4" license: Apache-2.0 license_treatment: permissive maintenance: active --- # inscriptis — inscriptis - HTML to text converter. License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does Inscriptis is a Python library that converts HTML to plain text with awareness of document layout and structure. Unlike simple text extraction tools, it interprets HTML semantics (lists, tables, alignment) and a subset of CSS properties to produce text output that more closely resembles how a browser would render the page. This makes it particularly useful when the spatial arrangement of text matters—for knowledge extraction, NLP tasks, or data science work on web content. The library provides three interfaces: a Python API for embedding in applications, a command-line tool for batch conversion of files or URLs, and support for annotated output where text can be tagged with semantic information from the original HTML structure. It handles complex constructs like nested tables and supports multiple output formats including XML and JSONL for compatibility with annotation tools. Use it for: - Extract clean text from web pages for machine learning datasets or language model training while preserving document structure. - Convert HTML email or web content to readable plain text for archival, search indexing, or accessibility purposes. - Annotate extracted text with semantic labels derived from HTML tags and attributes for knowledge extraction or document classification tasks. - Batch convert HTML files to text with layout-aware formatting for content migration or data pipeline preprocessing. - Support qualitative analysis workflows by generating structured text output suitable for manual annotation in tools like doccano. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts HTML documents to plain text while preserving layout, supporting nested tables, CSS subset interpretation, and optional text annotation based on HTML structure. Yes. Inscriptis is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—layout-aware HTML-to-text conversion—better than generic alternatives. Its Apache-2.0 license is permissive. Install it if you need text extraction from HTML where structure and layout matter; skip it if you only need basic text stripping. ## Install pip install inscriptis uv add inscriptis poetry add inscriptis ## Installing inscriptis Before you install: Low friction: pure Python wheel with only two runtime dependencies (lxml, requests). Actively maintained with a release 4 days ago; repo shows 345 stars and continuous development. License in practice: Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; attribution required but no copyleft obligations. Quickstart: pip install inscriptis import urllib.request from inscriptis import get_text html = urllib.request.urlopen('https://example.com').read().decode('utf-8') text = get_text(html) print(text) Requires Python 3.10 or later. Verify before relying: - Performance characteristics on very large HTML documents or batch processing scenarios. - Actual CSS subset coverage and which specific properties are interpreted beyond those listed in the description. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags html to text conversion, extract text from html, layout-aware html parsing, html text extraction, annotated html to text, nested table conversion, web scraping text extraction, text-extraction, web-scraping, nlp-preprocessing [View on SkillFed](https://skillfed.io/packages/inscriptis) · [View on PyPI](https://pypi.org/project/inscriptis/)