UDim2 Converter

Turn Offset (pixels) into Scale (a share of the screen) and back, copy the code, and see how the same UDim2 looks on a phone, a tablet and a PC.

1. Your UDim2

2. Screen size

If your element sits inside a Frame, use that Frame's size here instead of the screen.

3. Results

Size on this screen
0 × 0
Share of the screen
0%
All Scale · grows and shrinks with the screen
All Offset · the same pixels on every screen
As entered

How it looks on other screens

Scale vs Offset

  • Scale is a share of the parent: 0.5 is half its width or height. It grows and shrinks with the screen.
  • Offset is pixels. 200 is 200 pixels on every screen, so it looks big on a phone and small on a big monitor.
  • The maths: pixels = Scale × parent size + Offset. To go back, Scale = pixels ÷ parent size.

Tips for UI that works everywhere

  • Size with Scale, then add a UIAspectRatioConstraint so buttons and frames keep their shape on wide and tall screens.
  • To center something, set its AnchorPoint to (0.5, 0.5) and its Position to UDim2.fromScale(0.5, 0.5).
  • Small Offset values are fine for padding and borders: a 2 px stroke should stay 2 px everywhere.
  • Roblox's top bar covers the top of the screen unless you change the ScreenGui's ScreenInsets, so leave room up there.
  • Test with Studio's Device emulator (Test tab) on a phone before you publish. More than half of Roblox players are on phones.