URDF to MJCF Converter — convert URDF to MuJoCo XML online

Free online URDF to MJCF converter: rebuilds the kinematic tree, maps joints and limits, converts full extents to MuJoCo half-extents, and preserves full inertia tensors. Runs in your browser — nothing is uploaded.

The conversions that break naive scripts (and how this tool handles them)

DifferenceURDFMJCF (MuJoCo)This tool
Box sizeFull extentsHalf-extentsDivides by 2
Cylinder lengthFull lengthHalf-lengthDivides by 2
Angle unitsRadiansDegrees by defaultEmits <compiler angle="radian">
StructureFlat link/joint listNested body treeRebuilds the tree from joints
Joint placementBetween parent/childInside the child bodyJoint origin becomes body frame
Fixed jointsExplicit jointJointless welded bodyBody without joint (compiler fuses)
Off-diagonal inertiaixy/ixz/iyzOften dropped by scriptsPreserved via fullinertia
Mimic joints<mimic>No direct equivalentEmitted as <equality> constraint
Visual vs collisionSeparate elementsGeom groups/contypeVisual: group 2, no contact; collision: group 3

Output is verified against MuJoCo 3.10: converted models compile with MjModel.from_xml_string and simulate without modification (mesh-free models; mesh models need their asset files placed alongside).

Notes on meshes and actuators

Mesh geometries are emitted as <asset> entries referencing the original filenames — place the mesh files next to the MJCF and fix any package:// paths. MuJoCo does not read COLLADA (.dae); convert those meshes to STL or OBJ. A starter <actuator> block with one motor per actuated joint (ctrlrange from URDF effort limits) is appended so the model is immediately usable for control experiments and RL.

Check your source file first: run it through the URDF validator — zero-mass links and missing joint limits cause MuJoCo compile errors. Batch conversion or CAD→simulation pipelines: Pro tools →