The potential uses in the Internet of Things (IoT), blockchain is gaining prominence. It is particularly skillful at storing data in immutable blocks, which is connected to its protected peer‐to‐peer architecture in the face of a growing challenge of transaction authorization in industrial and service‐provider applications. IoT is prolonged to several additional applications as a result of its integration with various technologies, allowing direct engagement with our individual and professional lives. The major aim of this study is to provide the security based IoT data communication in blockchain using novel techniques. The device's security is a significant concern. However, on‐demand security solutions have issues since devices have limited processing and energy resources. IoT devices do not allow for the use of large, costly systems. In order to address these issues, we present a novel optimized fuzzy architecture for a blockchain‐based IoT device data exchange and communication in this research. The TLBO method is used to improve decision‐making capabilities, while the Mamdani fuzzy inference system makes the majority of the decisions. To construct the two input variables (drop ratio and integrated trust level) and reduce the dimensionality of the input information, the TLBO method was used. We examine and illustrate the efficacy of our method with another state‐of‐art method. Based on the experiment, we have obtained 1.8, 2.1, 2.8, 3.2 and 3.8 ms computational time based on the number of users from 2 to 10, respectively. The proposed method attains 96% accuracy and 95.4% F‐score results than other previous methods.