The families of British diplomats are leaving Israel as a “precautionary measure”, the Foreign Office has said.
The embassy would remain open and continue to provide consular services to those who need help, it added.
Israel has come under heavy rocket fire from Gaza in the days following a deadly surprise assault on communities in the south of the country launched by Hamas.
At least 1,200 people in Israel and 1,200 in Gaza have been killed.
The UK government advises against all non-essential travel to Israel, and the Foreign Office said it had made its decision about the dependents of diplomats “in line” with that advice.
Foreign Secretary James Cleverley visited Israel on Wednesday, where he said it had the “unwavering solidarity” of the UK amid indications it intends to carry out ground military operations in Gaza.
He said Israel has a right to defend itself but added “we would want to see as few civilian casualties as possible”.
Commercial flights to and from Israel are being disrupted by the outbreak of the conflict.
British Airways said on Wednesday it was suspending all flights to the country after ordering a plane heading to Tel Aviv to turn back due to security concerns.
Virgin Atlantic, EasyJet, Ryanair, Wizz Air, Air France, Lufthansa and Emirates have all suspended flights.
The government confirmed on Wednesday that 17 British nationals, including children, were dead or missing after the Hamas attack.