legal
In accordance with legal regulations; permitted or allowed by law.
Der Download dieser Software ist vollkommen legal.
Downloading this software is completely legal.

Loading your saved state.
In accordance with legal regulations; permitted or allowed by law.
Der Download dieser Software ist vollkommen legal.
Downloading this software is completely legal.

'Legal' (legal) is an international word that comes from the Latin word 'lex' for 'law'. This makes it easy to understand in many languages.
Die Anwältin prüft, ob das Vorgehen des Unternehmens legal war.
The lawyer is checking whether the company's approach was legal.
The opposite of 'legal' (legal) is formed with the prefix 'il-': 'illegal' (illegal). This type of negation with 'il-', 'ir-', or 'in-' is typical of words of Latin origin.
Das Parken in dieser Zone ist illegal und wird mit einer Geldstrafe geahndet.
Parking in this zone is illegal and is punishable by a fine.
The word 'legal' (legal) is used primarily in formal, official, or legal contexts when the issue is compliance with laws.
Wir müssen einen legalen Weg finden, um das Projekt zu finanzieren.
We need to find a legal way to finance the project.
Common phrases are 'auf legalem Weg' (by legal means), 'legale Mittel nutzen' (to use legal means), or something 'legal machen' (to make something legal). It describes actions that are in accordance with the law.
Er hat sein Vermögen auf völlig legalem Weg erworben.
He acquired his fortune by completely legal means.
right
'von Rechts wegen' (by right) and 'legal' both refer to something being in accordance with the law. 'legal' is an adjective and means that something is permitted by law. 'von Rechts wegen' is a fixed, more formal expression and emphasizes more that there is a legal claim or a lawful basis. They can be confused because both appear in legal situations. In practice: for 'permitted or not forbidden', 'legal' usually fits; for 'someone is entitled to it under the law', 'von Rechts wegen' is more appropriate.

Das Herunterladen dieser Datei ist legal.
Downloading this file is legal.
Von Rechts wegen darf die Mieterin die Unterlagen einsehen.
By right, the tenant may inspect the documents.