It's very nice of you to help me.
That's very nice of you to help me.
I know the first sentence is correct. But how about the second sentence?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.
Sign up to join this communityThe second doesn't quite work. Either of these is good:
It's very nice of you to help me.
That's very nice of you.
That in the second sentence refers to "(you) helping me" - so it's redundant to include "to help me".
It in the first sentence is a dummy pronoun - it does not refer to any agent. So it's ok to be explicit about the thing that's very nice of you to do in this case.
The second sentence is at best awkward. One might well say just:
That's very nice of you.
leaving what was nice to the context, the previous discussion or action.