With the advancements in the new technologies like IoT, the healthcare sector is also growing rapidly. The core concept of introducing IoT in the healthcare centers is to make it remotely accessible, so that communication between doctor and patient can be easy, and diagnosis of any disease can be remotely done through the Internet in case of emergency. The major objective of this study is to develop a security framework for the healthcare industry that can encrypt secret data on cloud servers using block-based data encoding. Since any information that is available on the Internet is vulnerable to various attacks, and the medical records of the patients carry sensitive information that must not be accessible to any unauthorized or unauthentic person, in this context, the concept of Blockchain (BC) technology was introduced in the healthcare systems. In the past few years, a number of BC based healthcare models were proposed in the system; however, these systems are decentralized in nature, which is a feature of Blockchain technology, but in certain applications, especially in healthcare, this feature gave rise to a problem termed as disease overlapping when the count of chains gets increased. To solve this issue, a BC based framework is used in this work that has a feature of creating a separate block in the chain every time whenever any alteration in information about patient’s health, any allergies, new symptoms, medications, etc. is updated. In addition to this, securing the sensitive information of patients is taken into consideration by developing an improved and enhanced multilayer Blockchain based IoT data security approach that not only protects the data, but also builds the trust between patients/user and healthcare service providers. The main focused area of this research article is to propose a security framework for healthcare domain that can encrypt the confidential data over cloud server under block-based data encoding. In the proposed approach, 128-bit AES key is generated in order to support the SHA-256 hashing algorithm. Individual user’s data is subdivided to blocks and encrypted to secure it from unauthorized access. An interface-based system is designed to present the real-world usage of the proposed model in healthcare application. Finally, the effectiveness of the proposed approach is validated in the MATLAB software in terms of MAE, RMSE, MSE, encryption time, and decryption time. The RSA and DSA are the most trending encryption algorithms. These algorithms are crucial components of Blockchain technology, implemented in the proposed work, and later on, their performances are also compared with each other to check their effectiveness. The simulation results demonstrated that the proposed encrypting algorithm surpasses the other encryption approaches such as RSA and DSA in all factors to prove its supremacy. The experimental results show that the encryption and decryption time are lowest in the proposed framework; therefore, its performance is more effective and robust. It is also more effective and resilient.