How to use CSS Transform and 3D Playground
- Adjust translation, rotation, skew and scale, or choose Tilt or Flip and edit the resulting fields.
- Enter a positive perspective distance for the transform’s own perspective function, or 0 to omit it. Compare the local box while allowing for the preview’s separate parent perspective.
- Select Generate transform CSS and copy the declaration. To use the matrix alternative, put the matrix3d(...) value after transform: in your stylesheet. Test the same origin and parent geometry on the real element.
Example: CSS Transform and 3D Playground
Translate the box 10 pixels on X and rotate it 90° around Z.
Options
- Translation and rotation
- Each translation axis accepts -500 to 500 pixels and each rotation axis accepts -360° to 360°. Translation and rotation affect the visual box; they do not reflow surrounding content.
- Skew and scale
- X/Y skew accepts -89° to 89°. Each scale axis accepts 0.1 to 4; this tool does not use negative scale for mirroring. A 180° Y rotation is available through Flip.
- Perspective
- Zero leaves the transform’s perspective function out; positive values up to 2000 pixels add it. The preview container also has a separate 1000px perspective, which is not included in either copied value. Match parent geometry when comparing with your page.
- Functions or matrix
- The output gives a CSS transform declaration and a column-major matrix3d function value. They describe the fixed composition; matrix numbers are rounded to six decimal places. Do not paste the bare matrix value as a complete CSS declaration.
Supported inputs and limits
- The written function order is perspective, translate3d, rotateX, rotateY, rotateZ, skewX, skewY, scale3d, with neutral functions omitted.
- Composition order matters and the tool does not accept arbitrary CSS or a matrix as input.
- Numbers printed for copying round to six decimal places.
- The preview clips its transformed sample and adds its own 1000px parent perspective.
- Origin, parent transforms and container geometry can change the screen result.
More details
This is a copyable CSS tool, not a file or stylesheet editor.
Positive perspective values below 1px use the CSS 1px minimum when forming the matrix; zero omits the perspective function.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
Test the same origin and container
The copied functions and matrix describe the same composition. For a visual comparison, apply the same transform origin and container geometry. A parent’s transform or perspective can affect the final screen position.
Questions about CSS Transform and 3D Playground
Why can changing the order change the result?
Rotation, translation and scale generally do not commute. This tool states its order and computes the matrix for that order.
Is the matrix an exact decimal representation?
It is a rounded representation of the computed matrix. Trigonometric results may not have a finite exact decimal form.
Does the transform move nearby elements?
A visual transform does not reflow neighboring elements as a normal layout change would. Leave enough space in your actual layout.