Two silicon-based ultraviolet (UV) and blue-extended photodiodes are presented, which were fabricated for light detection in the ultraviolet/blue spectral range. Stripe-shaped and octagon-ring-shaped structures were designed to verify parameters of the UV-responsivity, UV-selectivity, breakdown voltage, and response time. The ultra-shallow lateral pn junction had been successfully realized in a standard 0.5-μm complementary metal oxide semiconductor (CMOS) process to enlarge the pn junction area, enhance the absorption of UV light, and improve the responsivity and quantum efficiency. The test results illustrated that the stripe-shaped structure has the lower breakdown voltage, higher UV-responsicity, and higher UV-selectivity. But the octagon-ring-shaped structure has the lower dark current. The response time of both structures was almost the same.