Code tool

Defrag Simulator

Tune the virtual disk, seed fragmentation, and watch the simulated head reorganize blocks. This is a visual toy: it never reads or changes a real disk.

In-browser processingNo account requiredPrivacy details ↗
VIRTUAL DISK // DEFRAG SIMULATOR

⚠ LOCAL RETRO SIMULATION ONLY · NO FILESYSTEM ACCESS

READY — no real disk access

BeforeCurrent
blockfree

A QUICK WALKTHROUGH

How to use this tool

  1. Choose a virtual disk size and fragmentation level.
  2. Start the simulation or advance it one pass at a time.
  3. Compare the virtual disk before and after compaction; nothing leaves this browser.

A bounded retro simulation

The map contains only numbered virtual blocks. Each pass moves one occupied block toward the earliest empty slot and reports the simulated head movement.

No real disk access

This page does not inspect, defragment, benchmark, or modify any storage device. It does not use filesystem APIs, uploads, network requests, or persistent storage.

A teaching aid, not a benchmark

The animation is intentionally illustrative. It does not model a filesystem, allocation strategy, SSD behavior, wear, or operating-system scheduling.

GOOD TO KNOW

Common questions

Can this defragment my computer?

No. It only rearranges coloured blocks in a virtual in-memory array.

Does it read my files or drives?

No. It does not request file access and has no filesystem or disk permissions.

What does one pass do?

One pass moves the first occupied block after the first empty slot into that empty slot, then reports the virtual head movement.