As for forging court records, it is definitely illegal.
As long as you have evidence to prove that it is forged (especially in key places, you must press your fingerprints). You deny it all), the forged part is invalid.
Forgery of handwriting may require handwriting identification. A document that must be signed by both parties is invalid if it lacks the signature of one party and has not been authenticated by the judge on behalf of the clerk.