The problem of self-organizing flexible wrapping for swarm robots refers to the spontaneous formation of stable, deformable, and adaptive structures by a robot swarm relying solely on local perception, without a global map or centralized control, to tightly enclose irregular or dynamic targets. This holds significant application value in fields such as environmental containment, disaster rescue, and wide-area monitoring. This paper proposes a self-organizing flexible wrapping method for swarm robots based on local density interactions. First, a local density field model integrating individual area weights is constructed to achieve the quantitative characterization of the target distribution space. Second, a weighted density is calculated based on the distributions of neighborhood robots and targets. Combined with diffusion and collision avoidance mechanisms, a distributed control law is designed to drive the swarm to adaptively converge towards the target boundaries while maintaining a uniform distribution. Finally, simulation and real-world experiments demonstrate that the proposed method can control the robot swarm to form a flexible wrapping structure. Compared with traditional methods, it significantly improves the conformity to complex target boundaries and overall adaptability, thereby verifying the feasibility and effectiveness of the proposed algorithm.