I am working with the very bad code-formatted web application. Is there on the market some kind of JSP formatter , commercial or free . I know JACOBE beautifier, which is only for java code
I don't know how well it will work, but try cutting and re-pasting the source within IDEA. When you paste source it gets tidied up, to an extent.