Yes, and they are among the best nitrogen sources you can get for free. They are also the fastest way to turn a working pile into a stinking anaerobic mat, because a whole lawn arrives at once and packs down like wet felt. Below: whether you can compost grass clippings, why, how much to add, and the mistakes that cause trouble.
Adding grass clippings to a pile. Chop it, mix it, bury it.
Why
Fresh clippings are around 15:1 carbon to nitrogen and roughly 80% water. That combination decomposes explosively. A heap of pure clippings will heat within a day and go sour almost as fast.
The problem is physical as much as chemical: fine wet blades compact into layers that air cannot penetrate.
How to add it
Mix, never layer. Roughly equal volumes of clippings and dry browns, forked together.
Or wilt them first. Spread them for a day or two until they are half dry, which removes much of the water and most of the matting problem.
Or leave them on the lawn. Returning clippings to the grass is genuinely good practice and saves handling them entirely.
Common mistakes
Dumping the whole catcher in one go. The classic route to a sour pile.
Composting clippings from a lawn treated with persistent herbicide. Aminopyralid and clopyralid survive composting and will damage tomatoes, beans and potatoes months later. If the lawn has been treated with a selective weedkiller, leave the clippings on it.