Hepatocellular carcinoma (HCC) is the most common type of primary liver cancer, and patients with HCC have a poor prognosis and low survival rates. Establishing a prognostic nomogram is important for predicting the survival of patients with HCC, as it helps to improve the patient’s prognosis. This study aimed to develop and evaluate nomograms and risk stratification to predict overall survival (OS) and cancer-specific survival (CSS) in HCC patients. Data from 10,302 patients with initially diagnosed HCC were extracted from the Surveillance, Epidemiology, and End Results (SEER) database between 2010 and 2017. Patients were randomly divided into the training and validation set. Kaplan–Meier survival, LASSO regression, and Cox regression analysis were conducted to select the predictors of OS. Competing risk analysis, LASSO regression, and Cox regression analysis were conducted to select the predictors of CSS. The validation of the nomograms was performed using the concordance index (C-index), the Akaike information criterion (AIC), the Bayesian information criterion (BIC), Net Reclassification Index (NRI), Discrimination Improvement (IDI), the receiver operating characteristic (ROC) curve, calibration curves, and decision curve analyses (DCAs). The results indicated that factors including age, grade, T stage, N stage, M stage, surgery, surgery to lymph node (LN), Alpha-Fetal Protein (AFP), and tumor size were independent predictors of OS, whereas grade, T stage, surgery, AFP, tumor size, and distant lymph node metastasis were independent predictors of CSS. Based on these factors, predictive models were built and virtualized by nomograms. The C-index for predicting 1-, 3-, and 5-year OS were 0.788, 0.792, and 0.790. The C-index for predicting 1-, 3-, and 5-year CSS were 0.803, 0.808, and 0.806. AIC, BIC, NRI, and IDI suggested that nomograms had an excellent predictive performance with no significant overfitting. The calibration curves showed good consistency of OS and CSS between the actual observation and nomograms prediction, and the DCA showed great clinical usefulness of the nomograms. The risk stratification of OS and CSS was built that could perfectly classify HCC patients into three risk groups. Our study developed nomograms and a corresponding risk stratification system predicting the OS and CSS of HCC patients. These tools can assist in patient counseling and guiding treatment decision making.