Skip to content
🔄

CSS Transform Generator

Build 2D and 3D CSS transforms with a live preview.

Runs in your browser

Updated

0px
0px
0deg
1
0deg
0deg
800px
0deg
0deg
0px
Transform

Sliders, not code

Ten range controls drive the output: translate X and Y between -200 and 200 pixels, rotate between -360 and 360 degrees, scale as 10 to 300 mapped through division by 100, and skew X and Y between -60 and 60 degrees. Ticking Enable 3D adds perspective from 100 to 2000 pixels, rotate X and Y, and translate Z. The blue square in the preview carries the same declaration the read-only CSS box shows, so what you see is what you copy.

How the rule is assembled

Functions are appended only when non-zero, in a fixed order: translate, translateZ, rotate, rotateX, rotateY, scale, skew. Scale prints rounded to three decimals. When 3D is active the output also carries transform-style: preserve-3d, and, if any depth value is set, a perspective line aimed at the parent container. With every slider at rest the rule reads exactly transform: none;.

Presets worth reading

Hover Zoom lands on transform: translate(0px, -8px) scale(1.1);. Card Tilt switches on 3D and emits three lines: perspective: 800px;, transform: rotateX(20deg) rotateY(-15deg);, and the preserve-3d declaration. Spin produces rotate(360deg), which stills a static box but is a sensible anchor for motion later; the CSS animation generator builds the keyframes around it. Flip sets rotateY to 180 without touching the 3D checkbox, so no perspective line appears even though the rotation is three-dimensional.

Where it stops

  • Transform-origin never enters the output, yet it decides where every rotation pivots.
  • The function order is fixed, so a rotate-then-move recipe needs hand edits.
  • Sliders step in whole numbers; there are no fine numeric entry fields.
  • Reset zeroes the ten sliders but does not untick Enable 3D, so after Card Tilt the copied block keeps emitting preserve-3d.
  • The preview is a plain square, so how text and images smear under rotation goes unshown.

Questions people ask

Why does perspective belong on the parent?

Perspective describes the viewer's distance to the element, which is why the tool styles its own stage container the moment 3D is on.

Does transform reflow the page?

No. Translations and scales paint over neighbours without moving layout.

What finishes the same element?

Edges and depth: the box shadow generator and the border radius generator.