Oskar Austegard

HTML Trimmer for LLM Communication

An interactive web tool designed to intelligently reduce the size of large HTML documents, making them more efficient and cost-effective for use with Large Language Models (LLMs).

Live Demo Source Code

Overview

When working with LLMs, providing large HTML documents as context can be slow and expensive. This tool provides a powerful interface to parse, analyze, and interactively trim HTML content. It goes beyond simple tag stripping by identifying structural patterns and redundancies, allowing you to preserve the essential structure of a page while drastically reducing its size.

Features

Usage

  1. Open the HTML Trimmer.
  2. Paste your full HTML content into the Input HTML text area.
  3. Click Parse HTML.
  4. Navigate to the Structure Analysis tab.
    • Use the Table Analysis and Detected Patterns panels to perform high-level trimming (e.g., “Keep 3 Rows” in a large table).
    • Use the interactive tree view at the bottom to manually uncheck any specific elements you wish to remove.
  5. Switch to the Preview tab to see how the trimmed HTML renders.
  6. Go to the Output tab to copy the final, minified HTML for use in your LLM prompt.

Technical Details

Credits

Created by Oskar Austegard (@oaustegard)


For issues, feature requests, or contributions, please open an issue on GitHub.