You can give notice that is shorter or longer than required by your contract or by law.
If you give notice that is shorter then your employer doesn't have to accept your notice, so you will stay employed (obviously you can immediately give notice again with the correct length). On the other hand, they can accept your notice. Or they can tell you that they won't accept the notice you gave, but a different notice (say your contractual notice period is 3 months, you give one week notice, they can say "we don't accept one week notice, but we will accept one month").
If you give notice that is longer then your employer must accept your notice, but they are also entitled to lay you off with the correct notice period. So if your contract says "3 months", and you give six months notice, you may be out of a job in 3 months time.
Given a longer notice will never benefit you. You might change your mind, and then there is no way back. It is best for you to decide when you want to leave, and give the correct notice.