Relative clauses modifying everything (alt hvad, alt hvad der)

In Danish, translating "everything that" depends on whether "everything" is the object or the subject of the relative clause.

Object relative clauses: alt hvad

When "everything" is the object of the relative clause, use alt hvad. This happens when the clause already has a distinct subject doing the action (like "we" or "the algorithm").

We must protect everything that the algorithm collects.
Vi skal beskytte alt hvad algoritmen indsamler.
I delete everything that the hacker tries to exploit.
Jeg sletter alt hvad hackeren prøver at udnytte.

Subject relative clauses: alt hvad der

When "everything" is the subject of the relative clause—meaning it is doing the action itself—add der. The phrase becomes alt hvad der.

Everything that exploits our search history is dangerous.
Alt hvad der udnytter vores søgehistorik, er farligt.
Have they encrypted everything that happens on the website?
Har de krypteret alt hvad der foregår på hjemmesiden?

Because Danish relative clauses need a clear subject, der steps in to act as a placeholder.

A quick rule of thumb

If the English word immediately following "that" is a verb (e.g., "that is", "that happens"), use alt hvad der. If it is a noun or pronoun (e.g., "that the company", "that we"), use alt hvad.

Do you trust everything that the company promises about the algorithm?
Stoler du på alt hvad virksomheden lover om algoritmen?
The hacker copies everything that is in the search history.
Hackeren kopierer alt hvad der er i søgehistorikken.