How do you know if your itch is from hemorrhoids or pinworms?

Test. Pinwoms generally occurs in kids who play in dirt. The worms can be seen after placing scotch tape on the anal skin and pearling it off. Best bet is to be seen by colon and rectal surgeon. No itch is treatable with dietary and hygiene modification.
Exam. You need someone to look, preferrably a professional.