← All Tools

Quaternion ↔ Euler Converter

Convert between quaternions, Euler angles, axis-angle, and 3×3 rotation matrices. Edit any representation and the others update in real time. A live wireframe cube shows the resulting orientation.

Settings

Quaternion (x, y, z, w)

x
y
z
w
Identity rotation. |q| = 1.000

Euler angles

Z (yaw)
Y (pitch)
X (roll)

Axis-angle

Axis is auto-normalized. Angle uses the same unit as Euler.

Rotation matrix

Right-handed, column-vector convention: v' = R · v. Each column is the image of a basis vector.

3D preview

Wireframe cube rotated by the current quaternion. Red = +X, green = +Y, blue = +Z basis arrows.

About

Quaternions encode 3D rotations without gimbal lock. The unit-quaternion (x, y, z, w) with w = cos(θ/2) and (x, y, z) = sin(θ/2)·axis represents a rotation of angle θ around axis. Euler-angle conversions depend on the order convention — ZYX (yaw, pitch, roll) is the most common in robotics and games. Near ±90° pitch (or whichever middle axis), Euler representation loses a degree of freedom (gimbal lock); the quaternion stays well-defined. The matrix shown is built directly from the quaternion: no double conversion through Euler.