This tool lets you compose a 2D CSS transform visually with sliders and copy the resulting value. The transform property chains functions — translate(), rotate(), scale() and skew() — to move, turn, resize and slant an element. The live preview applies the transform to a sample box so you can dial it in before copying.
How it works
Each slider maps to one transform function, and the tool joins them into a single transform value in a consistent order: translate, rotate, scale, then skew. Functions left at their neutral value (translate 0, rotate 0, scale 1, skew 0) are omitted so the output stays clean. Note that the browser applies transform functions right-to-left, so the order matters — rotating then translating gives a different result from translating then rotating.
| Function | What it does | Neutral value |
|---|---|---|
| translate | moves the element | 0px, 0px |
| rotate | turns it around its centre | 0deg |
| scale | resizes it (2 = double) | 1 |
| skew | slants it | 0deg, 0deg |
Example
Moving an element 20px right, rotating it 15 degrees and enlarging it 1.2× produces:
transform: translate(20px, 0px) rotate(15deg) scale(1.2);
The preview box shifts, tilts and grows accordingly.
Order of operations matters
Because transform functions are applied right-to-left in the browser, the same three functions in a different order produce different results. Rotate then translate carries the element to a position along the rotated axis — useful for orbiting something around a centre point. Translate then rotate moves it first, then spins it in place around its own origin. This generator always emits translate → rotate → scale → skew, which is the most predictable for the common case of moving and spinning an element.
Practical use cases
| Goal | Typical values |
|---|---|
| Flip horizontally | scale(-1, 1) |
| Flip vertically | scale(1, -1) |
| Lean a card (parallelogram) | skew(-10deg, 0) |
| Icon spin animation | rotate(360deg) (in a CSS keyframe) |
| Subtle hover enlarge | scale(1.05) |
| Nudge without layout shift | translate(4px, -4px) |
Because transform does not affect layout — the browser still reserves the original box in the document flow — it is safe to use for hover effects and animations without causing reflow. Pair with transition: transform 0.2s ease for smooth interactions.
Transform and animation
CSS transforms are the correct way to animate movement and size changes on the web. Unlike animating left, top, width, or height, animating transform does not trigger layout recalculation — the browser can handle it entirely on the compositor thread, resulting in smoother 60fps animations even on less powerful devices.
/* Smooth hover enlarge — GPU-composited, no layout reflow */
.card {
transition: transform 0.2s ease;
}
.card:hover {
transform: scale(1.03);
}
For CSS keyframe animations, transform and opacity are the two properties that perform best:
@keyframes slide-in {
from { transform: translateX(-100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
Transform origin
By default, all transforms pivot around the element’s centre (transform-origin: 50% 50%). You can change this to rotate around a corner, scale from the top, or spin around an edge point:
/* Rotate a card around its top-left corner */
transform-origin: top left;
transform: rotate(10deg);
The generator uses the default centre-origin, which is correct for most uses. If you need a different pivot, add transform-origin separately to your CSS.
All calculations run in your browser; nothing is uploaded.