Formatters

Java Code Formatter

Tidy up Java source code with consistent indentation, brace placement, and statement spacing. Useful for cleaning up minified or poorly formatted snippets before code review.

public class Hello {
    public static void main(String[] args) {
        for(int i=0;
        i<3;
        i++) {
            System.out.println("hi "+i);
        }
    }
}

Note: this is a structural pretty-printer, not a full Java parser. For production use, run your CI's formatter (google-java-format, Spotless, IntelliJ) before committing.

Related tools