Organize (pretty) code

I'm looking for terminal programs, which organize and pretty code like HTML or JavaScript.
Thanks!

---------- Post updated at 07:01 AM ---------- Previous update was at 01:49 AM ----------

Found this Online javascript beautifier

Mine is pretty when I write it; sometimes, an editor forces a style on me. My style is very line oriented, for good diff: one predicate per line, one assign per line, one declaration per line, sometimes, one argument a line. Silly lines like for { I merge. Indentation is logical, except sometime I put long data lines (long strings) at 0 offset. Good luck!