Skip to content

Jigsaw Puzzle Generator

Generate an M×N grid of interlocking jigsaw pieces. Scramble and snap them back together on a free canvas, either manually or with a built-in solver. Optionally, export the pieces as JSON for a separate solver.

See how the app works for the piece model, snapping, and solver, or the repo to run it locally.

How to use

  1. Set Rows (M) and Cols (N), then click Generate for a fully assembled puzzle.
  2. Click Scramble to separate pieces, scatter them on the canvas, and give each a random rotation.
  3. Drag a piece to move its whole connected group, or drag empty canvas to box-select several groups and move or rotate them together. Matching edges within snap range lock together.
  4. Tap or click to select a group. Rotate, R, right-click, double-tap, or a long-press turns the selection 90° clockwise. Arrow keys nudge. Click empty canvas or Esc clears the highlight.
  5. Solve Step joins one matching pair. Export… downloads the current pieces as JSON.
  6. Image paints a cover-cropped picture on the pieces (on by default with a demo image). Example restores the demo; Choose image… loads a photo. The picture stays glued through scramble, drag, and rotate.
  7. Hold Peek or P to temporarily view the full reference image while solving.