Create .9.png Stretchable Images Create Android-style 9-patch (.9.png) images with stretchable region markers.
Nine-Patch Generator
Create Android-style 9-patch (.9.png) images with stretchable region markers.
Upload Image
Drop or select a PNG image for 9-patch creation.
Define Regions
Set left, right, top, and bottom insets for stretchable areas.
Download
Generate and download the .9.png file with markers.
What Is Nine-Patch Generator?
A nine-patch generator that creates .9.png images used in Android development and game UI systems. Nine-patch images have 1-pixel border markers that define which regions stretch and which stay fixed. Set the inset values (left, right, top, bottom) to control where the stretchable zone begins and ends. The tool adds the required 1px border with black pixel markers. Output is compatible with Android SDK and popular game engines.
Why Use Nine-Patch Generator?
-
Creates properly formatted .9.png files
-
Visual controls for stretch region definition
-
Compatible with Android SDK and game engines
-
Preview with pixel-accurate rendering
Common Use Cases
Android Development
Create stretchable backgrounds for buttons and chat bubbles.
Game UI
Scalable UI panels and frames for different screen sizes.
Responsive Assets
Images that scale gracefully by stretching only designated areas.
Chat Bubbles
Chat message backgrounds that expand with text content.
Technical Guide
The output image is 2 pixels wider and 2 pixels taller than the source (for the 1px border on each side). The source image is drawn at offset (1,1). Black pixels are placed on the borders: top border marks horizontal stretchable width, left border marks vertical stretchable height, right border marks content padding height, bottom border marks content padding width. The stretchable region is the area between the insets.
Tips & Best Practices
-
1Keep insets away from detailed areas — only flat/simple areas should stretch
-
2Test at various sizes to verify stretch behavior
-
3Use with Android SDK draw9patch tool for verification
-
4Corners and edges with detail should be in the fixed (non-stretch) zone
Related Tools
Image Crop
Crop images with a visual selection rectangle to remove unwanted areas.
🖼️ Image Tools
Image Resizer
Resize images by exact pixel dimensions or percentage while maintaining aspect ratio.
🖼️ Image Tools
Image Border Frame
Add decorative borders and frames to images with customizable width, color, and style.
🖼️ Image Tools
Image Splitter
Split an image into a grid of equally sized tiles for puzzles, printing, or Instagram grids.
🖼️ Image ToolsFrequently Asked Questions
Q What is .9.png?
Q Android only?
Q Input format?
Q Preview stretch?
Q Max insets?
About This Tool
Nine-Patch Generator is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.