How to Summarize Text Locally With Chrome’s Summarizer API

Chrome can summarize text on your device. See what the first model download requires and try a JavaScript example that keeps the text in the browser.

Laptop showing Chrome turning a long passage into three summary bullet points.

Give a notes app a Summarize button and it can turn a long handover into a few points for the next shift. On a supported desktop, Chrome’s Summarizer API can do that work on the device. The page supplies the text, Chrome runs the model, and the result comes back to the page. The first use may require a model download.

What stays on the device

Chrome has offered the Summarizer API since version 138. The browser handles downloading and updating the model, so the site only has to supply the input and display the result. The API offers several output types, including key points, a short overview, and a headline.

Google says the model runs without sending the input to Google or a third party. Once the model is ready, a page that is already loaded can call it offline. Check the rest of the application separately if privacy matters. A notes app can still sync the original note to its server, and making an entire site work offline also requires the page itself to be available.

Can your PC run it?

Google lists Windows 10 and 11, macOS 13 or later, Linux, and eligible Chromebook Plus devices. Its requirements specify at least 22 GB free on the drive that holds the Chrome profile. That is the free-space requirement, and the model itself is smaller. For CPU execution, Google specifies at least 16 GB of RAM and four CPU cores. Its GPU requirement is more than 4 GB of VRAM. The initial download needs a suitable internet connection.

The browser version alone gives you an incomplete answer. Use Summarizer.availability() with the options you plan to use. That checks the configuration on the current device. MDN lists four named states.

State What the page can tell the user
available The model is ready to summarize.
downloadable Chrome needs to download model data first.
downloading A download is already in progress.
unavailable The current browser or configuration can’t provide the feature.

Try it on a page you control

Save this snippet as an HTML page and serve it on HTTPS or localhost. Open it in desktop Chrome, paste a short English passage, and click Summarize. A click gives Chrome the user interaction it needs if the model has to download. The example displays a plain-text summary and includes no calls to a cloud model.

<label for="source-text">English text</label>
<textarea id="source-text" rows="6"></textarea>
<button id="summarize" type="button">Summarize</button>
<p id="summary-status" role="status"></p>
<pre id="summary-result" style="white-space: pre-wrap"></pre>

<script>
  const source = document.querySelector("#source-text");
  const button = document.querySelector("#summarize");
  const statusMessage = document.querySelector("#summary-status");
  const result = document.querySelector("#summary-result");
  const options = {
    type: "key-points",
    format: "plain-text",
    length: "short",
    expectedInputLanguages: ["en"],
    outputLanguage: "en"
  };

  button.addEventListener("click", async () => {
    const input = source.value.trim();
    result.textContent = "";
    if (!input) {
      statusMessage.textContent = "Paste some English text first.";
      return;
    }

    button.disabled = true;
    let summarizer;
    try {
      const api = globalThis.Summarizer;
      const state = await api?.availability(options);
      if (!state || state === "unavailable") {
        statusMessage.textContent = "Local summarization is unavailable here.";
        return;
      }

      statusMessage.textContent = state === "available"
        ? "Summarizing on this device…"
        : "Preparing Chrome’s local model…";
      summarizer = await api.create(options);
      result.textContent = await summarizer.summarize(input);
      statusMessage.textContent = "Summary ready.";
    } catch {
      statusMessage.textContent = "Chrome could not generate a local summary.";
    } finally {
      summarizer?.destroy();
      button.disabled = false;
    }
  });
</script>

For a test with concrete details to check, paste this handover note.

The staging migration starts Tuesday at 18:00 UTC. The production migration is scheduled for Friday at 21:00 UTC if QA approves it by Thursday at noon UTC. The infrastructure team runs the migration. The support team posts the status update.

Measure the first run and check what the model leaves out

Check the setup time separately. A run that has to download the model can take longer than one with the model ready. Time those two cases separately. Once you have a summary, leave the page open, disconnect the device, and run it again to check offline behavior.

Read the summary beside the original. In the handover above, verify whether the summary preserves the two migration times and the QA condition. A summary that says production will move on Friday without the condition changes the meaning of the note. If users rely on the dates, keep the original easy to open beside the summary.

Decide what to show when Chrome can’t run the model. For a note editor with a mix of desktop and mobile users, keep the text accessible on every device. Display the local summary option where the API is available. If the app also offers cloud summarization, make it clear when choosing it will send the text to a server.

Chrome’s browser-managed model fits for optional features on supported desktops. Applications that need to select a particular model can also use a separate local runtime. One example is running a local model with Ollama on Windows or Linux.

Sources