Kommasetzung.
Not a feeling, a rule.
In English, commas are often a question of rhythm, a pause you can choose to write or leave out. In German, commas are mostly a question of grammar. A handful of structures always take a comma, a handful never do, and only a small remainder is actually up to you. Learn the structures, and the commas mostly take care of themselves.
Lists: commas between items, not before und or oder
In a list of three or more items, every item is separated from the next by a comma, except for the very last one, which is joined by und (and) or oder (or) instead, with no comma before it.
- Ich kaufeBrot, Milch und Käse. (I'm buying bread, milk and cheese.)
- Wir können heute, morgen oder übermorgen kommen. (We can come today, tomorrow or the day after tomorrow.)
If a comma appears directly before und or oder in a simple list like this, it is one comma too many.
Subordinate clauses: always separated by a comma
Any clause introduced by a subordinating word, weil, dass, wenn, obwohl, ob, and similar, is always separated from the main clause by a comma. This is not optional, and it applies whichever clause comes first.
- Ich bleibe zu Hause, weil ich krank bin. (I'm staying home because I'm sick.)
- Weil ich krank bin, bleibe ich zu Hause. (Because I'm sick, I'm staying home.)
Notice the second example: when the subordinate clause comes first, the comma sits right before the main clause starts, and the main clause's verb moves straight after it.
Related: weil. Because, with the verb at the end., dass. That., and wenn. If, or whenever.
Two main clauses: it depends on the conjunction
When two complete main clauses are joined, the comma depends on which word joins them. und and oder usually do not need a comma, although one is allowed for clarity. aber (but), sondern (but rather), and denn (because) always need one.
- Ich koche und du deckstdenTisch. (I'm cooking and you're setting the table.)
- Ich koche, aber du deckstdenTisch nicht. (I'm cooking, but you're not setting the table.)
One way to remember it → aber and sondern always mark a contrast, and that contrast always gets a comma. und and oder just connect, so the comma is optional.
Relative clauses: always set off with commas
A relative clause adds information about a noun, introduced by der, die, das, den, and so on. Unlike English, where some relative clauses skip the comma, German relative clauses are always set off by commas, on both sides if the sentence continues afterwards.
- DerMann, der dort steht, istmein Lehrer. (The man who is standing there is my teacher.)
- DasBuch, das ich lese, ist spannend. (The book that I'm reading is exciting.)
The takeaway: subordinate clauses (weil, dass, wenn, ...) and relative clauses (der, die, das, ...) always get a comma. Lists get commas between items, but never directly before und or oder. Two main clauses joined by aber, sondern, or denn always need a comma, joined by und or oder usually do not.