The open-source tool for automated code search, transformation, and modernization across the languages and frameworks you already rely on.







OpenRewrite is an Apache-licensed open-source project that makes automated code transformation precise and repeatable. At its core is the Lossless Semantic Tree (LST), a compiler accurate representation of your code that enables recipes to search, analyze, and change code safely without breaking what it touches.
OpenRewrite is maintained by Moderne and contributed to by thousands of developers worldwide.
Recipes are deterministic programs that navigate the LST to find and transform code. They range from simple fixes like renaming a method or updating a dependency, to complex multi-step migrations like upgrading from Spring Boot 2 to 3. Recipes are composable, testable, and community-maintained.





.png)
.png)
.png)
.png)
.png)
.png)




.png)
.png)
.png)
.png)
.png)
.png)
The Lossless Semantic Tree is what makes OpenRewrite transformations safe and precise. Learn how it models your code and why it matters for accurate, repeatable changes.
Get recipes running in your existing build setup. Learn how to configure the OpenRewrite plugin, select recipes to run, and review changes before committing them.
Learn how to build a custom OpenRewrite recipe from scratch. Walk through the visitor pattern, write your transformation logic, and add tests to verify your changes.
Ready to run recipes across hundreds of repositories at once? Take OpenRewrite to enterprise scale with multi-repo execution, PR management, and progress tracking.