9-Slice Previewer
Set 9-slice borders on a button or panel image, preview it at any size and copy UMG Box margins for Unreal or sprite borders for Unity.
- ✓ Free, no sign-up
- ✓ Works for Unreal Engine & Unity
- ✓ Runs in your browser
Preview
Unreal Engine (UMG)
Brush → Draw As: Box, Margin:
Unity
Sprite Editor → Border (pixels), then Image Type Sliced:
Something not working, or an idea to make this tool better? Report a problem or suggest an improvement.
How 9-slicing works
Four borders cut the image into a 3 × 3 grid. When the image is drawn bigger or smaller:
- the four corners stay the same size,
- the top and bottom edges stretch horizontally, the left and right edges vertically,
- the centre stretches both ways (or is left out, for a frame).
One small texture can then make buttons, panels, tooltips and dialog boxes of any size, with crisp rounded corners and borders.
Same borders, different units
| Unreal UMG | Unity UI | |
|---|---|---|
| Where | Brush → Draw As Box → Margin | Sprite Editor → Border; Image Type Sliced |
| Units | Fraction of the texture (0–1) | Pixels |
| Example: 16 px border on a 64 px texture | 0.25 | 16 |
| Edges only | Draw As Border | Untick Fill Center |
| Repeat instead of stretch | Not for Box brushes | Image Type Tiled |
Tips for 9-slice art
- Keep the middle plain. Gradients and patterns in the edges and centre get stretched. Put detail in the corners.
- Make borders cover the rounded corners completely, plus a pixel or two, or the curve gets stretched.
- Small source, big result. A 64 × 64 panel is usually plenty; the size on screen comes from the widget, not the texture.
- Pixel art: use point (nearest) filtering and scale corners by whole numbers to keep pixels square.
- Do not go smaller than the borders. If a widget is smaller than left + right borders, the corners have to shrink and overlap.
FAQ
What is 9-slicing?
A way to scale UI images such as buttons and panels without distorting them. The image is cut into a 3 × 3 grid by four borders: the corners keep their size, the edges stretch in one direction and the centre stretches in both.
How do I set up 9-slicing in Unreal UMG?
In the Image or Button brush, set Draw As to Box and enter the Margin. Margins are fractions of the texture size between 0 and 1, so a 16 px border on a 64 px texture is 0.25. Draw As Border draws only the edges, without the centre.
How do I set up 9-slicing in Unity?
Set the texture type to Sprite (2D and UI), open the Sprite Editor and drag the green border handles or type L, T, R and B in pixels. Then set the UI Image’s Image Type to Sliced (or Tiled). For a Sprite Renderer, use Draw Mode Sliced and set the sprite’s Mesh Type to Full Rect.
Why do my 9-slice corners look too big or blurry?
The corners are drawn at the texture’s pixel size times the UI scale. In Unity, change Pixels Per Unit Multiplier on the Image; in Unreal, the brush Image Size and DPI scaling decide it. Blurry pixel art needs point (nearest) filtering on the texture.
Guides for this tool
- 9-Slicing for Game UI in Unreal and UnityTutorial · Nov 24, 2026 · 4 min read
More free tools
Normal Map Generator
Turn a height map or texture into a normal map. DirectX for Unreal, OpenGL for Unity, seamless tiling.
Open tool →Texture Channel Packer
Pack AO, roughness and metallic into one texture: Unreal ORM, Unity URP and HDRP Mask Map presets.
Open tool →Sprite Sheet Packer
Pack hundreds of sprites into atlases with trimming, padding and extrusion. Exports JSON for Paper2D and more.
Open tool →