Submicrometer dielectric phase masks allow for the realization of the miniaturization of high-quality optical elements. In this Letter we demonstrate spatial intensity beam shaping using phase masks attached to optical single-mode fibers. The phase masks are directly fabricated onto the end facet of optical fibers using femtosecond two-photon direct laser writing, achieving, therefore, submicrometer alignment accuracy. We observe high-quality intensity patterns and find excellent agreement with simulations. Our results prove that 3D printing of diffractive micro-optics can achieve sufficient performance to enable compact devices.Micro-optical elements of high quality are used in a large variety of applications, such as telecommunication, sensing technology, and industrial inspection. These elements are usually integrated into systems that contain additionally electrical, mechanical, or other optical components. Therefore, it is important to further miniaturize these optical elements in order to extend the field of applications to biotechnology and medical engineering. Also, integrated fiber optical or complex lab-on-a-chip devices will become possible.As the miniaturization of lenses is limited, diffractive elements like phase plates provide tremendous advantages. Because of their surface profile, phase plates generate a spatial phase shift and can thus be used as focusing or beam-shaping elements [1]. Conventionally, phase masks are fabricated by lithographic techniques such as gray-scale, multiple-mask, and moving-mask lithography, followed by various etching processes. These techniques are well suited for the fabrication of large-area samples, but are cost and time intensive for prototyping. In the recent past, nonlinear fabrication approaches such as femtosecond laser surface ablation were introduced [2,3]. These techniques enable maskless prototyping and production of small and medium numbers of devices, but they still suffer from drawbacks such as low resolution and, therefore, large optical elements. Thus, femtosecond direct laser writing allows for phase masks with unprecedented feature sizes in the submicrometer range and further miniaturization of optical elements, but can also be extended to metasurfaces and metamaterials [4].Here, we introduce 3D printed phase plates directly attached to optical single-mode fibers in order to spatially shape the emerged intensity distribution. Our phase plates are fabricated by femtosecond two-photon direct laser writing using a dip-in approach. The surface patterns of the beam-shaping phase plates are calculated using Fresnel-Huygens diffraction theory. By analyzing the optical performance of the diffractive optical elements, we demonstrate the viability of the fabrication technique for producing compact integrated optical elements.Femtosecond 3D direct laser writing is additionally well suited for the manufacturing of refractive free-form surfaces, compound lenses, and photonic crystal structures with submicrometer feature sizes. As a result, it is possible to manuf...