Generally, a free confession to police isn't inherently invalid, but its use in court is a complicated matter. The vital factor is whether it was obtained fairly. Police must adhere to specific guidelines, including https://panchanandshaw.com/blog/court-auction-procedure-explained/