CSS Transform Generator
Stack translate, scale, rotate, skew and the 3D functions into one transform, reorder them live — order changes the result — and copy the exact value. Everything runs in your browser.
Functions apply left-to-right, in list order. The preview and the CSS string are built on your own device with plain JavaScript — nothing you design is uploaded, and the page keeps working offline.
How the CSS transform property works
The transform property takes a space-separated list of functions and applies them to an element's rendering box without affecting document layout — the space the element reserves stays put, only its painted pixels move. A value looks like transform: translate(20px, 10px) rotate(-8deg) scale(1.15);. This tool builds exactly that string from an explicit, reorderable list, so what you see in the box is what you paste into your stylesheet.
Order is the whole point
Transform functions are not commutative: the browser applies them left to right, each in the coordinate space the previous one produced. translate(100px) rotate(45deg) moves the box 100px right and then spins it in place. Flip them to rotate(45deg) translate(100px) and the rotation tilts the axes first, so the same 100px now travels along a 45° diagonal — the box ends up somewhere else entirely. That is why single-function generators fall short for real work, and why every function here lives in a list you can drag up and down with the arrow buttons; the output is joined in your exact order.
Worked example: true centering vs. a nudge
Percentages on translate are measured against the element's own size, which powers the most-used layout trick in CSS:
.centered {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
}
The top/left put the element's top-left corner at the middle of its container; translate(-50%, -50%) then pulls it back by half its own width and height, landing its center on the point — no matter how big the element is. Switch either axis to px in this tool and you get a fixed nudge instead. Both are valid; the unit is the whole difference.
transform-origin: where things pivot
rotate, scale and skew all turn around the transform-origin, which defaults to the element's center (50% 50%). Move it to 0% 0% and a rotation swings the box around its top-left corner like a hinged flap, while a scale grows it away from that corner instead of symmetrically. translate is unaffected because it just shifts the whole box. Use the origin presets above, or type any valid origin such as left top or 20px 80%, and watch the pivot move.
The 3D functions, honestly scoped
This tool includes rotateX, rotateY and perspective for prototyping card-flips and hover-tilts. The catch worth knowing: rotateX/rotateY only look three-dimensional when a perspective() comes before them in the list — perspective supplies the depth cue that makes near edges larger and far edges smaller. A value like perspective(400px) is a strong tilt; perspective(1200px) is subtle. For multi-element 3D scenes you would normally set perspective on the parent as its own property and add transform-style: preserve-3d; those are out of scope here, since this generator targets a single element's transform value. The full 3D matrix functions (rotate3d, matrix3d) are also intentionally omitted — they are rarely hand-authored.
Identity, performance and what to reach for next
With no functions the tool emits transform: none; — the identity transform, identical to having no transform at all and handy for clearing a hover state. On the performance side, transform (and opacity) are the two properties browsers can animate on the compositor without triggering layout or paint, which is why transitions and keyframes should move things with translate/scale rather than top/width. To shape the timing of such a transition, pair this with the cubic-bezier() Generator; for the surfaces you are transforming, the Box-Shadow Generator, the Gradient Generator and the Color Converter finish the look. To crop the element into a non-rectangular silhouette before you transform it, reach for the CSS clip-path Generator.