Sensex, Nifty ended on a higher note on Thursday as the gains were trimmed on the back of profit booking on higher levels.