Vanilla JavaScript Projects

Project 05, AI in the browser

Smart Writing Assistant

Write a first draft from a short prompt, change its tone, and see exactly which sentences are hard to read. The writing check works in every browser.

Runs on
Chrome built-in AI and your CPU
Model
Gemini Nano
First download
Handled by Chrome
Your browser
Checking

Write and check

Checking which AI writing tools your browser has

Ready
0reading ease
0words
0 minreading time
0long sentences
0passive phrases
Over 25 wordsPassive voiceFiller word

How it works

  1. Pick the best engineThe page checks for the Writer and Rewriter APIs first, then the general Prompt API, and says which one it found.
  2. Generate or rewriteYour text and options go to the on-device model. Nothing is sent to a server.
  3. Check the resultEvery edit runs the local writing check, so you see the reading score change as you type.
// Draft new text
const writer = await Writer.create({ tone: "neutral", length: "short", format: "plain-text" });
const draft = await writer.write("An email moving the launch to Wednesday");

// Change the tone of existing text
const rewriter = await Rewriter.create({ tone: "more-formal", length: "as-is" });
const formal = await rewriter.rewrite(draft);

// No Writer or Rewriter? The general Prompt API can do both
const session = await LanguageModel.create();
const reply = await session.prompt("Rewrite this more formally: " + draft);