In normal play, you may mark your ball, clean it and then replace the ball in it's original spot- but only when you are on the putting green. In the winter, some winter rules come into effect, these are things like lift clean and place or lift clean and drop. These winter rules vary from club to club, so you should check the rules in place before you start your round.
Chat with our AI personalities
Yes, this is perfectly legal. You mark your ball, usually with a coin or marker. You can pick the ball up, clean it and replace it in it's original spot. The putter green is the only place where you can do so.
You could be accused of testing the surface of the green so I would clean the ball off it. Besides you could leave muck on the green.