Artistic Style, also known as AStyle, is a source code indenter, formatter and beautifier for C, C++, C++/CLI, Objective-C, C# and Java. It helps developers apply consistent formatting conventions across individual files and entire projects, reducing differences in indentation, whitespace and brace placement.
The application provides extensive control over how source code is presented. Developers can select established formatting styles, such as Allman, Java, Kernighan and Ritchie, GNU and Linux, or define their own combinations of formatting rules. Options can be specified directly on the command line or through configuration files, allowing projects to maintain consistent formatting conventions.
Artistic Style can operate independently or be integrated into development tools. Its library interface allows other applications to use its formatting engine, while command-line options support automated checks and large-scale code formatting. The program preserves unchanged files and offers a dry-run mode for reviewing potential changes before applying them.
This is free and open source software.
Key Features
- Automatically format source code written in C, C++, C++/CLI, Objective-C, C# and Java.
- Supports numerous predefined brace styles, including Allman, Java, GNU, Linux, Stroustrup and Whitesmith.
- Configure indentation using spaces, tabs or forced tabs.
- Control indentation of namespaces, classes, blocks, switch statements and preprocessor directives.
- Customise brace placement for functions, classes, conditionals and other language constructs.
- Adjust whitespace around operators, parentheses, brackets, pointers and references.
- Align pointer and reference declarations according to configurable rules.
- Automatically wrap long source code lines.
- Insert, preserve or remove blank lines according to formatting preferences.
- Process complete directory trees recursively.
- Include or exclude selected files and directories from formatting operations.
- Project-specific configuration files allow different codebases to use separate formatting rules.
- Dry-run mode reports proposed formatting changes without modifying source files.
- Return an error when files fail formatting checks, allowing integration with automated validation.
- Preserve original files as backups or disable backup creation.
- Support for UTF-8, UTF-16 and other character encodings.
- Library interface enables integration with editors, IDEs and other applications.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: gitlab.com/saalen/astyle
Support:
Developer: Andre Simon
License: GNU Lesser General Public License v3.0
Artistic Style is written in C++. Learn C++ with our recommended free books and free tutorials.
Related Software
| 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.