Is it legal for me to ride a bicycle on the pavement (sidewalk)? UK only, just wanted to check if it's actually legal. The area I'm living on is deadly on the roads, so want to know about riding on pavements (sidewalk/pedestrian walkways) instead where there is no bike lane (half of the roads have bike lanes around here and suddenly they disappear...).
According to the Highway Code:

Rule 64
You MUST NOT cycle on a pavement.

So the short answer is a definite no, although discretion is given for young children riding on the pavement.
This article has details the rules for cycling on things like footways, footpaths and bridlepaths.  (In short: no, no and yes - but the article is probably worth a read.)
More information about rules in other countries can be found in this question.