url2svg

Capture any web page as a high-fidelity SVG using headless Chrome.

Demo

A simple showcase page captured as SVG — text, backgrounds, borders, shadows, and links all preserved as vector elements:

url2svg demo capture

Scaling down

Because the output is vector, the same capture can be shown at any size without re-rendering. The demo above at decreasing widths, down to icon size:

400200100643216
demo at 400px demo at 200px demo at 100px demo at 64px demo at 32px demo at 16px

How it works

  1. Capture — headless Chrome renders the page; JavaScript extracts the full visual tree
  2. Process — the JSON tree is parsed into a Go intermediate representation
  3. Render — the element tree is walked to emit SVG markup

No JavaScript

The SVG is a picture, not a copy of the page's behaviour. Scripts and event handlers are never captured, javascript: and other non-navigation links are dropped, and inline <svg> elements are scrubbed of script before they are embedded. See the README for the full table.

Source (Forgejo) https://git.bytestone.uk/hum3/url2svg
Mirror (GitHub) https://github.com/drummonds/url2svg