# Defrag98: Windows 98 Disk Defrag Simulator > A free, browser-based recreation of the Microsoft Windows 98 Disk > Defragmenter, built by Dennis Morello. Live at https://defrag98.com. Last updated: 2026-10-01 ## What it is Defrag98 recreates the Windows 98 Disk Defragmenter as a web page. You pick one of four invented drives, or set up a fifth to your own size and speed, press Start, and watch the colored clusters gather at the front of the drive while a period hard disk grinds away in the background. It is a nostalgia simulator and nothing else. It has no access to the visitor's storage and never reads, moves or modifies a real file. The drives, their capacities and their contents are all fabricated. It is free, carries no advertising, and requires no account. A Buy Me a Coffee shortcut on the desktop is the only monetization, and it is optional. Below it is an icon for Disk Defragmenter, which reopens the window after you close it. A How It Works shortcut opens the page of the same name. A Win95GPT shortcut opens https://win95gpt.com, a Windows 95 ChatGPT client made by Jimi Plouffe (https://x.com/JimiPlouffe). Desktop icons behave as in Windows 98: a click selects one, a double click or Enter opens it (on a touch screen, one tap), the arrow keys move between them, and typing a letter jumps to an icon whose name starts with it. Dragging a box across the empty desktop with the mouse selects every icon it touches. People also call it a fake defrag, a retro defrag, a defrag screensaver, a defrag emulator, a defrag game or a Windows 98 simulator. They all mean this site. ## What sets it apart from other defrag simulators The defragmentation is simulated, not scripted. Each pass inspects the current state of the disk and decides what to do from there, so no two runs lay out the same way and nothing is a recorded animation played back. Each pass commits to one of three modes: 1. Consolidate a contiguous run of unoptimized data that already sits at the frontier, optimizing it in place. 2. Relocate a contiguous chunk forward from a randomly chosen source run further down the disk, draining that run from its tail. 3. Evict the run at the frontier out of the way to clear space ahead of it, which is what the real defragmenter did before writing incoming data. The cluster palette is sampled from the real Windows 98 Disk Defragmenter legend. Free space is white, unoptimized data is light blue, optimized data is dark blue, clusters being read flash green, clusters being written flash red, and unmovable clusters carry the same corner mark the original drew. Each ordinary pass shows green reads before red writes, then the clusters settle into their resting colors. The layout and progress change after the write flash. Data moved out of the way flashes green only; red marks writes into the consolidation zone. Reading, writing and settled colors share the pass's time budget equally. Evictions give the write phase's share to reading. Browser scheduling can stretch the duration, especially in a background tab. Pause freezes the current phase and Resume continues its remaining time. Stop clears the flashes and keeps the last committed layout, discarding an unfinished move. The last pass settles before the completion dialog opens. In Fast mode each pass moves at most 24 clusters, the ceiling the original utility used, and is charged a seek cost plus per-cluster transfer time. The rhythm drifts with how much work each pass does rather than ticking to a fixed interval, and the estimated time to completion comes from the same cost model. Realistic mode runs more slowly and includes the interruptions people remember. See "Simulation modes" below. The hard-disk audio plays back at a rate set by the drive you selected, so a slow disk grinds and a fast one skitters. The mouse click sounds are the Windows 98 ones. The whole thing installs as a progressive web app and runs with no network connection, sound effects included. ## Simulation modes Settings offers two, and the choice applies to a run already in progress. Fast is the default. It is the mode described above: at most 24 clusters a pass, and drive C's estimate is about 13 minutes in Fast mode. Realistic moves at most 6 clusters a pass, so the write head crawls rather than jumping, and multiplies every delay by three. Drive C's estimate is about 61 minutes in Realistic mode. Every drive scales by the same factor, so their relative ordering is unchanged. Realistic mode also restarts, which is the part people remember. Once or twice during the run, somewhere between 35 and 65 percent, the progress line reads "Drive's contents have changed: Restarting...", the whole drive is read again from the top, and fresh fragmentation appears behind the scan line. Between 2 and 5 percent of the drive's data comes back fragmented, as if a program had rewritten a few files while the defragmenter worked. The rest of the finished work stays where it was. The bar drops back a little and consolidation resumes. The run still finishes with the tada chime and the completion dialog. Closing the dialog leaves the drive at 100 percent. Press Start to generate a fresh disk and run it again. Windows 95 and 98 really did restart a defrag whenever anything wrote to the drive while it ran. An antivirus scanner, a network poll or a screen saver waking up was enough. Microsoft documented the message in KB 186978, and the behavior was dropped in Windows Me. The one liberty taken is that a restart here also refragments a few files, where the original resumed from where it had stopped and lost only time. Without that, the interruption would barely register in a simulation with no programs writing real files. Everything else you had consolidated stays put. A Realistic run can take a while. Nothing is saved between page loads, so a phone that discards the tab in the background comes back to a fresh drive. ## The four drives | Drive | Capacity | Clusters | Relative speed | Notes | | ----- | -------- | -------- | -------------- | ----- | | C: | 2048 MB | 16384 | slow (4500 rpm) | The default, and the longest run of the four: roughly 13 minutes in Fast mode, 61 minutes in Realistic. | | D: | 1024 MB | 8192 | moderate (7200 rpm) | A smaller drive on a faster spindle: about 4 minutes in Fast mode, 19 minutes in Realistic. | | E: | 512 MB | 4096 | slowest (3600 rpm) | The smallest volume on the slowest spindle in the set. The two cancel out: about 4 minutes in Fast mode, 19 minutes in Realistic, identical to D. | | F: | 2048 MB | 16384 | fastest (15000 rpm) | As large as C but on a late-90s SCSI-grade spindle: about 4 minutes in Fast mode, 18 minutes in Realistic. | There is also Drive G, the visitor's own. Its size (8 to 8192 MB) and speed (3600 to 15000 RPM) are set in Settings and saved in the browser, so it can stand in for whatever drive the visitor remembers owning. It runs on the same cluster scale and timing model as the four above. Roughly 60% of each disk holds data when generated, and about 2% of clusters are unmovable. ## Interface The window reproduces Windows 98 chrome, with Minimize, Maximize and Close controls in the title bar, and dragging a border or corner resizes it. Below the cluster map are a progress bar, a percentage, and Start, Pause and Stop controls. Settings contains the drive selector and a whole-run estimate; Legend explains the cluster colors. The Legend dialog lists the six cluster states exactly as Windows 98 did: unoptimized data, optimized (defragmented) data, free space, data that will not be moved, data that's currently being read, and data that's currently being written. Maximize expands the window to fill the viewport, which widens the cluster grid without rescaling the clusters, stopping above the taskbar. The title bar's Minimize button hides the window. Its taskbar button activates or restores it, or minimizes it if already active. Clicking the desktop leaves the window visible but inactive. Close quits Disk Defragmenter and abandons the run in progress. To open it again on a freshly fragmented drive, double-click or tap its desktop icon or pick Disk Defragmenter under Programs, Accessories, System Tools. Typing defrag in the Run box works too. A defragmentation keeps running while the window is minimized, and the window reopens by itself when the run finishes. The details pane auto-scrolls to follow the defragmentation frontier, snapping to the next region as the visible one finishes, and pauses that auto-follow if you scroll away yourself. Settings let you pick the drive, choose between the Fast and Realistic simulation modes, and mute the hard-disk sound effects and the mouse click sounds independently. Settings also has a checkbox, off by default, for a screensaver mode: Start takes the page full screen until the run ends. Safari on iPhone can't do that, so Settings leaves the checkbox out there. The speaker icon in the taskbar's notification area mutes every sound at once and leaves those settings untouched. The clock beside it shows your computer's time. Those preferences persist in local storage. Changing sound settings or simulation mode keeps the cluster map and progress, including a paused phase. Selecting another drive or changing the custom drive's size or speed generates a fresh disk. The Start button on the taskbar opens a Windows 98 Start menu, and so do Ctrl+Esc and the Windows or Cmd key pressed on its own. Disk Defragmenter, under Programs, Accessories, System Tools, brings the window back, or opens it again after you close it. Programs also has a Win95GPT link. Favorites links to Buy Me a Coffee and Dennis Morello's website and X profile. Documents and Help open the site's pages, and Windows Update opens the release notes. Run... opens the Windows 98 Run box. Typing defrag there opens Disk Defragmenter, and the box fills in the last command next time. Any other command gets the Windows 98 "Cannot find the file" error, except bsod, the easter egg below. Log Off and Shut Down don't work here. They open the Windows 98 Restrictions message, which tells you to contact your system administrator. Alt plus an underlined letter runs a menu command. Every control carries a Windows 98 access key: the letter is underlined in its label, and Alt plus that letter presses it, so Alt+S starts a defragmentation and Alt+T stops one. OK and Cancel have none, because Enter and Esc already reach them. Completing a defrag plays the Windows 98 "tada" chime. There is an easter egg: clicking the title bar's close button has a one in four chance of crashing the whole page to an authentic Windows 9x Blue Screen of Death instead of closing the window, and typing bsod in the Run box crashes it every time. Pressing any key or clicking anywhere restarts the page like Windows 98 after a bad shutdown. ScanDisk checks drive C, then the Windows 98 logo appears and the app returns. Exit skips the scan. ## Frequently asked questions ### Does Defrag98 touch the files on my computer? No. It has no access to your disk and never reads, moves or modifies a single real file. Every drive it displays is invented. ### Is it free? Yes, completely, and there are no ads or sign-ups. Supporting it via Buy Me a Coffee (https://www.buymeacoffee.com/morellodev) is optional; a coffee costs 3 euros. ### Does it work offline? Yes. It is an installable progressive web app. Once loaded, the interface, the fonts and the hard-disk audio are cached, and it keeps running with the network switched off. ### Does it work on a phone or tablet? Yes. On a small screen you first get a period-appropriate dialog saying Windows 98 is not supported on mobile devices. That is a joke, and dismissing it runs the simulator normally. ### Why does every run look different? The disk is generated fresh each time and the defragmenter decides what to do as it goes, choosing between consolidating in place, relocating a chunk forward and evicting a run out of the way. ### What do the green and red blocks mean? Green shows data being read, then red shows where it is written. The blocks settle into their resting colors before the next pass. Data moved out of the way flashes green only; red marks writes into the consolidation zone. Pause freezes the current phase, and Resume continues it. ### Which drive should I pick? C for a long, grinding session, since it takes the longest of the four. F to watch it finish quickly. E for the slowest, most laborious individual passes, and D for something in between. ### How long does a full defrag take? It depends on the drive and the mode. In Fast mode C is the longest at roughly 13 minutes and F the shortest at roughly 4. E has the slowest disk in the set, so its passes are the most laborious, but it is only a quarter of C's size and finishes in about 4 minutes. Realistic mode multiplies those estimates by about four and a half, before rescans and the files they refragment. Settings shows an estimate for a whole run, not a countdown of the current one. ### Will changing settings reset my progress? Changing sound settings or simulation mode keeps the cluster map and progress, including a paused phase. Selecting another drive or changing the custom drive's size or speed generates a fresh disk. ### What is Realistic mode? A slower simulation you turn on in Settings. Realistic moves at most 6 clusters a pass rather than 24 and triples every delay, so drive C's estimate is about 61 minutes rather than 13. Windows interrupts it once or twice along the way: the progress line reads "Drive's contents have changed: Restarting...", the drive is rescanned from the top, a few files come back fragmented, and the bar drops back a little. Most of the finished work is kept. The run still finishes. Dismiss the completion dialog and it stays at 100 percent. Fast mode is the default and is unaffected. ### Is this the Windows 95 or the Windows XP defragmenter? The Windows 98 one. Windows 95 shipped a near-identical defragmenter, down to the cluster grid and the legend behind the Show Details button, so Defrag98 works as a Windows 95 defrag simulator too. Windows XP is not the same thing. Its defragmenter drew horizontal bands instead of a grid of clusters. ### Can I just leave it running and watch? Yes. Maximize the window, pick C, which takes the longest of the four, and it runs to the tada chime with no further clicking. Windows interrupts a Realistic run once or twice before it finishes. Leave it on a desktop rather than a phone: nothing is saved between page loads. ### Is it related to the real Windows 98? No. Defrag98 is an independent recreation and is not affiliated with or endorsed by Microsoft. It runs no Microsoft code and contains no Microsoft software. ## Detailed technical reference https://defrag98.com/how-it-works is the primary source on the simulation itself: how a fragmented drive is generated, what the defragmentation frontier is, the three moves a pass can choose between (optimize in place, relocate forward from a random source run, evict the frontier out of the way), the seek-plus-transfer cost model behind the pacing and the time estimate, how the cluster grid is drawn to a virtualized canvas, and which details are deliberately unfaithful to the original. One section explains why Windows 98 kept restarting a defrag, citing Microsoft KB 186171 and KB 186978, both retired and archived. ## How it is built Astro builds the static pages and loads the TypeScript simulator as one client-side React app, mounted from a module script. The cluster grid is drawn to a canvas element, viewport-virtualized so the backing store stays small no matter how large the disk. State lives in Zustand stores. Styling is Tailwind CSS over a palette of Windows 98 tokens, with MS Sans Serif and an IBM VGA bitmap font loaded as web fonts. Offline support comes from a Workbox service worker. It is hosted on Cloudflare Workers as static assets. ## Privacy The `defrag98-preferences` key in local storage holds the sound settings, whether the taskbar mute is on, simulation mode, selected drive, custom drive size and speed, desktop icon visibility, whether the unsupported device notice has been shown, and the completion count used to time donation requests. The service worker also caches the app's files for offline use. Traffic is measured with Cloudflare Web Analytics, which sets no cookies and does not fingerprint visitors. The full policy is at https://defrag98.com/privacy. ## Author Dennis Morello, a software engineer based in Milan, Italy. Website: https://morello.dev/ Build notes: https://morello.dev/blog/windows-98-defrag-simulator ## Latest release ### 2026-10-01: Desktop icons, closable windows, Run - Desktop icons now work as in Windows 98: a click selects one and a double click opens it, while on a touch screen one tap opens it. Disk Defragmenter has a desktop icon too. - Windows can now be resized, and Close now closes Disk Defragmenter. Open it again from its desktop icon, from System Tools in the Start menu, or by typing defrag in Run. - Run... in the Start menu now opens the Windows 98 Run box. Type defrag to open Disk Defragmenter or bsod for a blue screen, and anything else gets a "Cannot find the file" error.