Silicon is an excellent material for microelectronics and integrated photonics(1-3), with untapped potential for mid-infrared optics(4). Despite broad recognition of the importance of the third dimension(5,6), current lithography methods do not allow the fabrication of photonic devices and functional microelements directly inside silicon chips. Even relatively simple curved geometries cannot be realized with techniques like reactive ion etching. Embedded optical elements(7), electronic devices and better electronic-photonic integration are lacking(8). Here, we demonstrate laser-based fabrication of complex 3D structures deep inside silicon using 1-mu m-sized dots and rod-like structures of adjustable length as basic building blocks. The laser-modified Si has an optical index different to that in unmodified parts, enabling the creation of numerous photonic devices. Optionally, these parts can be chemically etched to produce desired 3D shapes. We exemplify a plethora of subsurface-that is, 'in-chip'-microstructures for microfluidic cooling of chips, vias, micro-electromechanical systems, photovoltaic applications and photonic devices that match or surpass corresponding state-of-the-art device performances.