Abstract Variable-weight optical orthogonal codes (VW-OOCs) are one of the alternative designs for providing differentiated quality of service (QoS) at the physical level in optical CDMA (OCDMA) systems. In this paper, we address two novel designs for strict VW-OOCs which can guarantee the code correlation value of one. The proposed strict VW-OOCs enable many types of data transmission to be supported over OCDMA networks. Two algorithms for new codes are presented, where a number of codewords and a number of different code weights can be selected. The designs of strict VW-OOCs with several different code weights are discussed. An evaluation method for the new codes is presented; this considers intervals used for all codewords in each code set and offers a comparison with those of conventional codes. The correlation constraints of the proposed codes, based on the used intervals, are more strict than for some conventional codes. In addition, the bit error probability performance of the proposed codes in an OCDMA network with a triplet-service is evaluated analytically. Results show that the proposed codes can allow the differentiated QoS to support multi-service in OCDMA networks.