Image Slicer
Cut a picture into a grid of tiles, or into an Instagram carousel, and save them in a ZIP. Or pack several pictures into one sprite sheet, with the CSS and a JSON frame map.
About this tool What it's for, how to use it and an example
What it's for
Two jobs with pictures. Cut a picture into tiles: a grid of rows and columns, or tiles of a size you give, saved together in a ZIP or one at a time. Pack pictures into a sprite sheet: several small pictures laid out in one image, with the CSS and a JSON frame map to use them.
For example, when you want a wide panorama to swipe through as an Instagram carousel, choose the preset and a number of slides, and save the ZIP.
How to use it
Cut a picture into tiles. Choose a picture (or drop it on the page). Cut it by rows and columns, or by
tile size, and set a gap to skip between tiles if the picture has borders to leave out. The preview shows
each tile, with the gaps dimmed. Save all tiles as a ZIP names them name-r1-c2.png (row 1, column 2), or use
the buttons to save one tile. The Instagram carousel presets turn Columns into the number of slides and
fit the picture across them, either whole on white or filled and cropped; the gap isn’t used.
Pack pictures into a sprite sheet. Choose the pictures (or drop them on the box); they go in file-name order,
so frame2 comes before frame10. Pick a row, a column or a grid, and the padding between pictures. The ZIP holds
the sheet, a CSS file with a class for each picture (named from its file name) that shows it by
background-position, and a JSON file with each frame’s position and size. Use the sprite class with a frame’s
class, as in <span class="sprite walk-1"></span>. Settings are remembered, pictures aren’t.
Example
Choose a picture 1000 × 700 pixels, then set:
Cut by: Rows and columns · Columns: 3 · Rows: 2 · Gap: 0
You get six tiles: 333 × 350 pixels, except the last column, which is 334 pixels wide because 1000 doesn’t divide
by 3. The message says so, and the ZIP holds name-r1-c1.png to name-r2-c3.png.
Good to know
The remainder of a picture that doesn’t divide evenly goes into the last row or column, so those tiles are a little bigger. The most is 400 tiles. Animated pictures use their first frame. Saving as the picture’s own format keeps JPEG and WebP; anything else is saved as PNG. Tiles don’t keep the original’s metadata. In the sprite sheet, smaller pictures sit at the top left of their place, and the sheet is transparent where there’s no picture. The CSS doesn’t scale the sheet, so pictures of different sizes in a grid use the biggest in each row and column. A browser may refuse a very large canvas. Nothing leaves your browser.
Or save one tile:
Choose the frames, or add more later. They are packed in file-name order.
Built with The third-party code and data this tool uses, and their licences
This tool uses no third-party code or data of its own: its code was written for this site.
Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.