I have a project consisting of ~25 source files, spread across three directories (all .java, if that matters). I have a problem with inconsistent indentation, however. Both tabs and spaces are used throughout the project, sometimes even in the same file. I'm looking for a tool that will either replace all spaces with tabs, or vise-versa.


  • gratis
  • Ability to choose between tabs and spaces (I'm fine with using more than one tool
  • Works with either Windows 10 or GNU/Linux
  • Works with more than one file/directory at a time
  • Works somewhat reliably (I don't want to have to end up going through all my code reformatting it to look "pretty")
  • Works with Java code (preferably works on any/most source code)

Preferably open source, but not required.

1 Answer 1


IntelliJ or Eclipse

Both are free and you can do that.

By the way you should use an IDE if you develop in Java ;-)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.