The internet has developed its own dialect. Words like "skibidi," "rizz," "sigma," and "sus" have their own grammar and usage patterns that are completely opaque to anyone over 25. I wanted to see what would happen if you took that vocabulary and ran it through proper English sentence structures. The result is BrainRotter: you press a button and it fills a page with paragraphs of grammatically correct nonsense assembled from brainrot slang.
Sentence generation
The generator builds six types of sentences. Simple sentences follow subject-verb-object order. Compound sentences join two simple clauses with a conjunction. Complex sentences attach a dependent clause using a relative conjunction. Compound-complex sentences do both. There are also questions (inversion of subject and verb, preceded by a question word) and imperatives (verb-first, no subject). The type is chosen randomly with equal probability for each generation.
Each slot in the template is filled from a word bank. There are two word banks: a brainrot set and a normal set. The brainrot set contains internet slang subjects ("the sigma," "Skibidi Toilet"), verbs ("is rizzing up," "is mewing"), adjectives ("goated," "sus"), and objects ("the drip," "the fanum tax"). The normal set has conventional English words. On each word selection, there's a 20% chance the generator picks from the normal bank and an 80% chance it picks brainrot. The occasional normal word makes the output funnier because it creates contrast. A sentence that's 100% slang reads like a glossary, but "the cat is goated with the drip" is a sentence that makes you pause.
The fill algorithm
The output container has a fixed height. When you press "ROT MY BRAIN," the generator doesn't produce a set number of sentences. Instead, it generates one sentence at a time and measures the rendered height using a hidden div. It copies the accumulated text into this offscreen element, checks scrollHeight against the container height, and stops when adding another sentence would cause overflow. The result is a block of text that fills the visible area exactly, regardless of screen size or font rendering differences.
This approach means the output looks correct on a phone and on a widescreen monitor without any responsive layout changes to the text generation itself. The container adapts, and the generator fills whatever space is available.
Packaging
The project includes a full set of PWA assets: multiple favicon sizes, an Apple touch icon, a site.webmanifest, a browserconfig.xml for Windows tiles, and a Safari pinned tab SVG. This was partly a joke (treating a brainrot generator with the same care as a production app) and partly practical, because people were actually adding it to their home screens.
The UI is minimal. A red button at the top, a white text area below it. Click the button, read the output, laugh or cringe, click again. No settings, no configuration, no state to manage.