From studying to working in China

Currently, I am studying in Shanghai on an X2 Visa. Before my visa expires (but after I finish my studies), I would like to start working. I realize that I cannot work on a student visa. I am wondering if anyone can help me understand the process of switching from my student visa to a work permit. Will I have to leave China and return on a Z Visa? I'm hoping that I don't need to do this.

Thank you very much for considering my question :)

The procedure used to be quite easy. Then the laws changed. Now it is a very rigid process.

In general, while you can interview for jobs here in China, you will not be able to accept work at any of them until you return home to your home nation, and start the z-visa application process from there. The (future) employer can help you with the paperwork, but you will need to return to your home nation.

Best wishes.