The municipality of Idrija is surrounded by the following municipalities: Cerkno to the north, Žiri to the northeast, Logatec to the east and southeast, Ajdovščina to the south and soutwest, Nova Gorica (a short border) to the west and Tolmin to the northwest.