According to an embodiment, the present invention provides a system for optimizing data communication of Internet of Things (IoT) devices over a network. The system for optimizing data communication of Internet of Things (IoT) devices over a network comprises an Internet of things (IoT) device, an Internet of things (IoT) server, a management console, and a user device. The IoT device comprises a memory and a first processor to execute the instructions stored in the memory. The IoT device may connect to at least one of a sensor and an actuator. The IoT device may identify attributes of at least one of the sensor and the actuator. The IoT device may receive raw data generated by at least one of the sensor and the actuator. It should be noted that the raw data of the sensor comprises environmental data, positional data, automation data, computed data, contextual data, situational data, and actionable data. The raw data received from the actuator comprises control data to change operating states of the actuator. Further, the IoT device may define data types of the raw data based on the attributes. Furthermore, the IoT device may define compact storage for each of the data types based on the attributes. That is, the compact storage is defined in bit stream concepts to optimize the data types. Subsequently, the IoT device may further optimize data transmission size of the data types and compact storage in bit stream concepts (i.e. data definitions) for the raw data using a communication protocol. The IoT device may communicate optimized raw data to the IoT server in the network. It should be noted that the IoT server is connected to the IoT device. The IoT server comprises a second processor, and a memory storing machine-readable instructions. The IoT server may receive the optimized raw data from the IoT device. Further, the IoT server may transcode the optimized raw data into a desired format at the IoT server and relay a transcoded data to at least one of a management console and a third party IoT gateway.