A wiring substrate (10, 40, 60, 80) includes a wiring pattern (13, 21, 41, 43, 65, 83a, 83b, 83c) and an insulating layer (11, 26, 48, 81) to which the wiring pattern is fixed. The insulating layer includes an edge. The wiring pattern (13, 21, 41, 43, 65, 83a, 83b, 83c) includes a joint portion (14, 44, 66) connected with the insulating layer (11, 26, 48, 81) and an extended portion (45, 45, 67, 85) that extends from the joint portion (14, 44, 66) and protrudes from the edge of the insulating layer (11, 26, 48, 81). The insulating layer (11, 26, 48, 81) or the joint portion (14, 44, 66) includes an outermost surface. A connection terminal (T, T1) is provided by bending the extended portion (45, 45, 67, 85) so that a part of the extended portion (45, 45, 67, 85) is protruded from the outermost surface of the insulating layer (11, 26, 48, 81) or the joint portion (14, 44, 66).