Slice Studio is a lightweight, browser-based tool for splitting one or more images into PNG tiles. Place guides manually or generate evenly spaced rows and columns, preview the resulting grid, and export every slice in a single ZIP archive.
The app has no backend and no build process. Image decoding, guide editing, slicing, PNG encoding, and ZIP generation all happen in the browser.
- Features
- Quick start
- How to use
- Controls and shortcuts
- How slicing works
- Export format
- Fixed-size output
- Project structure
- Technical overview
- Browser requirements
- Privacy
- Known limitations
- Troubleshooting
- Development
- Contributing
- License
- Upload multiple images using the file picker or drag and drop.
- Keep independent guides and viewport settings for every image.
- Add vertical and horizontal guides interactively.
- Drag guides with live pixel and percentage feedback.
- Split an image into 2–50 evenly spaced rows or columns.
- Preview every slice with its row, column, and pixel dimensions.
- Zoom toward the pointer and pan around large images.
- Export slices from the original full-resolution image, independently of the current zoom level.
- Optionally pad or center-crop every slice to an exact output size.
- Export all loaded images as lossless PNG files inside one compressed ZIP archive.
- Automatically generate predictable, filesystem-safe output names.
- Work entirely on the client side—no image upload server is required.
Clone or download the repository, then open index.html in a modern browser.
git clone <repository-url>
cd "Multi-Image Slicer"No dependency installation or compilation is required.
Note
Slice Studio loads JSZip 3.10.1 from cdnjs. An internet connection is therefore required when the page is first loaded unless JSZip is hosted locally.
Using a local server is recommended because it behaves consistently across browsers.
With Python:
python -m http.server 8080Then open http://localhost:8080.
With Node.js:
npx serve .Open the address printed in the terminal.
- Add images. Click Upload Images, or drag image files onto the workspace. You can select multiple files at once.
- Select an image. Choose a file in the left sidebar. Each image keeps its own guides and zoom/pan state.
- Define the slices.
- Click Vertical or Horizontal to add one guide.
- Enter a value from
2to50, then click Cols or Rows to create equal divisions. - Drag a guide to position it precisely. The tooltip displays its original-image pixel position and percentage.
- Inspect the result. Click Preview to display each tile's row/column index and dimensions.
- Choose output sizing. Leave Fixed Size disabled to preserve each slice's natural dimensions, or enable it and enter the required width and height.
- Export. Click Export ZIP. The browser downloads one archive containing PNG slices for every image in the project list.
Tip
Adding a guide places it in the center of the largest unsplit gap. Repeated clicks therefore produce useful subdivisions without stacking new guides at the same position.
| Action | Control |
|---|---|
| Upload images | Upload Images or drag files onto the workspace |
| Select an image | Click its name in Project Files |
| Remove an image | Click the × button beside the file |
| Add a guide | Vertical or Horizontal |
| Move a guide | Left-drag the guide |
| Remove one guide | Double-click it, or hover it and press Delete / Backspace |
| Remove all guides from the active image | Clear |
| Create equal columns or rows | Enter a count, then choose Cols or Rows |
| Zoom toward the pointer | Mouse wheel |
| Zoom from the center | + / − toolbar buttons |
| Fit the image to the workspace | Fit |
| Pan | Hold Space and left-drag, or middle-drag |
| Toggle tile labels and dimensions | Preview |
| Toggle exact output dimensions | Fixed Size |
| Export all images | Export ZIP |
Guides are stored as normalized positions from 0 to 1, rather than screen coordinates. This keeps every cut aligned to the original image when the view is zoomed, panned, resized, or fitted to the workspace.
- A vertical guide adds a column boundary.
- A horizontal guide adds a row boundary.
- Image edges are always included as boundaries.
Vunique vertical guides createV + 1columns.Hunique horizontal guides createH + 1rows.- The total number of tiles is
(V + 1) × (H + 1). - Overlapping guides are deduplicated at export time, preventing zero-pixel slices.
- An image with no guides is exported as one full-size tile.
Equal splits replace the existing guides on the selected axis. For example, choosing 4 and clicking Cols creates three vertical guides at 25%, 50%, and 75%, producing four columns. Guides on the other axis remain unchanged.
All slices are encoded as PNG and collected in a DEFLATE-compressed ZIP archive.
Each file follows this pattern:
<image-name>_Row<row-number>_Col<column-number>.png
For example, a 2 × 3 grid created from landscape.jpg produces:
landscape_Row1_Col1.png
landscape_Row1_Col2.png
landscape_Row1_Col3.png
landscape_Row2_Col1.png
landscape_Row2_Col2.png
landscape_Row2_Col3.png
Rows and columns are numbered from 1, starting at the top-left corner. Unsafe filename characters such as \ / : * ? " < > | are replaced with underscores.
Archive naming:
| Export scope | ZIP filename |
|---|---|
| One image | <image-name>_slices.zip |
| Multiple images | sliced_images_<image-count>.zip |
All images currently listed in the sidebar are exported, not only the active image.
Enable Fixed Size to force every exported tile onto a canvas with the specified width and height, from 1 × 1 through 10000 × 10000 pixels.
- If a slice is smaller than the target canvas, it is centered and surrounded by transparent padding.
- If a slice is larger than the target canvas, it is center-cropped.
- The slice is not stretched or scaled.
- The setting applies to every image and tile in the next export.
This is useful for sprite sheets, machine-learning datasets, game assets, thumbnails, and other workflows that require uniform dimensions.
Multi-Image Slicer/
├── index.html # Application markup, toolbar, sidebar, and JSZip CDN import
├── styles.css # Responsive dark interface and interaction states
├── app.js # Image management, canvas rendering, guides, slicing, and ZIP export
└── README.md # Project documentation
| Area | Implementation |
|---|---|
| User interface | Semantic HTML and custom CSS |
| Rendering | HTML Canvas 2D API with device-pixel-ratio support |
| Image loading | File API, FileReader, and Image |
| Slice generation | Off-screen canvas elements using original image pixels |
| PNG encoding | HTMLCanvasElement.toBlob() |
| Archive generation | JSZip 3.10.1 |
| Download | Blob URL and the browser download API |
| Application model | In-memory JavaScript state; no persistence or backend |
The interface canvas is scaled for high-DPI displays, while interactions use CSS-pixel coordinates. Exporting does not capture the visible canvas: each region is sampled directly from the original decoded image, so zoom and pan do not reduce output quality.
Use a current desktop version of Chrome, Edge, Firefox, or Safari. The browser must support:
- HTML Canvas 2D
- File and drag-and-drop APIs
FileReaderHTMLCanvasElement.toBlob()- Blob URLs
- Promises and modern JavaScript syntax
The interface is designed primarily for a mouse and keyboard. Touch-only workflows are not currently optimized.
Selected images remain in browser memory and are processed locally. Slice Studio does not contain code that uploads image content to a server.
The page does make a network request to cdnjs to load JSZip. To run fully offline, download jszip.min.js, serve it from the project directory, and replace the CDN <script> URL in index.html with the local path.
- Project state is not saved; refreshing or closing the page clears loaded images and guides.
- Output is always PNG, regardless of the source format.
- EXIF metadata, color profiles, animation frames, and other source metadata are not copied to exported slices.
- Very large images, large fixed-size canvases, or grids with many tiles can consume substantial browser memory.
- The ZIP is built in memory before download; exporting many high-resolution slices may take time.
- The app depends on the JSZip CDN unless the dependency is downloaded and referenced locally.
- There is no automated test suite or build pipeline in the current project.
- Confirm at least one image is listed in the sidebar.
- Make sure the browser allows downloads from the page.
- Open the browser developer console and check for a JSZip loading error.
- If you are offline, host JSZip locally as described in Privacy.
- Verify that the file is a browser-supported image type.
- Try opening the image directly in the same browser.
- Re-export unusual or damaged source files as PNG or JPEG before importing them.
- Zoom in and move the pointer close to the cyan line.
- The cursor changes direction when a guide is within selection range.
- You can also clear the active image's guides and recreate an equal grid.
- Export fewer images at once.
- Use fewer rows or columns.
- Reduce the source resolution before loading.
- Avoid unnecessarily large fixed output dimensions.
This is expected when Fixed Size is enabled. Disable it to export every slice at its natural dimensions, or adjust the target width and height.
There is no compilation step. Edit the three source files and refresh the browser:
- Update structure or controls in
index.html. - Update presentation and layout in
styles.css. - Update behavior, canvas drawing, and export logic in
app.js.
When changing slicing behavior, test at least these cases:
- An image with no guides.
- Only vertical guides and only horizontal guides.
- A mixed row-and-column grid.
- Manually positioned and overlapping guides.
- Multiple images with different grid layouts.
- Fixed output smaller and larger than the source slices.
- Filenames containing spaces, Unicode, and filesystem-reserved characters.
- Large images at different zoom levels.
Contributions are welcome. Before submitting a change:
- Keep the app usable without a build tool.
- Preserve client-side image processing and full-resolution export.
- Test in more than one modern browser.
- Document any new control, shortcut, dependency, or output behavior.
- Keep changes focused and include clear reproduction or verification steps.
This project is distributed under the Apache-2.0 license.
See LICENSE for full legal text.
If you find this tool useful, consider leaving a ⭐ on GitHub