Hanif has his bachelor degree from Faculty of Law, Universitas Gadjah Mada, Yogyakarta in 2017. He served as assistant in UGM Law Library while in the campus and also experienced working in an international donor agency.

He got the first place in Dean Cup Penal Moot Court Competition in 2012, actively involved in various student organization, and defending undergraduate thesis in anticorruption field. In Lokataru Law and Human Rights Office,  he assists senior lawyer in various cases, ranging from criminal, labor, to civil dispute, specializing in legal research and writing.