Religion that is pure and undefiled before God the Father is this: to care for orphans and widows in their distress, and to keep oneself unstained by the world.
In context
25But whoever peers into the perfect law of freedom and continues in it — not as a hearer who forgets, but as a doer who acts — that one will be blessed in the doing. 26If anyone considers himself religious but does not bridle his tongue, he deceives his own heart, and his religion is worthless. 27Religion that is pure and undefiled before God the Father is this: to care for orphans and widows in their distress, and to keep oneself unstained by the world.