Sliding puzzle with your own photo
Sliding puzzle: slide the tiles into the gap until everything is back in order. Add your own photo to turn it into a picture puzzle – every shuffle is guaranteed to be solvable.
Source: Wikipedia: 15 puzzle – Lösbarkeit (Johnson & Story 1879, Paritäts-Invariante), Sam Loyd, 80 Züge, Chapman/1880. Updated: .
How it is calculated
How the sliding puzzle works
In the 15 puzzle, 15 numbered tiles sit in a 4 × 4 frame with one empty square. You slide tiles into the gap until they read 1 to 15 with the gap in the bottom-right corner. Tap a tile further along the same row or column and the whole line slides at once – counted as one move per tile moved.
- Choose a size: 3 × 3 is quick, 4 × 4 is the classic, 5 × 5 takes patience.
- Your own photo: pick a picture from your phone or computer. It is cropped to a centred square and cut into tiles; numbers can be shown as a help.
- Slide: tap, or use the arrow keys (arrow up moves the tile below the gap upwards).
Why every shuffle is solvable
Not every arrangement can be solved – exactly half of all positions are impossible. Johnson and Story proved this in 1879: the parity of the permutation of all squares plus the distance of the gap from the bottom-right corner never changes with a move. Sam Loyd made this famous with his unsolvable puzzle where only 14 and 15 are swapped. This puzzle checks every shuffle with exactly that rule and swaps two tiles if necessary, so you always get a solvable one.
Tips for solving
- Solve the top row first, then the left column – and keep working on an ever smaller puzzle.
- Place the last two tiles of a row together: first the far one where the near one belongs, then slide both in.
- Finish the last 2 × 3 squares by cycling the tiles around the gap.
Privacy and storage
Your photo never leaves your device: it is cropped in the browser and shown only for this session as a local blob address; it is not saved. Fewest moves, best time per size and your settings are kept in localStorage (key schiebepuzzle). Shuffling uses the browser’s cryptography API.
More puzzles: Sudoku, 2048 and block puzzle.
Frequently asked questions
How do you solve a sliding puzzle?
Row by row: first the top row, then the left column, then the smaller remaining puzzle the same way. Insert the last tiles of a row in pairs and finish the last squares by cycling tiles around the gap.
Is every 15 puzzle solvable?
No – exactly half of all arrangements are unsolvable, for example when only 14 and 15 are swapped. Here you only get shuffles that are guaranteed solvable by the parity rule.
Can I make a sliding puzzle with my own picture?
Yes. Tap “Choose your own photo”; the picture is cropped to a square and cut into tiles. It is not uploaded.
What is the minimum number of moves for the 15 puzzle?
The shortest solution of any 4 × 4 shuffle needs at most 80 single-tile moves – the 17 hardest positions need exactly that many. Without a computer you will usually need more; the counter here tracks your best.
Who invented the 15 puzzle?
It is credited to postmaster Noyes Palmer Chapman and became a craze in the USA in 1880. Sam Loyd later falsely claimed to have invented it.
Sources and legal basis
- Wikipedia: 15 puzzle – Lösbarkeit (Johnson & Story 1879, Paritäts-Invariante), Sam Loyd, 80 Züge, Chapman/1880
- MDN: URL.createObjectURL() (Foto bleibt lokal)
- MDN: HTMLCanvasElement.toBlob()
- MDN: Crypto.getRandomValues()
As of: · Editorial policy
Related tools
- Play sudoku online – daily puzzle and solverPlay sudoku online free: a new daily sudoku every day plus 4 levels, notes, mistake check and hints. The solver explains every step. Printable grid.
- Play the 2048 game onlinePlay 2048 free in your browser: swipe or use the arrow keys to merge tiles until you reach 2048. With best score, one-step undo and your game saved.
- Block puzzle: play Block Grid onlineFree block puzzle game in your browser: drop shapes into the 8×8 grid, clear full rows and columns, beat your high score. No download or sign-up needed.
- Play nonograms onlineFree nonogram puzzles in your browser: 5×5, 10×10 and 15×15, numbered levels and random puzzles – each with exactly one solution. With hints and error check.
- Play the mines game onlineFree mine puzzle in your browser: beginner, intermediate and expert, first click always safe, flags by long press or right click, best times. No app or sign-up.
- Play Solitaire OnlineFree Klondike solitaire in your browser: draw 1 or 3, unlimited undo, hints and a winnable daily deal. Share your time – the link deals the same cards.
- Two truths and a lie ideas: prompts at randomTwo truths and a lie ideas at random: spin for a sentence starter – funny, for work, for school or about travel and food – and turn it into three statements.
- Roll number pickerRoll number picker for teachers: enter the class strength, tap once and a random roll number appears. No repeats until everyone is done; absentees are skipped.
- Tambola Ticket Generator (Housie Tickets)Tambola ticket generator: make free housie tickets with 15 numbers from 1 to 90, print six to a page or send each ticket as a WhatsApp link. Caller included.