Trefor is a village on the northern coast of the Llŷn Peninsula, in Gwynedd, Wales. It had a population of 1,067 at the 2021 Census. Trefor is in the Community of Llanaelhaearn, and Llithfaen is nearby. There is a beach in Trefor and also a shop in the village centre. It was in the historic county of Caernarfonshire.
 Trefor is 9 miles (14 km) north of Pwllheli and 13 miles (21 km) south of Caernarfon. It is surrounded by the sea and mountains, overlooking Caernarfon Bay.
 Just off the main A499 road, Trefor has a small harbour and a beach with some sand. At the top of the beach is an emergency telephone to summon help in the event of a maritime emergency. The land behind the beach is made of boulder clay deposited during the last glaciation, and is being slowly eroded by the sea. Because of this land erosion, a large expanse of clay is exposed when the tide is out which is dangerous to walk on.
 Rising steeply behind the village is Yr Eifl, a range of three hills that dominate the skyline. A granite quarry, known to the locals as Y Gwaith Mawr ("the large works"), Trefor Granite Quarry or the Yr Eifl Quarry, opened in 1850. The industrial narrow-gauge railway—Trefor Quarry railway—opened in 1865 and brought mined and refined rock from the quarry to the pier on the coast. From here it was transported via a conveyor belt onto ships, but the railway was gradually replaced by road transport. Large-scale industry ended with its closure in 1960, after which began the clean up: many of the buildings were demolished, rubble was either discarded beside the roads or/and buried, and the majority of the rail tracks were removed and reused as fence and gate posts, which can still be seen around the village. The rare properties of the granite within the quarry made it the perfect material to produce curling stones for the winter Olympics. Trefor is one of only two locations where this particular granite is found (the other being Ailsa Craig in Scotland). 
 Tre'r Ceiri, the second highest of the hills, has one of the best examples of a Stone Age or Neolithic settlement in Europe on its summit. Views from the summits, on a clear day, extend to Ireland, the whole of Cardigan Bay, Anglesey, Snowdonia, and the northern mountains of England. The central peak, the tallest at 561 metres (1,841 ft), is called Garn Ganol; the summit nearest the sea, and the lowest, is Garn For, home to the quarry.
 There is one school in Trefor, a primary school called Ysgol yr Eifl. As of 2023, 58 pupils were enrolled at the school. 88.6% of statutory school age pupils are from Welsh-speaking homes. 
 There was a football club in Trefor, which was re-established in the 2000–01 season. It has won one cup in its history, in the 2001–02 season.
 There are two retail outlets in Trefor: a village shop which opens between 7.00 am and 7.00 pm Monday to Friday with shorter hours at the weekend, and a post office. To the north end of the village is a children's play area. It is possible to go on a pushchair-friendly circular walk, starting at the play area, down to the beach, across the headland and back into the village again.
 Visitors can surf the other side of the harbour wall at Trefor. It can be a nice left-hand point over a stony reef thrown off the headland. There is a small pier next to the harbour; it has been deemed unsafe so is currently closed to the public.
 Since 2015 a cycle club has been established in the village and surrounding area called Clwb Beicio'r Eifl. Its members regularly take part in sportives and club rides.