Skip to main content
NyankoTools

Sliding Puzzle – 15 Puzzle with Numbers or Your Own Picture

The classic sliding tile puzzle: slide tiles into the empty space until they are in order. Pick 3×3, 4×4 or 5×5, and choose "Image" to turn your own photo into a picture puzzle. Every shuffle is guaranteed to be solvable, and your best moves and time are saved on this device. Looking for another game? Try Sudoku.

🔒 Runs in your browser · Your data is never sent to a server

Size
Mode
Moves
0
Time
0:00.0
In place

Best records

  • 3×3 (8 puzzle)
  • 4×4 (15 puzzle)
  • 5×5 (24 puzzle)

How to use

  1. Choose a size (3×3, 4×4 or 5×5). A new game starts as soon as you pick one.
  2. Choose "Number" or "Image". For "Image", pick an image file or drag and drop it, and it becomes the puzzle.
  3. Click or tap a tile next to the empty space to slide it. Arrow keys work too, and tiles in the same row or column as the empty space slide together.
  4. The puzzle is solved when the numbers are in order (or the picture is restored). Press "New game" to shuffle again.

Notes

  • The image you choose is read and split entirely in your browser and is never sent to a server.
  • Each shuffle is random, but only solvable layouts are used (and never an already-solved one).
  • Moves count the tiles you slide. Sliding several tiles at once along the empty space’s row or column counts each tile. The timer runs from your first move until the puzzle is solved.
  • Best records are stored per size in this browser’s local storage, and number and image modes share them. They are not carried over if you clear site data or switch browsers or devices.
  • Game progress and the loaded image are not saved. Reloading the page starts a new game.
  • The image is cropped to its central square. Very large files (over 25 MB) cannot be loaded.

Glossary

Sliding puzzle (15 puzzle)

A puzzle where numbered tiles in a square frame are slid into the single empty space until they are in order. The 4×4 version with 15 tiles is the "15 puzzle", and the 3×3 version is also called the "8 puzzle".

Inversions (parity)

The number of tile pairs where a larger number comes before a smaller one. Its parity, together with the empty space’s position, tells whether a layout can reach the solved state. Half of all random arrangements are unsolvable.

FAQ

Can a shuffle ever be unsolvable?

No. After shuffling, the layout is checked using its inversion count, and if it is not solvable two tiles are swapped so that it always can be solved. A layout that is already solved is never dealt.

How are moves counted?

Moves are the number of tiles you slide. If you click a tile in the same row or column as the empty space and several tiles slide together, each tile counts, so it equals moving them one at a time.

Is my image uploaded when I play with a picture?

No. The image is only read and split inside your browser and is never sent to a server. It is discarded when you close or reload the page.

How are tall or wide images used?

The central square of the image, as wide as its shorter side, is used. The edges are cropped away, so pictures with the subject near the center work best.

Are best records separate for 3×3, 4×4 and 5×5?

Yes. The fewest moves and shortest time are saved separately for each size. Number mode and image mode share the same records for a given size.

Share this page

↑↓ Select Enter Open Esc Close