If I did bad to someone and they don’t know it, is there anyway to get forgiveness from Allah (SWT) without informing the person of what I did?
If you have taken something from some one in a wrong way, you must return it back to him.
If you did wrong to some one but you are unable to seek his pardon, you need to pray for him and seek from Allah (SWT) to forgive you and forgive him as well.
Wassalam.