Uncrustify is a source code formatter that helps developers maintain consistent coding conventions. It supports C, C++, C#, Objective-C, D, Java, Pawn and Vala, providing extensive control over the appearance and layout of source files.
The software offers hundreds of configuration options covering whitespace, indentation, alignment, line breaks and the placement of braces. This flexibility allows projects to adopt detailed coding standards rather than relying on a small selection of predefined styles.
Uncrustify works from the command line and can process individual files or collections of source code. Configuration files can be shared among team members, helping maintain consistent formatting across contributors and development environments.
This is free and open source software.
Key Features
- Formatting support for C, C++, C#, Objective-C, D, Java, Pawn and Vala.
- Extensive configuration options for defining coding conventions.
- Add or remove whitespace around operators, parentheses and other constructs.
- Control indentation for functions, classes, namespaces and conditional statements.
- Configure brace placement and the use of braces around statements.
- Manage blank lines and line breaks between code constructs.
- Align variable declarations, function parameters and structure initialisers.
- Control spacing and alignment in comments.
- Configure formatting rules for preprocessor directives.
- Apply consistent formatting to individual source files or multiple files.
- Shared configuration files for enforcing project-specific styles.
- Display available settings and generate configuration templates.
- Update older configuration files to include newly introduced options.
- Command-line operation suitable for automated formatting workflows.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: github.com/uncrustify/uncrustify
Support:
Developer: Uncrustify contributors
License: GNU General Public License v2.0
Uncrustify is written in C and C++. Learn C with our recommended free books and free tutorials. Learn C++ with our recommended free books and free tutorials.
Related Software
| C and C++ Linters | |
|---|---|
| OCLint | Static code analysis tool for improving quality and reducing defects |
| cpplint | Static code checker for C++ |
| CodeChecker | Platform for running static analysers and managing code defects |
| Uncrustify | Source code beautifer |
| Infer | Static analyser that detects bugs in Java, C and C++ code |
| Include What You Use | Source analysis tool for C and C++ projects built on Clang |
| Cppcheck | Static analysis tool for C/C++ code |
| flawfinder | Scans C and C++ source code for potential security weaknesses |
| clazy | Qt-focused static analyser that catches common C++ mistakes |
| ClangFormat | Code formatting tool |
| Clang-Tidy | Clang-based C++ “linter” tool |
| Smatch | Static analysis tool for finding defects in C code |
| Coccinelle | Semantic patching tool for analysing and transforming C code |
Read our verdict in the software roundup.
| C# Code Formatters | |
|---|---|
| Uncrustify | Highly configurable source code beautifier supporting many languages |
| Artistic Style | Flexible source code indenter and formatter for C, C++, C# and Java |
| CSharpier | Opinionated C# formatting with zero configuration |
| ClangFormat | Automatically formats C, C++, Java and other source code consistently |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.