Highlights•Perianal Crohn's disease is the main risk factor for anal cancer in IBD patients.•Perianal Crohn's disease patient has a chance of HPV 3.29 time higher than control.•High risk HPV is numerically twice as prevalent in perianal Crohn's disease patient.