Grid line splitter
Split an image at grid lines you specify as per-segment pixel thicknesses, including uneven splits such as a content area plus a fixed-height footer; the thicknesses must add up to the source side, and the export is one zip.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Images are processed locally in your browser with Canvas and never uploaded.
Comma or space separated pixel thicknesses, e.g. 300, 600, 300; they must add up to the original side length. Blank means no cut.
Pick an image first (PNG / JPEG / WebP / GIF all work).
Result details
Pick an image, set the grid-line thicknesses and the tiles are produced right away; exporting packs them into one zip.
What this tool does
- Uneven splits: a layout with an 800 px content area plus a 120 px footer can be cut with 800, 120 — no need to force equal parts.
- Card or long-image slicing at a fixed row height (e.g. every 1080 px) so the result matches the design file.
- Exact reproduction: type in the per-segment thicknesses from the spec; the split is accepted once they add up to the source side.
- Different from the grid splitter: that one divides evenly, this one lets you set every segment thickness individually.
Example
Input
A 6×6 image with row thicknesses 4, 2 and a single column of 6
Output
Two tiles of 4×6 and 2×6, grid line at [4], reassembling exactly into the original
The pure splitByGridLines logic first validates 4+2=6 and 6=6; a mismatch throws invalid-lines instead of truncating silently, and linePositions([4,2]) returns [4].
Frequently asked questions
Must the thicknesses add up to the source side?
Yes. For a 6 px tall image, 4, 2 is accepted while 4, 1 is rejected as an invalid grid. That guarantees the tiles reassemble into the exact original — no pixels lost and no transparent padding.
What if I leave a field blank?
A blank side means that direction is not cut (treated as one segment). With both blank the output is the original image; only a filled side actually splits.
How many segments can I enter?
Up to 200 per side, each a positive integer number of pixels. The image must still stay under 16 million pixels; oversized input reports an invalid size.
What does the "split the source in half" button do?
It fills both directions with two equal segments based on the current image size, giving you a quick 2×2 split that you can then edit to any thicknesses you like.
Are my images uploaded?
No. Pixels are read through the canvas and cut, zipped and downloaded entirely in the browser; there is no upload endpoint on the page.
Keywords:grid line split