Share a Plotly or Jupyter report as interactive HTML without losing the chart

Export a self-contained interactive report, remove sensitive notebook data, check the 1 MB limit and sandbox boundaries, then verify hover and zoom at the public URL.

Export the result as HTML, then verify the actual file before sharing it. A notebook view on GitHub may not run custom JavaScript, while a Plotly HTML export can keep hover, zoom, legends, and inline scripts. The trade-off is file size and the risk of embedding more data than the visible chart shows.

Choose the right export

Export Interactive? Main trade-off
PNG or SVG No Small and predictable, but no hover or filtering
Notebook on GitHub Limited GitHub renders notebooks but custom JavaScript may not work
Plotly HTML using a CDN Yes when the library loads Depends on an external network request
Self-contained Plotly HTML Yes Plotly says the file can exceed 5 MB

HTML2WEB’s anonymous flow currently accepts one file up to 1 MB. Its viewer blocks external network connections, so a CDN-dependent chart is not a reliable fit. A full self-contained Plotly file may exceed the size limit before data is added.

Prepare a shareable artifact

  1. Restart or clear the notebook output you do not need.
  2. Remove access tokens, local paths, user names, internal URLs, raw query results, and hidden hover fields.
  3. Aggregate or replace sensitive rows with public fixture data.
  4. Export only the final figure or report section.
  5. Prefer inline code and styles that do not need external requests.
  6. Check the file size in bytes.
  7. Open the HTML offline and test the interactions.
  8. Publish with a short expiry and verify the public link in a private window.

Do not assume that deleting a visible table removes its data. Plotly traces, notebook outputs, script variables, and HTML source can contain values that do not appear until someone inspects the page.

When the file is larger than 1 MB

Use one of these honest alternatives:

  • publish a static SVG or PNG with a short written interpretation;
  • reduce points, precision, repeated labels, or unused traces;
  • split a multi-chart report into distinct, task-focused pages;
  • host the application in an environment designed for larger artifacts and runtime dependencies.

Do not minify away provenance or remove accessibility text merely to hit a limit. If the chart needs live data, authentication, callbacks, Python execution, or large libraries, it is an application—not a single-file preview.

Verify the recipient experience

At the public URL, test keyboard access, visible labels, hover or zoom, legends, mobile width, expiry, and the absence of network errors. Add a plain-language summary before the chart so the main result is available even when an interaction is inaccessible.

Publish a sanitized file with the HTML-to-URL tool. For reports produced by an agent, also run the secret-check workflow before upload.

On this page