The term righteousness is employed both in the Old and New Testaments. The Hebrew word generally used is sedekah, and the Greek term is typically dikaiosoune. Both are connoted as a kind of moral attribute and quality while not diminishing the term's legal nature and status.
Righteousness in the OT
Righteousness in the Old Testament is most often employed in books such as Psalms and Isaiah, and is often attributed as a moral quality or pertaining to moral behavior (e.g., Psalm 18:24; Isaiah 56:1). One's righteousness is due to the fact that they have lived uprightly and behaved justly before God and their neighbor. The righteous ones are those who show mercy and walk in the counsel of the Lord (see Psalm 1; Isaiah 57:1-2).