‘You can’t judge a book by its cover’ means to not judge someone or something based solely on appearance.
Examples:
“I thought this no-brand bread would be horrible; turns out you can’t judge a book by its cover.”
Or
“At first we did not want to go into the restaurant as it looked small and cramped; but the food was delicious – we realised that you can’t judge a book by its cover.”
Or
“The man did not look very intelligent, but you can’t judge a book by its cover.”
The Origins
This phrase has been in use since the mid 1800s. It means that you cannot know what someone or something is like just by looking at the person or thing’s appearance.