The 38-year-old former Take That singer said that he had more anonymity when he was of Styles' age, reported MTV online.
"I feel a bit for Harry, at his age I was in this lilywhite boyband, Take That. But I was meeting up with mates, jumping out of the tour bus and into a Transit van at motorway service stations all around the country.
"It's not a secret anymore but I would get off my face and have complete anonymity. No-one had a camera phone so I could go and enjoy myself properly. Harry is finding out it's not so easy for him. Everybody is a ladies' man or a man's man, whatever your persuasion might be. He's just having a nice time," Williams said.