Vrhnika (Oberlaibach; Nauportus) is a town in Slovenia. It is the seat of the Municipality of Vrhnika. It is located on the Ljubljanica River, 21 km from Ljubljana along the A1 motorway.
Vrhnika lies at the southwest end of the Ljubljana Marsh near the sources of the Ljubljanica River, where the Ljubljana Basin opens up between the foot of Ljubljana Peak (Ljubljanski vrh, 819 m) and Ulovka Hill (801 m). The territory of the town extends south onto the Logatec Plateau (Logaška planota), where the Big and Little Drnovica Collapse Sinkholes (Velika Drnovica, Mala Drnovica) are found. A rich network of springs and streams originates and joins near the town to form the source of the Ljubljanica.