Free Online CSS Transform Generator for Translate, Rotate and Scale
Build a transform from translate, scale, rotate and skew, set the origin it works around, and choose the order the functions are written in, because rotate then translate does not mean the same thing as translate then rotate. The 3D functions and perspective are here as well.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
Why the Order of the Functions Matters
Each one is applied to the coordinate system the last one left behind.
A transform list is read left to right, and each function works on the coordinate system
produced by the one before it. So rotate(45deg) translateX(100px) rotates the
element's axes first and then moves it 100px along the rotated X axis, which sends it
off diagonally. translateX(100px) rotate(45deg) moves it 100px to the right on
the normal axis and then spins it where it stands. Same two numbers, two completely
different results.
Scale behaves the same way. scale(2) translateX(50px) moves the element 100px
on screen, because the translation is measured in the scaled coordinate system, while
translateX(50px) scale(2) moves it 50px and then doubles its size in place.
This is also why a rotation looks wrong the moment you change
transform-origin: the origin is the point every function pivots and scales
around. Change the order in the control above and watch the preview to see it rather than
take it on trust.
How to Build a CSS Transform
A few steps, and nothing is uploaded.
What to Know About CSS Transforms
Order, origin, and what a transform does not affect.
rotate(45deg) translateX(100px) and translateX(100px) rotate(45deg) put the element in two different places. If a transform copied from somewhere else behaves oddly, check the order first.
0 0 means the top left corner stays put while the rest moves.
matrix3d() or a keyframe sequence, this is not the tool that will give it to you.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the CSS Transform Generator
The transform property moves, turns, scales and shears an element without touching the layout around it. Because it is handled on the compositor rather than by reflowing the page, it is the property to reach for when something has to animate smoothly, and it is why almost every modal, drawer and hover lift in a modern interface is a transform rather than a change of position.
What makes it awkward is that a transform is a list, and the list is ordered. Each function acts on the coordinate system the previous one produced, so the same set of numbers in a different order puts the element somewhere else entirely. This page makes that visible: choose the order in a control, and the preview and the output change together, with a dashed outline showing where the element began.
The 3D functions are here as well, since rotateX and rotateY do nothing convincing without a perspective value to give them depth. The output is a plain declaration, with transform-origin printed as a second line whenever it is not the default, so what you paste is complete rather than half of the story.
Frequently Asked Questions
Function order, origin, perspective and layout.
0 0 pins the top left corner, which is what you want for a menu that should grow out of its trigger, and setting it to bottom center is how a card hinges up from its base.perspective() function at the start of the transform list, or set the perspective property on the parent, and the rotation gains depth. Smaller perspective values mean a stronger, more dramatic effect.