This study compares Indonesia's and Hungary's legal and humanitarian approaches to managing the 2015–2022 refugee crisis and proposes an exit strategy for Indonesia's refugee handling. Indonesia faces challenges due to the maximum detention duration stipulated in its Immigration Law No. 6/2011, which lacks further legal basis for prolonged detention. Employing a qualitative approach with comparative literature analysis, the study reveals Hungary's emphasis on legal solutions, leading to potential human rights violations but a decrease in asylum seekers, contrasting with Indonesia's humanitarian approach, resulting in positive impacts on refugees but a surge in asylum seekers. It concludes by recommending Indonesia to conduct comparative legal research with Hungarian asylum law to develop more effective refugee policies addressing legal and political concerns. This research enhances understanding of refugee management in Indonesia and Hungary, offering insights for nations grappling with similar crises.