The internet has a dialect. "Skibidi," "rizz," "sigma," and "sus" have their own grammar and usage, opaque to anyone over 25, and I wanted to see what happened when I fed that vocabulary into a proper context-free grammar. Press the button and BrainRotter fills the page with paragraphs of grammatically correct brainrot.
The grammar
The engine is a weighted context-free grammar in the style of SCIgen, in plain JavaScript. It has 22 sentence types, from simple clauses up through conditionals, fake academic citations, and callbacks to earlier sentences. Simple and compound sentences carry weights of 10 and 9 and enumerations get 2, so the plain structures dominate.
The lexicon is 2,277 terms, 419 of them entities (Skibidi Toilet, Bombardiro Crocodilo, Kai Cenat, Quandale Dingle), the rest verbs ("rizzes up," "mogs," "is locked in"), adjectives ("goated," "skibidi-coded," "looksmaxxed"), adverbs, prepositional phrases, interjections, and the small categories that glue sentences together. It runs from Among Us through the Italian brainrot era.
Morphology
The fiddly part was English morphology. Verbs in the lexicon are stored in the third-person present ("rizzes up") because that's how most sentences use them, but a question needs do-support and the bare form. "Skibidi Toilet rizzes up the sigma" has to become "Why did Skibidi Toilet rizz up the sigma?" So deconjugateTV() picks a transitive verb, drops any 's or 'd contraction, finds the first word ending in s, and strips it back with the usual rules: "ies" to "y", "es" to the base unless the stem needs its e, and a plain "s" off unless the word ends in "ss" or "us". Intransitives that start with "is" lose the "is" for the "Is X bussin?" question form. Commas go before a coordinating conjunction between independent clauses and after a leading dependent clause.
A cast and a place
Before generating, the engine picks 5 to 8 cast members from the entity pool and 3 recurring locations from the prepositional phrases. Characters are tracked as they're introduced, with a bias toward the cast that eases off as more of them have appeared and a rule against reusing anyone from the last two sentences, so the generator can write callbacks ("Meanwhile, Skibidi Toilet was still...") and consequences that refer to earlier events. Paragraphs come from seven archetypes such as academic, dramatic, and interrogative, each with its own pool of sentence types, and recent types are remembered so the same construction doesn't land twice in a row.
Filling the box
The output box has a fixed height and I wanted it exactly full. The generator asks for 30 paragraphs, then adds them one at a time to a hidden div styled to match the box, checking scrollHeight against the box's height after each and stopping before the one that overflows. If there's still room it generates 20 more and keeps going. The text regenerates on resize after a 200 ms pause, and Space or Enter does the same as the button. There are PWA icons and a manifest because people were adding it to their home screens.