Generally, a uncoerced admission to police isn't inherently unlawful, but its acceptance in court is a complicated matter. The key factor is whether it was obtained properly. Police must adhere to specific rules, https://panchanandshaw.com/blog/contempt-law-guide/