In this paper, we introduce new codeword sets based on order complexity (OC) which measures uncertainty of the order having each permutation string. The proposed codeword sets are generated by two procedures: Indexing and B-transform. Indexing is that a smaller positive integer is mapped to a permutation string whose OC is lower. B-transform plays role of generating a binary string from the permutation string on reflecting the OC, that is, low OC is represented by short binary strings and high OC is represented by long binary strings. The sets of these binary strings are our proposed codeword sets (B-codes). The B-codes are the uniquely decipherable complete variable length codeword sets and have shorter codeword length than most other variable length codes for values of 4 or more for the finite integers.