# Image Splitter

> Split a JPG, PNG or WebP image into columns and rows, fixed-size pixel tiles, or a 3-wide Instagram grid of squares, each saved as its own file.

Use it online (free, runs in your browser): https://directory.milunir.com/image-tools/image-editors/image-splitter/

To split an image, choose the file and set how many columns and rows you want. Each piece is saved as a separate file named by its row and column. A 1200 × 800 picture cut 3 × 2 gives six pieces of 400 × 400. Tile size mode cuts fixed pixel tiles instead, and Instagram grid makes three squares per row.

Cutting one picture into pieces comes up for carousel posts, a profile grid that shows one large photo across nine squares, printing a poster on several sheets, or feeding a large scan to a program that only accepts small tiles. This splitter has three modes. Grid divides the image into up to 6 columns and 6 rows of near-equal pieces. Tile size cuts tiles of a set width and height from the top left corner, so the last column and row hold whatever is left. Instagram grid crops the centre so three equal squares fit across, for 1 to 6 rows. Each piece downloads as its own file, named like photo-r1-c2.jpg. Phone photos are turned upright before cutting. One limit: at most 36 pieces per image, and the pieces are not padded or overlapped, so a seam can fall through a face or text.

## How to use

1. **Choose the image**: Press Choose image or drop a JPG, PNG or WebP file of up to 25 MB on the box.
2. **Pick a mode**: Grid for a count of columns and rows, Tile size for pieces of fixed pixels, or Instagram grid for rows of three squares.
3. **Set the numbers**: Use the − and + buttons for columns and rows, or type a tile width and height in pixels.
4. **Download the pieces**: Check the first piece in the preview and its size, then download the files. Under More options you can save them as JPG, PNG or WebP.

## Examples

### Quarter a portrait phone photo

- Mode: Grid
- Columns: 2
- Rows: 2
- Tile width: 500
- Tile height: 500
- Rows of 3: 3
- Save as: Same as the original
- Quality: 90
- Image: fixture:photo-640x480-orient6.jpg

Result: Pieces: 4 pieces Piece size: 240 × 320 px Layout: 2 across × 2 down

The file stores 640 × 480 pixels but its orientation tag marks it as a portrait shot. It is turned upright to 480 × 640 first, so each of the four pieces is 240 × 320.

### Cut 150 px tiles from a 400 × 300 photo

- Mode: Tile size
- Columns: 2
- Rows: 2
- Tile width: 150
- Tile height: 150
- Rows of 3: 3
- Save as: PNG
- Quality: 90
- Image: fixture:photo-400x300-gps.jpg

Result: Pieces: 6 pieces Piece size: first 150 × 150 px Layout: 3 across × 2 down

Two full tiles fit across 400 pixels with 100 left over, so the third column is 100 pixels wide. Two rows of 150 fill the 300 pixel height exactly, giving six PNG tiles.

### A 3 × 2 Instagram grid from a 400 × 300 photo

- Mode: Instagram grid
- Columns: 2
- Rows: 2
- Tile width: 500
- Tile height: 500
- Rows of 3: 2
- Save as: Same as the original
- Quality: 90
- Image: fixture:photo-400x300-gps.jpg

Result: Pieces: 6 pieces Piece size: 133 × 133 px Layout: 3 across × 2 down

Three squares across 400 pixels allow 133 pixels each, and two rows would allow 150, so the smaller side wins: six squares of 133 × 133, cut from the centre.

## How it works

`edge(i) = round(i × width ÷ columns); Instagram square side = floor(min(width ÷ 3, height ÷ rows))`

- `width, height`: the size of the upright image in pixels
- `i`: the cut number, from 0 at the left edge to the column count at the right edge

In Grid mode the cut lines sit at rounded fractions of the width and height, so pieces differ by one pixel at most and together cover every pixel. A 1000 pixel width in 3 columns cuts at 333 and 667, giving 333, 334 and 333. Tile size steps across by the tile width and keeps the remainder as a narrower final column. Instagram grid takes the largest square that lets three fit across and the chosen rows fit down, then centres that block and trims the leftover edge. Each piece is drawn onto its own canvas and saved in the chosen format, without camera tags.

Sources:

- [HTML Standard: the canvas element, drawImage() and toBlob()](https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-toblob), WHATWG

## When not to use it

- For a poster that must line up on paper; there is no overlap margin for trimming or glue.
- For slicing a web design into buttons and icons of different sizes; every cut here is a straight line across the whole image.

## Common mistakes

- Posting Instagram grid pieces from first to last, which puts the top row at the bottom of your profile.
- Choosing JPG for pieces of a transparent PNG, which fills the clear areas with white.

## Questions

### Why are some of my pieces one pixel wider than the others?

When the width does not divide evenly, the leftover pixels are spread across the pieces instead of being cut off. A 1000 pixel image in 3 columns gives pieces of 333, 334 and 333 pixels, and nothing is lost.

### Is my picture uploaded when I split it?

No. The image is opened, cut and saved by your own browser, and nothing is sent to a server or kept. The saved pieces also leave out camera details and GPS location from the original.
