Skip to content
UniKit

Grid image slicer

Slice an image into 3×3, 2×2, 4×4, 3×1 or 1×3 tiles with every crop box, file name and size estimate, and see each tile really drawn with canvas: click two tiles to swap them and restore 1…N to rebuild the picture. Your own image works too.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Current source: the built-in generated sample

Grid slicer + picture puzzle

Click two tiles to swap them and put 1…N back in order to restore the picture; the slicing plan and every crop box below are computed for real, and you can load your own image.

5 / 9 tiles out of place · 0 swaps · New shuffled board
Out of place
5
Swaps
0
Tiles
9
Tile size
300×300
Size estimate
711.9 KB

First click selects, second click swaps; clicking the same tile again cancels.

Slicing: 3×3, each tile 300×300px, 810000 pixels in total

Files inside the ZIP

Every file name and crop box comes from the slicing plan; the exported archive contains exactly these files.

nine-grid-01.png, nine-grid-02.png, nine-grid-03.png, nine-grid-04.png, nine-grid-05.png, nine-grid-06.png, nine-grid-07.png, nine-grid-08.png, nine-grid-09.png

What this tool does

  • Slice: pick 3×3, 2×2, 4×4, 3×1 or 1×3, enter the source size and padding, and the page reports every crop box (sx/sy/sw/sh), file name and size estimate.
  • See it: each tile is really drawn from the source with canvas — click two tiles to swap them and put 1…N back in order to restore the whole picture.
  • Load your own photo as the source, so every tile shows its real crop area — handy for checking whether a face ends up on a seam.

Example

Input

900x900

Output

Slicing plan: 3×3 grid (common for feed posts and Instagram) · source 900 × 900px · scale 1×
9 tiles of 300 × 300px (including 0px padding, background #FFFFFF)
Stitched preview 900 × 900px · 810000 pixels (PNG ≈ 711.9 KB)
No padding: neighbouring tiles touch, and a platform that rescales them may leave a hairline seam — set 4–8px of padding if you see it.

Crop box per tile (source coordinates):
  nine-grid-01.png ← row 1, column 1 · sx=0 sy=0 sw=300 sh=300 → 300×300
  nine-grid-02.png ← row 1, column 2 · sx=300 sy=0 sw=300 sh=300 → 300×300
  nine-grid-03.png ← row 1, column 3 · sx=600 sy=0 sw=300 sh=300 → 300×300
  nine-grid-04.png ← row 2, column 1 · sx=0 sy=300 sw=300 sh=300 → 300×300
  nine-grid-05.png ← row 2, column 2 · sx=300 sy=300 sw=300 sh=300 → 300×300
  nine-grid-06.png ← row 2, column 3 · sx=600 sy=300 sw=300 sh=300 → 300×300
  nine-grid-07.png ← row 3, column 1 · sx=0 sy=600 sw=300 sh=300 → 300×300
  nine-grid-08.png ← row 3, column 2 · sx=300 sy=600 sw=300 sh=300 → 300×300
  nine-grid-09.png ← row 3, column 3 · sx=600 sy=600 sw=300 sh=300 → 300×300

Files in the ZIP (9): nine-grid-01.png, nine-grid-02.png, nine-grid-03.png, nine-grid-04.png, nine-grid-05.png, nine-grid-06.png, nine-grid-07.png, nine-grid-08.png, nine-grid-09.png

Preview SVG (each cell numbered):
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="720" viewBox="0 0 900 900" role="img">
  <rect x="0" y="0" width="900" height="900" fill="#FFFFFF" />
  <g><rect x="0" y="0" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="12" y="26" font-size="18" fill="#334155">1</text></g>
  <g><rect x="300" y="0" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="312" y="26" font-size="18" fill="#334155">2</text></g>
  <g><rect x="600" y="0" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="612" y="26" font-size="18" fill="#334155">3</text></g>
  <g><rect x="0" y="300" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="12" y="326" font-size="18" fill="#334155">4</text></g>
  <g><rect x="300" y="300" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="312" y="326" font-size="18" fill="#334155">5</text></g>
  <g><rect x="600" y="300" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="612" y="326" font-size="18" fill="#334155">6</text></g>
  <g><rect x="0" y="600" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="12" y="626" font-size="18" fill="#334155">7</text></g>
  <g><rect x="300" y="600" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="312" y="626" font-size="18" fill="#334155">8</text></g>
  <g><rect x="600" y="600" width="300" height="300" fill="#94a3b8" fill-opacity="0.25" stroke="#FFFFFF" stroke-width="1" /><text x="612" y="626" font-size="18" fill="#334155">9</text></g>
</svg>

The crop boxes, file names and total pixel count all come from the real slicing plan (each tile matches computeTiles), and the board picture is what canvas draws from the source using exactly those crop boxes.

Frequently asked questions

How do I play?

Every board slot shows a sliced tile with its number underneath. The first click selects it (highlighted) and the second click swaps it with another slot; line the numbers up as 1…N to restore the picture and the page shows "Picture restored!". Hint tells you which two slots to swap, and Undo takes back the last swap.

Is the slicing real?

Yes. Each crop box (sx/sy/sw/sh) is computed from the source size and the grid, with the last tile absorbing the remainder so the tiles cover the image exactly once; file names are numbered, and the size estimate assumes ~0.9 bytes per pixel for PNG and ~0.22 for JPEG/WebP. The board is painted by cropping the source with those very boxes.

Is the shuffle reproducible?

The shuffle seed accepts 0–999999, and the same seed plus the same grid always give the same order (derived through xorshift128); leaving it empty derives a fixed seed from the grid. "Restart this board" reuses the same parameters, so the order matches the previous board, and a shuffle never produces an already-solved board.

Is my image uploaded?

No. A chosen image is only drawn with canvas in this page (an object URL: no requests, no localStorage), and it disappears on reload. Without an upload the page uses a generated sample image.

Which grids and sizes are supported?

The grids are 3×3, 2×2, 4×4, 3×1 and 1×3; the source width and height accept 30–20000 pixels, and the padding per tile is 0–200px (counted into each tile size). Padding above 0 leaves a visible gap between tiles, which looks tidier on social platforms.

Keywords:grid image slicer

Related tools