An optical fiber which comprises a coating layer disposed outside a bare optical fiber having a core and a cladding and a grating formed in the core of the exposed bare optical fiber by removing the coating layer and its manufacturing method. The optical fiber is provided with a re-coating layer disposed in the exposed bare optical fiber.