Mozart K284 takes the cake for the hardest sonata (I'm actually working on that right now), but 333 is a fun one as well.
One of the recently published book on Mozart sonatas for the performer rates K 576 as probably the hardest.