Used to compare two things by likeness — the conversational equivalent of ように/ような. This is how you say 'as strong as an ox' or 'shining like a diamond' in everyday Japanese.
[Noun] + みたいに + [verb/adj] | [Noun] + みたいな + [noun]
鳥みたいに自由に生きたい。
Tori mitai ni jiyuu ni ikitai.
I want to live freely, just like a bird.
鳥みたいに (adverbial: in the manner of a bird) + 生きたい
魔法みたいな話ですね。
Mahou mitai na hanashi desu ne.
That's a story that sounds like magic.
魔法みたいな (adjectival: magic-like) + 話
彼みたいな人と結婚したい。
Kare mitai na hito to kekkon shitai.
I want to marry someone like him.
彼みたいな人 = a person like him
• に vs な: to modify an action use に (鳥みたいに飛ぶ = fly like a bird); to modify a noun use な (鳥みたいな人 = a person like a bird). • A simile implies the thing IS NOT actually the noun (子供みたいな大人 = an adult who acts like a child).
The JLPT rarely asks whether you recognise a pattern — it asks which of several similar patterns fits. These are the ones みたいに is tested against.
Identical meaning, but ように/ような is more formal/written; みたいに/みたいな is casual and spoken. Nouns take の before よう (子供のように) but attach directly to みたい (子供みたいに).
〜らしい means 'behaving as a real X should' (男らしい = manly); みたいな means 'resembling an X (but not one)'.
Study Japanese grammar on LenGaki

Get the Android app
The app adds offline study, home-screen widgets, stroke-order tracing, speaking practice with pronunciation scoring, and an AI tutor that answers questions in context — none of which fits in a browser tab.