Generally, a free statement to officers isn't immediately illegal, but its admissibility in a trial is a complex matter. The key factor is whether it was obtained legally. Officers must adhere to specific guidelines, https://panchanandshaw.com/blog/confession-law-guide/