local/tools
dev / Native app / v1.0.3

HTML Extractor

Extract data from HTML pages with CSS selectors into JSON or CSV.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/html-extractor/install.ps1 | iex
  • update
    localtools-html-extractor update
  • remove
    localtools-html-extractor uninstall

Opens at http://127.0.0.1:47120 in your browser. Run localtools-html-extractor --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.

Direct download

PlatformFileSize
Windows x64html-extractor-1.0.3-windows-x64.zip3.6 MB
macOS Apple Siliconhtml-extractor-1.0.3-macos-arm64.zip3.3 MB
macOS Intelhtml-extractor-1.0.3-macos-x64.zip3.6 MB
Linux x64html-extractor-1.0.3-linux-x64.zip3.5 MB
Linux ARM64html-extractor-1.0.3-linux-arm64.zip3.2 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Open HTML Extractor (it starts at http://127.0.0.1:47120).
  2. Paste HTML or choose a saved .html file.
  3. Enter a row selector, e.g. article or tr: one result row per match.
  4. Edit the field map: a name, a CSS selector inside the row, and optionally an attribute such as href.
  5. Press Extract, then copy or download the JSON or CSV.
  6. From a terminal: localtools-html-extractor extract --rows article --fields fields.json --format csv page.html > out.csv

FAQ

Can it fetch a live URL or run the page's JavaScript?

No. It works on HTML you paste or save, entirely offline. Save the page from your browser (or with curl) first; content built by JavaScript must be saved after it has rendered.

Which CSS selectors are supported?

The Cascadia selector set used by goquery: type, class, id, attribute, combinators, :nth-child, :not, :has, :contains and more. An unsupported selector is reported as an error instead of silently matching nothing.

What happens with broken HTML?

It is repaired the way browsers do, using Go's HTML5 parser, so unclosed tags and missing tbody elements behave as in a browser. Declared legacy encodings such as windows-1252 or Shift_JIS are decoded.

Will large numeric IDs be rounded?

No. Every value is returned as a string, so an ID like 9007199254740993 stays exact in both JSON and CSV.

How big can the input be?

Up to 4 MiB of HTML, 5,000 rows and 20 fields per run, with a 10-second limit. Larger inputs are rejected with a clear message instead of hanging.