Sepsis is defined as dysregulated host response to infection that leads to life-threatening organ dysfunction. Biomarkers characterising the dysregulated host response in sepsis are lacking. We aimed to develop host gene expression signatures to predict organ dysfunction in children with bacterial or viral infection. This cohort study was done in emergency departments and intensive care units of four hospitals in Queensland, Australia, and recruited children aged 1 month to 17 years who, upon admission, underwent a diagnostic test, including blood cultures, for suspected sepsis. Whole-blood RNA sequencing of blood was performed with Illumina NovaSeq (San Diego, CA, USA). Samples with completed phenotyping, monitoring, and RNA extraction by March 31, 2020, were included in the discovery cohort; samples collected or completed thereafter and by Oct 27, 2021, constituted the Rapid Paediatric Infection Diagnosis in Sepsis (RAPIDS) internal validation cohort. An external validation cohort was assembled from RNA sequencing gene expression count data from the observational European Childhood Life-threatening Infectious Disease Study (EUCLIDS), which recruited children with severe infection in nine European countries between 2012 and 2016. Feature selection approaches were applied to derive novel gene signatures for disease class (bacterial vs viral infection) and disease severity (presence vs absence of organ dysfunction 24 h post-sampling). The primary endpoint was the presence of organ dysfunction 24 h after blood sampling in the presence of confirmed bacterial versus viral infection. Gene signature performance is reported as area under the receiver operating characteristic curves (AUCs) and 95% CI. Between Sept 25, 2017, and Oct 27, 2021, 907 patients were enrolled. Blood samples from 595 patients were included in the discovery cohort, and samples from 312 children were included in the RAPIDS validation cohort. We derived a ten-gene disease class signature that achieved an AUC of 94·1% (95% CI 90·6-97·7) in distinguishing bacterial from viral infections in the RAPIDS validation cohort. A ten-gene disease severity signature achieved an AUC of 82·2% (95% CI 76·3-88·1) in predicting organ dysfunction within 24 h of sampling in the RAPIDS validation cohort. Used in tandem, the disease class and disease severity signatures predicted organ dysfunction within 24 h of sampling with an AUC of 90·5% (95% CI 83·3-97·6) for patients with predicted bacterial infection and 94·7% (87·8-100·0) for patients with predicted viral infection. In the external EUCLIDS validation dataset (n=362), the disease class and disease severity predicted organ dysfunction at time of sampling with an AUC of 70·1% (95% CI 44·1-96·2) for patients with predicted bacterial infection and 69·6% (53·1-86·0) for patients with predicted viral infection. In children evaluated for sepsis, novel host transcriptomic signatures specific for bacterial and viral infection can identify dysregulated host response leading to organ dysfunction. Australian Government Medical Research Future Fund Genomic Health Futures Mission, Children's Hospital Foundation Queensland, Brisbane Diamantina Health Partners, Emergency Medicine Foundation, Gold Coast Hospital Foundation, Far North Queensland Foundation, Townsville Hospital and Health Services SERTA Grant, and Australian Infectious Diseases Research Centre.