score:3
The validity period of a UK Standard Visitor visa is generally 6 months (although it can be granted for less in certain circumstances). It is therefore legal to stay for up to 6 months https://www.gov.uk/standard-visitor-visa however it is not necessarily a good idea to stay that long if you stated a significantly shorter stay in your application. You may face a difficult landing interview on arrival or even be denied entry Cancelled UK visa on entry or you may be refused a visa next time.
Upvote:7
It's not a good idea. It's recommended you stay for the approximate length you provided when you apply for your visa.
Bad things tend to happen if you apply for a UK visa saying you'll stay for, say, two weeks and actually stay for three months. They can cancel your visa and refuse you entry. Or they might let you in, but refuse you future visas because you stayed much longer than you said you would.
You can certainly apply for a visitor visa for a stay of six months. However, it may be difficult to get, as you won't get a visa unless you can demonstrate strong ties to your home that indicate you will leave on time, and being able to be away for six months is often inconsistent with that.
In short, you should be honest in your visa application about how long you want to stay, and then stick to roughly that time even if your visa is valid for a longer period.