A child can be legitimized by marriage of the parties, by a legitimization action in court, or by proper legitimization paperwork. If done by marriage, it would still be wise to see a lawyer and document things to avoid a subsequent dispute over paternity.