Magnetic Field Visualizer

Explore magnetic poles, field lines, and compass behaviour

Drag magnets to reposition them. Compasses follow the net field.

Controls

12 lines

Legend

  • North Pole (N)
  • South Pole (S)
  • Field Lines (N → S)
  • Compass Needles

Key Concepts

  • Like poles repel; unlike poles attract.
  • Field lines go from N to S outside the magnet.
  • A compass needle aligns with the local field direction.
  • Field strength is stronger where lines are closer together.