Asking to rank Harry Potter characters is, generally, like asking who your favorite Beatle is. Answer: it's complicated. Highly dependent on situation / subcategory. Below is a general attempt
  1. Sirius Black
    Biggest turnaround from thought-he-was-evil to best guy in the world offering Harry most realistic opportunity for normal, loving family. Heart wrenching when he was murdered. Also he's a dog. Also Pettigrew is the worst.
  2. Albus Dumbledore
  3. Harry Potter
  4. Hermoine
  5. Ron Weasley
  6. Hagrid
  7. The Dursleys
    Many think of them as the worst, but their idiocy is hilarious. And Dudley is a perfect name for the character.
  8. Tonks
  9. Weasley twins
  10. Luna Lovegood
  11. Dobby
  12. Snape