<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestitures" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestitures" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresKravePureFoodsAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresKravePureFoodsAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresKravePureFoodsNarrativeDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresKravePureFoodsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresMaunaLoaNarrativeDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresMaunaLoaNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcNarrativeDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresShanghaiGoldenMonkeyNarrativeDetails" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresShanghaiGoldenMonkeyNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresTables" xlink:href="hsy-20171231.xsd#BusinessAcquisitionsAndDivestituresTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivities" xlink:href="hsy-20171231.xsd#BusinessRealignmentActivities" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesBusinessRealignmentActivitiesNarrativeDetails" xlink:href="hsy-20171231.xsd#BusinessRealignmentActivitiesBusinessRealignmentActivitiesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfBusinessRealignmentActivityDetails" xlink:href="hsy-20171231.xsd#BusinessRealignmentActivitiesScheduleOfBusinessRealignmentActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfLiabilityActivityForCostsQualifyingAsExitAndDisposalCostsDetails" xlink:href="hsy-20171231.xsd#BusinessRealignmentActivitiesScheduleOfLiabilityActivityForCostsQualifyingAsExitAndDisposalCostsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesTables" xlink:href="hsy-20171231.xsd#BusinessRealignmentActivitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/CommitmentsAndContingencies" xlink:href="hsy-20171231.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/CommitmentsAndContingenciesCommitmentsAndContingenciesNarrativeDetails" xlink:href="hsy-20171231.xsd#CommitmentsAndContingenciesCommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/CommitmentsAndContingenciesScheduleOfOperatingAndCapitalLeaseObligationsDetails" xlink:href="hsy-20171231.xsd#CommitmentsAndContingenciesScheduleOfOperatingAndCapitalLeaseObligationsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/CommitmentsAndContingenciesScheduleOfPurchaseObligationsCoveredByPutchaseAgreementsWithVariousSuppliersFutureMaturtyScheduleDetails" xlink:href="hsy-20171231.xsd#CommitmentsAndContingenciesScheduleOfPurchaseObligationsCoveredByPutchaseAgreementsWithVariousSuppliersFutureMaturtyScheduleDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/CommitmentsAndContingenciesTables" xlink:href="hsy-20171231.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedBalanceSheets" xlink:href="hsy-20171231.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="hsy-20171231.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="hsy-20171231.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:href="hsy-20171231.xsd#ConsolidatedStatementsOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfIncome" xlink:href="hsy-20171231.xsd#ConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquity" xlink:href="hsy-20171231.xsd#ConsolidatedStatementsOfStockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquityParenthetical" xlink:href="hsy-20171231.xsd#ConsolidatedStatementsOfStockholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstruments" xlink:href="hsy-20171231.xsd#DerivativeInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsDerivativeInstrumentsNarrativeDetails" xlink:href="hsy-20171231.xsd#DerivativeInstrumentsDerivativeInstrumentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfClassificationOfDerivativeAssetsAndLiabilitiesWithinConsolidatedBalanceSheetsDetails" xlink:href="hsy-20171231.xsd#DerivativeInstrumentsScheduleOfClassificationOfDerivativeAssetsAndLiabilitiesWithinConsolidatedBalanceSheetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfEffectOfDerivativeInstrumentsOnConsolidatedStatementsOfIncomeDetails" xlink:href="hsy-20171231.xsd#DerivativeInstrumentsScheduleOfEffectOfDerivativeInstrumentsOnConsolidatedStatementsOfIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsTables" xlink:href="hsy-20171231.xsd#DerivativeInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DocumentAndEntityInformation" xlink:href="hsy-20171231.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShare" xlink:href="hsy-20171231.xsd#EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShareEarningsPerShareNarrativeDetails" xlink:href="hsy-20171231.xsd#EarningsPerShareEarningsPerShareNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShareTables" xlink:href="hsy-20171231.xsd#EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EquityAndNoncontrollingInterest" xlink:href="hsy-20171231.xsd#EquityAndNoncontrollingInterest" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EquityAndNoncontrollingInterestEquityAndNoncontrollingInterestNarrativeDetails" xlink:href="hsy-20171231.xsd#EquityAndNoncontrollingInterestEquityAndNoncontrollingInterestNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EquityAndNoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" xlink:href="hsy-20171231.xsd#EquityAndNoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EquityAndNoncontrollingInterestScheduleOfChangesInOutstandingSharesOfCommmonStockDetails" xlink:href="hsy-20171231.xsd#EquityAndNoncontrollingInterestScheduleOfChangesInOutstandingSharesOfCommmonStockDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EquityAndNoncontrollingInterestTables" xlink:href="hsy-20171231.xsd#EquityAndNoncontrollingInterestTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurements" xlink:href="hsy-20171231.xsd#FairValueMeasurementsFairValueMeasurements" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsNarrativeDetails" xlink:href="hsy-20171231.xsd#FairValueMeasurementsFairValueMeasurementsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsTables" xlink:href="hsy-20171231.xsd#FairValueMeasurementsFairValueMeasurementsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueDetails" xlink:href="hsy-20171231.xsd#FairValueMeasurementsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfFairValuesAndCarryingValuesOfLongTermDebtDetails" xlink:href="hsy-20171231.xsd#FairValueMeasurementsScheduleOfFairValuesAndCarryingValuesOfLongTermDebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssets" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsGoodwillAndIntangibleAssetsNarrativeDetails" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssetsGoodwillAndIntangibleAssetsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfAmortizationExpenseForNextFiveYearsDetails" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssetsScheduleOfAmortizationExpenseForNextFiveYearsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfChangesInCarryingValueOfGoodwillByReportableSegmentDetails" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssetsScheduleOfChangesInCarryingValueOfGoodwillByReportableSegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfGrossCarryingAmountAndAccumulatedAmortizationForEachMajorClassOfIntangibleAssetDetails" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssetsScheduleOfGrossCarryingAmountAndAccumulatedAmortizationForEachMajorClassOfIntangibleAssetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsTables" xlink:href="hsy-20171231.xsd#GoodwillAndIntangibleAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxes" xlink:href="hsy-20171231.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesIncomeTaxesNarrativeDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesIncomeTaxesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesScheduleOfComponentsOfIncomeTaxExpenseBenefitDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesScheduleOfComponentsOfIncomeTaxExpenseBenefitDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesScheduleOfDeferredTaxAssetAndLiabilitiesDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesScheduleOfDeferredTaxAssetAndLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesScheduleOfEffectiveIncomeTaxRateReconciliationDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesScheduleOfEffectiveIncomeTaxRateReconciliationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesScheduleOfIncomeLossBeforeTaxesDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesScheduleOfIncomeLossBeforeTaxesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesScheduleOfUnrecognizedTaxBenefitsRollForwardDetails" xlink:href="hsy-20171231.xsd#IncomeTaxesScheduleOfUnrecognizedTaxBenefitsRollForwardDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesTables" xlink:href="hsy-20171231.xsd#IncomeTaxesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNet" xlink:href="hsy-20171231.xsd#OtherIncomeExpenseNetOtherIncomeExpenseNet" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNetTables" xlink:href="hsy-20171231.xsd#OtherIncomeExpenseNetOtherIncomeExpenseNetTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetScheduleOfOtherIncomeAndExpenseNetDetails" xlink:href="hsy-20171231.xsd#OtherIncomeExpenseNetScheduleOfOtherIncomeAndExpenseNetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlans" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansPensionAndOtherPostRetirementBenefitPlansNarrativeDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansPensionAndOtherPostRetirementBenefitPlansNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfAccumulatedBenefitObligationsInExcessOfPlanAssetsDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfAccumulatedBenefitObligationsInExcessOfPlanAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfAmountsExpectedToBeAmortizedFromAociIntoNetPeriodicBenefitDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfAmountsExpectedToBeAmortizedFromAociIntoNetPeriodicBenefitDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfComponentsOfNetPeriodicBenefitCostDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfComponentsOfNetPeriodicBenefitCostDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfDefinedBenefitObligationsPlanAssetsAndFundedStatusDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfDefinedBenefitObligationsPlanAssetsAndFundedStatusDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfEffectOfOnePercentChangeInAssumedHealthCareTrendRatesDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfEffectOfOnePercentChangeInAssumedHealthCareTrendRatesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfExpectedBenefitPaymentsToBePaidDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfExpectedBenefitPaymentsToBePaidDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfPensionPlanAssetsWithinFairValueHierarchyDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfPensionPlanAssetsWithinFairValueHierarchyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfPlanAssetsAcrossAssetClassesDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfPlanAssetsAcrossAssetClassesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingBenefitObligationsDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingBenefitObligationsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingNetPeriodicBenefitCostDetails" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingNetPeriodicBenefitCostDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansTables" xlink:href="hsy-20171231.xsd#PensionAndOtherPostRetirementBenefitPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/QuarterlyDataTables" xlink:href="hsy-20171231.xsd#QuarterlyDataTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/QuarterlyDataUnaudited" xlink:href="hsy-20171231.xsd#QuarterlyDataUnaudited" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleIiValuationAndQualifyingAccounts" xlink:href="hsy-20171231.xsd#ScheduleIiValuationAndQualifyingAccounts" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleIiValuationAndQualifyingAccountsDetails" xlink:href="hsy-20171231.xsd#ScheduleIiValuationAndQualifyingAccountsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfBasicAndDilutedEarningsPerShareDetails" xlink:href="hsy-20171231.xsd#ScheduleOfBasicAndDilutedEarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfDepreciationAndAmortizationExpenseIncludedWithinSegmentIncomeDetails" xlink:href="hsy-20171231.xsd#ScheduleOfDepreciationAndAmortizationExpenseIncludedWithinSegmentIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfNetSalesAndEarningsBySegmentDetails" xlink:href="hsy-20171231.xsd#ScheduleOfNetSalesAndEarningsBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfQuarterlyFinancialInformationDetails" xlink:href="hsy-20171231.xsd#ScheduleOfQuarterlyFinancialInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfSegmentInformationByGeographyDetails" xlink:href="hsy-20171231.xsd#ScheduleOfSegmentInformationByGeographyDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfSupplementalBalanceSheetInformationDetails" xlink:href="hsy-20171231.xsd#ScheduleOfSupplementalBalanceSheetInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformation" xlink:href="hsy-20171231.xsd#SegmentInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationNarrativeDetails" xlink:href="hsy-20171231.xsd#SegmentInformationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationScheduleOfUnallocatedMarkToMarketGainsLossesOnCommodityDerivativesDetails" xlink:href="hsy-20171231.xsd#SegmentInformationScheduleOfUnallocatedMarkToMarketGainsLossesOnCommodityDerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationTables" xlink:href="hsy-20171231.xsd#SegmentInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebt" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtInterestRatesDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtLongTermDebtInterestRatesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtNarrativeDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtLongTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfLongTermDebtInstrumentsDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtScheduleOfLongTermDebtInstrumentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfMaturitiesOfLongTermDebtDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtScheduleOfMaturitiesOfLongTermDebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfNetInterestExpenseDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtScheduleOfNetInterestExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtShortTermDebtNarrativeDetails" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtShortTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtTables" xlink:href="hsy-20171231.xsd#ShortAndLongTermDebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlans" xlink:href="hsy-20171231.xsd#StockCompensationPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfCompensationExpenseAndIncomeTaxBenefitsForStockBasedCompensationProgramsDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfCompensationExpenseAndIncomeTaxBenefitsForStockBasedCompensationProgramsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfFairValueWeightedAverageAssumptionsDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfFairValueWeightedAverageAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusActivityDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfPsusAndRsusActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusFairValueWeightedAverageAssumptionsDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfPsusAndRsusFairValueWeightedAverageAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfStockOptionActivityDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfStockOptionActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfStockOptionInformationByExercisePriceRangeDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansScheduleOfStockOptionInformationByExercisePriceRangeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansStockCompensationPlansNarrativeDetails" xlink:href="hsy-20171231.xsd#StockCompensationPlansStockCompensationPlansNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansTables" xlink:href="hsy-20171231.xsd#StockCompensationPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SubsequentEventsSubsequentEvents" xlink:href="hsy-20171231.xsd#SubsequentEventsSubsequentEvents" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SubsequentEventsSubsequentEventsDetails" xlink:href="hsy-20171231.xsd#SubsequentEventsSubsequentEventsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SubsequentEventsSubsequentEventsTables" xlink:href="hsy-20171231.xsd#SubsequentEventsSubsequentEventsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPolicies" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesAccountsReceivableTradeDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesAccountsReceivableTradeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesComputerSoftwareDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesComputerSoftwareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesDescriptionOfBusinessAndBasisOfPresentationDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesDescriptionOfBusinessAndBasisOfPresentationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesGoodwillAndOtherIntangibleAssetsDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesGoodwillAndOtherIntangibleAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesInventoriesDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesInventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesPropertyPlantAndEquipmentDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesPropertyPlantAndEquipmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesRecentAccountingPronouncementsDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesRecentAccountingPronouncementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesSellingMarketingAndAdministrativeExpenseDetails" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesSellingMarketingAndAdministrativeExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesTables" xlink:href="hsy-20171231.xsd#SummaryOfSignificantAccountingPoliciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SupplementalBalanceSheetInformation" xlink:href="hsy-20171231.xsd#SupplementalBalanceSheetInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SupplementalBalanceSheetInformationTables" xlink:href="hsy-20171231.xsd#SupplementalBalanceSheetInformationTables" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestitures" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresKravePureFoodsAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_E3EA453B1404F14567ABCBA8DC4B4EF7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_E3EA453B1404F14567ABCBA8DC4B4EF7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_D1DD08A58FDDA69C67BDCBA8DC4BF6ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_E3EA453B1404F14567ABCBA8DC4B4EF7" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_D1DD08A58FDDA69C67BDCBA8DC4BF6ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2944F51241A7C4BBE793CBA8DC4B614E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D1DD08A58FDDA69C67BDCBA8DC4BF6ED" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2944F51241A7C4BBE793CBA8DC4B614E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2944F51241A7C4BBE793CBA8DC4B614E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_D1DD08A58FDDA69C67BDCBA8DC4BF6ED" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2944F51241A7C4BBE793CBA8DC4B614E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_KRAVEPureFoodsInc.Member" xlink:label="loc_hsy_KRAVEPureFoodsInc.Member_DC6F5DD465DA90C70138CBA8DC4BFB7B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_2944F51241A7C4BBE793CBA8DC4B614E" xlink:to="loc_hsy_KRAVEPureFoodsInc.Member_DC6F5DD465DA90C70138CBA8DC4BFB7B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_8142E4201AB8D67D676CCBA8DC4B5F0A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_E3EA453B1404F14567ABCBA8DC4B4EF7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_8142E4201AB8D67D676CCBA8DC4B5F0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_8142E4201AB8D67D676CCBA8DC4B5F0A" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_8142E4201AB8D67D676CCBA8DC4B5F0A" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_1D6E9C6916B98578945BCBA8DC4BCF06" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2" xlink:to="loc_us-gaap_TrademarksMember_1D6E9C6916B98578945BCBA8DC4BCF06" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherIntangibleAssetsMember" xlink:label="loc_us-gaap_OtherIntangibleAssetsMember_D931379EE5057D7C9E32CBA8DC4BB467" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_92F379577174A744F218CBA8DC4B8EE2" xlink:to="loc_us-gaap_OtherIntangibleAssetsMember_D931379EE5057D7C9E32CBA8DC4BB467" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_2BB4AC9E90F40F9DBD22CBA8DC4B13B7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_Goodwill_2BB4AC9E90F40F9DBD22CBA8DC4B13B7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_C1BA8134A69CFC2E9291CBA8DC4B8A9B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_C1BA8134A69CFC2E9291CBA8DC4B8A9B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_E06BA87EB911E1791131CBA8DC4B24E7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_E06BA87EB911E1791131CBA8DC4B24E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_880AA483B82F89C3F307CBC7F6780E0F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_880AA483B82F89C3F307CBC7F6780E0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_DA7409AA2966FF397201CBA8DC4BA2D0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_DA7409AA2966FF397201CBA8DC4BA2D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_C84BF8EFDD66D87407D5CBA8DC4B9F19" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_C84BF8EFDD66D87407D5CBA8DC4B9F19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_3D4968058BA7B493C960CBA8DC4C632F" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_C0FE0190792293248532CBA8DC4BE3AA" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_3D4968058BA7B493C960CBA8DC4C632F" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresKravePureFoodsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A3554A601333CFE2AA4C2EED891031E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A3554A601333CFE2AA4C2EED891031E2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_785BF823DAC3C48C1E952EED89106A9B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A3554A601333CFE2AA4C2EED891031E2" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_785BF823DAC3C48C1E952EED89106A9B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_116C2332B5B246140E7F2EED8910AD00_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_785BF823DAC3C48C1E952EED89106A9B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_116C2332B5B246140E7F2EED8910AD00_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_116C2332B5B246140E7F2EED8910AD00" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_785BF823DAC3C48C1E952EED89106A9B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_116C2332B5B246140E7F2EED8910AD00" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_KRAVEPureFoodsInc.Member" xlink:label="loc_hsy_KRAVEPureFoodsInc.Member_0642C786A0A762C8F2832EED89119FF5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_116C2332B5B246140E7F2EED8910AD00" xlink:to="loc_hsy_KRAVEPureFoodsInc.Member_0642C786A0A762C8F2832EED89119FF5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2154E74721586624728E2EED89118F48" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_A3554A601333CFE2AA4C2EED891031E2" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2154E74721586624728E2EED89118F48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2154E74721586624728E2EED89118F48" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2154E74721586624728E2EED89118F48" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_558F64FB7EC55F58D2252EED89119E08" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8" xlink:to="loc_us-gaap_TrademarksMember_558F64FB7EC55F58D2252EED89119E08" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherIntangibleAssetsMember" xlink:label="loc_us-gaap_OtherIntangibleAssetsMember_88D142CF125DF4E94C882EED89118C4E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_5A791F2B6C2C9D66E1642EED8911AED8" xlink:to="loc_us-gaap_OtherIntangibleAssetsMember_88D142CF125DF4E94C882EED89118C4E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesGross" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesGross_03885FA483419E1145E32EED891139A9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_03885FA483419E1145E32EED891139A9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_564F219E75F71CB247BA2EED89110CCE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh_564F219E75F71CB247BA2EED89110CCE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_FC38CA679AF1E26616232EED89111427" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_FC38CA679AF1E26616232EED89111427" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsForPreviousAcquisition" xlink:label="loc_us-gaap_PaymentsForPreviousAcquisition_DDFD9B51E469FA7EEFE42EED8911B140" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_429B2D6D0EDF2AF822992EED89112BC5" xlink:to="loc_us-gaap_PaymentsForPreviousAcquisition_DDFD9B51E469FA7EEFE42EED8911B140" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresMaunaLoaNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_7F494D1C0402329D558C2E2EFA801970" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_111660A99F6A069CFBC82E2EFA8038B9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_7F494D1C0402329D558C2E2EFA801970" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_111660A99F6A069CFBC82E2EFA8038B9" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationAxis" xlink:label="loc_us-gaap_DisposalGroupClassificationAxis_227AF4CDABEC123E78072E2EFA80D791" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_111660A99F6A069CFBC82E2EFA8038B9" xlink:to="loc_us-gaap_DisposalGroupClassificationAxis_227AF4CDABEC123E78072E2EFA80D791" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationDomain" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_1EE7E38A02E4992F01B52E2EFA809C5B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_227AF4CDABEC123E78072E2EFA80D791" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_1EE7E38A02E4992F01B52E2EFA809C5B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationDomain" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_1EE7E38A02E4992F01B52E2EFA809C5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_227AF4CDABEC123E78072E2EFA80D791" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_1EE7E38A02E4992F01B52E2EFA809C5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupHeldForSaleOrDisposedOfBySaleNotDiscontinuedOperationsMember" xlink:label="loc_us-gaap_DisposalGroupHeldForSaleOrDisposedOfBySaleNotDiscontinuedOperationsMember_1B718E75A2FA053706242E2EFA804FCC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupClassificationDomain_1EE7E38A02E4992F01B52E2EFA809C5B" xlink:to="loc_us-gaap_DisposalGroupHeldForSaleOrDisposedOfBySaleNotDiscontinuedOperationsMember_1B718E75A2FA053706242E2EFA804FCC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_774C1D42C9E0315630BA2E2EFA804E74" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_111660A99F6A069CFBC82E2EFA8038B9" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_774C1D42C9E0315630BA2E2EFA804E74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_AE49D49F7B9E451AEE782E2EFA800E5B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_774C1D42C9E0315630BA2E2EFA804E74" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_AE49D49F7B9E451AEE782E2EFA800E5B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_AE49D49F7B9E451AEE782E2EFA800E5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_774C1D42C9E0315630BA2E2EFA804E74" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_AE49D49F7B9E451AEE782E2EFA800E5B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MaunaLoaMacadamiaNutCorporationMember" xlink:label="loc_hsy_MaunaLoaMacadamiaNutCorporationMember_6BB89044C308CCB1FF3C2E2EFA801276" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_AE49D49F7B9E451AEE782E2EFA800E5B" xlink:to="loc_hsy_MaunaLoaMacadamiaNutCorporationMember_6BB89044C308CCB1FF3C2E2EFA801276" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProceedsFromDivestitureOfBusinesses" xlink:label="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_7DA3A60446D42008A8E82E2EFA80B7C0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_7F494D1C0402329D558C2E2EFA801970" xlink:to="loc_us-gaap_ProceedsFromDivestitureOfBusinesses_7DA3A60446D42008A8E82E2EFA80B7C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupNotDiscontinuedOperationGainLossOnDisposal" xlink:label="loc_us-gaap_DisposalGroupNotDiscontinuedOperationGainLossOnDisposal_186B49C0A764FBBFECBB2E2EFA8037D6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_7F494D1C0402329D558C2E2EFA801970" xlink:to="loc_us-gaap_DisposalGroupNotDiscontinuedOperationGainLossOnDisposal_186B49C0A764FBBFECBB2E2EFA8037D6" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_7A84AF62D95091AA46602E2EFAFEBE92" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_7A84AF62D95091AA46602E2EFAFEBE92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_7A84AF62D95091AA46602E2EFAFEBE92" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_7A84AF62D95091AA46602E2EFAFEBE92" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_AD38581ADF8CBAFC01D22E2EFAFE02A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5" xlink:to="loc_us-gaap_TrademarksMember_AD38581ADF8CBAFC01D22E2EFAFE02A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherIntangibleAssetsMember" xlink:label="loc_us-gaap_OtherIntangibleAssetsMember_52C3448556DBE3B710292E2EFAFE1A18" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_3EF16E13D166A19BD3D12E2EFAFE6AE5" xlink:to="loc_us-gaap_OtherIntangibleAssetsMember_52C3448556DBE3B710292E2EFAFE1A18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_867BB0E02883AAAAF0D92E2EFAFE9A13" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:to="loc_us-gaap_RangeAxis_867BB0E02883AAAAF0D92E2EFAFE9A13" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_6320ABE86B6C74B588E22E2EFAFE86FB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_867BB0E02883AAAAF0D92E2EFAFE9A13" xlink:to="loc_us-gaap_RangeMember_6320ABE86B6C74B588E22E2EFAFE86FB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_6320ABE86B6C74B588E22E2EFAFE86FB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_867BB0E02883AAAAF0D92E2EFAFE9A13" xlink:to="loc_us-gaap_RangeMember_6320ABE86B6C74B588E22E2EFAFE86FB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_D170EC4DADD499D8E2BF2E2EFAFEB8E3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:to="loc_us-gaap_StatementScenarioAxis_D170EC4DADD499D8E2BF2E2EFAFEB8E3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_3362FFDC5E4DD901958B2E2EFAFEEEF7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_D170EC4DADD499D8E2BF2E2EFAFEB8E3" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_3362FFDC5E4DD901958B2E2EFAFEEEF7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_3362FFDC5E4DD901958B2E2EFAFEEEF7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_D170EC4DADD499D8E2BF2E2EFAFEB8E3" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_3362FFDC5E4DD901958B2E2EFAFEEEF7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_6FBD704BE4A495CF4C8B2E2EFAFE1C17" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_6FBD704BE4A495CF4C8B2E2EFAFE1C17" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4CD688422C0B7EAD6F732E2EFAFEEDAC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6FBD704BE4A495CF4C8B2E2EFAFE1C17" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4CD688422C0B7EAD6F732E2EFAFEEDAC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4CD688422C0B7EAD6F732E2EFAFEEDAC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6FBD704BE4A495CF4C8B2E2EFAFE1C17" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4CD688422C0B7EAD6F732E2EFAFEEDAC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RippleBrandCollectiveLLCMember" xlink:label="loc_hsy_RippleBrandCollectiveLLCMember_B0F947CB11D76593F9B82E2EFAFE7687" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4CD688422C0B7EAD6F732E2EFAFEEDAC" xlink:to="loc_hsy_RippleBrandCollectiveLLCMember_B0F947CB11D76593F9B82E2EFAFE7687" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_2C70A0F00B2580B74FBC2E2EFAFEB242" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_1066B85781591BCB01D82E2EFAFECF6B" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_2C70A0F00B2580B74FBC2E2EFAFEB242" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_5A2501584BD577082EB72E2EFAFE01A5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_2C70A0F00B2580B74FBC2E2EFAFEB242" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_5A2501584BD577082EB72E2EFAFE01A5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_5A2501584BD577082EB72E2EFAFE01A5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_2C70A0F00B2580B74FBC2E2EFAFEB242" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_5A2501584BD577082EB72E2EFAFE01A5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_A532EF6565773B96C4CE2E2EFAFE570C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_Goodwill_A532EF6565773B96C4CE2E2EFAFE570C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_4C57715A93B4699B00332E2EFAFED983" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_4C57715A93B4699B00332E2EFAFED983" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_309C94ACE9F61C6A967A2E2EFAFE69CD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_309C94ACE9F61C6A967A2E2EFAFE69CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_4625833B6B7867104D3F2E2EFAFE528F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_4625833B6B7867104D3F2E2EFAFE528F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_2B87BC688BCF3A6917672E2EFAFED6BD" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_2B87BC688BCF3A6917672E2EFAFED6BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_A589B9AF2B028DFDF2F12E2EFAFE85DC" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_41E826B9EB227D58991F2E2EFAFE5A26" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_A589B9AF2B028DFDF2F12E2EFAFE85DC" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresRippleBrandCollectiveLlcNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_D9DB47E35E43C70641122E2EFB12E69D" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_EA0E5230E29A4FE5F0342E2EFB08CB8C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_D9DB47E35E43C70641122E2EFB12E69D" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_EA0E5230E29A4FE5F0342E2EFB08CB8C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_FF4ED5B97A2E39353FCF2E2EFB087514" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_EA0E5230E29A4FE5F0342E2EFB08CB8C" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_FF4ED5B97A2E39353FCF2E2EFB087514" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0D856AA1E6B06E29E1812E2EFB088699_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FF4ED5B97A2E39353FCF2E2EFB087514" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0D856AA1E6B06E29E1812E2EFB088699_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0D856AA1E6B06E29E1812E2EFB088699" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_FF4ED5B97A2E39353FCF2E2EFB087514" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0D856AA1E6B06E29E1812E2EFB088699" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RippleBrandCollectiveLLCMember" xlink:label="loc_hsy_RippleBrandCollectiveLLCMember_F90536F64557DB2E31912E2EFB081270" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0D856AA1E6B06E29E1812E2EFB088699" xlink:to="loc_hsy_RippleBrandCollectiveLLCMember_F90536F64557DB2E31912E2EFB081270" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_94CEAF0E0AF2D9E1A3442E2EFB0821C3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_EA0E5230E29A4FE5F0342E2EFB08CB8C" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_94CEAF0E0AF2D9E1A3442E2EFB0821C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_94CEAF0E0AF2D9E1A3442E2EFB0821C3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_94CEAF0E0AF2D9E1A3442E2EFB0821C3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_D640AC9BBDF6075415C62E2EFB1260FB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98" xlink:to="loc_us-gaap_TrademarksMember_D640AC9BBDF6075415C62E2EFB1260FB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherIntangibleAssetsMember" xlink:label="loc_us-gaap_OtherIntangibleAssetsMember_865EA9FE36902EA0DF612E2EFB12434B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_6D2ABBF25DF4CB395D2F2E2EFB08DF98" xlink:to="loc_us-gaap_OtherIntangibleAssetsMember_865EA9FE36902EA0DF612E2EFB12434B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_E317BC302E3E25DDB7452E2EFB1202A6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_EA0E5230E29A4FE5F0342E2EFB08CB8C" xlink:to="loc_us-gaap_RangeAxis_E317BC302E3E25DDB7452E2EFB1202A6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_E317BC302E3E25DDB7452E2EFB1202A6" xlink:to="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_E317BC302E3E25DDB7452E2EFB1202A6" xlink:to="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_F0DB906899CA2882FFD62E2EFB122B71" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28" xlink:to="loc_us-gaap_MinimumMember_F0DB906899CA2882FFD62E2EFB122B71" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_2F5DACBE50612DD04BA62E2EFB12DD9D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5D92DB1E0A3D341143C72E2EFB124B28" xlink:to="loc_us-gaap_MaximumMember_2F5DACBE50612DD04BA62E2EFB12DD9D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_B73CEB063EA32DBA293D2E2EFB122E40" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_D9DB47E35E43C70641122E2EFB12E69D" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_B73CEB063EA32DBA293D2E2EFB122E40" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresShanghaiGoldenMonkeyNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_CE66571A25D548149E9B758D96E96A4B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CE66571A25D548149E9B758D96E96A4B" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_E164D25CA69F53A1D18B758D96E971AA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_E164D25CA69F53A1D18B758D96E971AA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3144EA538226DEFF78B4758D96E97436_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_E164D25CA69F53A1D18B758D96E971AA" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3144EA538226DEFF78B4758D96E97436_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3144EA538226DEFF78B4758D96E97436" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_E164D25CA69F53A1D18B758D96E971AA" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3144EA538226DEFF78B4758D96E97436" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member" xlink:label="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_4A3D7A4E63C564D13C54758D96E9EAD5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_3144EA538226DEFF78B4758D96E97436" xlink:to="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_4A3D7A4E63C564D13C54758D96E9EAD5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_88D18E5FC3CA7AB00BB9758D96E99AE4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_88D18E5FC3CA7AB00BB9758D96E99AE4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_78E7755B6EA13FA98629758D96E93CFD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_88D18E5FC3CA7AB00BB9758D96E99AE4" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_78E7755B6EA13FA98629758D96E93CFD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_78E7755B6EA13FA98629758D96E93CFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_88D18E5FC3CA7AB00BB9758D96E99AE4" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_78E7755B6EA13FA98629758D96E93CFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OwnershipAxis" xlink:label="loc_us-gaap_OwnershipAxis_41B0A18AF65FB31F2B25758D96E91A68" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:to="loc_us-gaap_OwnershipAxis_41B0A18AF65FB31F2B25758D96E91A68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OwnershipDomain" xlink:label="loc_us-gaap_OwnershipDomain_8B63F4022172081144CC758D96E9A16A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_OwnershipAxis_41B0A18AF65FB31F2B25758D96E91A68" xlink:to="loc_us-gaap_OwnershipDomain_8B63F4022172081144CC758D96E9A16A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OwnershipDomain" xlink:label="loc_us-gaap_OwnershipDomain_8B63F4022172081144CC758D96E9A16A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_OwnershipAxis_41B0A18AF65FB31F2B25758D96E91A68" xlink:to="loc_us-gaap_OwnershipDomain_8B63F4022172081144CC758D96E9A16A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_7E270DB0E61B01842191758D96E91F59" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_FED739CBC5CD956DAEC5758D96E9A642" xlink:to="loc_us-gaap_StatementClassOfStockAxis_7E270DB0E61B01842191758D96E91F59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_F0F061E8AE0F62D00153758D96E9C19F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_7E270DB0E61B01842191758D96E91F59" xlink:to="loc_us-gaap_ClassOfStockDomain_F0F061E8AE0F62D00153758D96E9C19F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_F0F061E8AE0F62D00153758D96E9C19F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_7E270DB0E61B01842191758D96E91F59" xlink:to="loc_us-gaap_ClassOfStockDomain_F0F061E8AE0F62D00153758D96E9C19F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired" xlink:label="loc_us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired_AA084D5CA9B424C787E9758D96E98122" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CE66571A25D548149E9B758D96E96A4B" xlink:to="loc_us-gaap_BusinessAcquisitionPercentageOfVotingInterestsAcquired_AA084D5CA9B424C787E9758D96E98122" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesGross" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesGross_5A944F4BE69583E67CD1758D96E91B0A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CE66571A25D548149E9B758D96E96A4B" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_5A944F4BE69583E67CD1758D96E91B0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount" xlink:label="loc_us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount_5AFB168E4C674F80EE22758D96E9E37A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_CE66571A25D548149E9B758D96E96A4B" xlink:to="loc_us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount_5AFB168E4C674F80EE22758D96E9E37A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionsAndDivestituresTables" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_0F17B7CE57B75D3B601032BF6491A28A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_12FC3D8F9E90127F135C32BF6491C9D1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_0F17B7CE57B75D3B601032BF6491A28A" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_12FC3D8F9E90127F135C32BF6491C9D1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_88FE878A13109E31B51032BF6491CF10" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_12FC3D8F9E90127F135C32BF6491C9D1" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_88FE878A13109E31B51032BF6491CF10" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_88FE878A13109E31B51032BF6491CF10" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_88FE878A13109E31B51032BF6491CF10" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RippleBrandCollectiveLLCMember" xlink:label="loc_hsy_RippleBrandCollectiveLLCMember_0A88EA15D59E811CE77A32BF6491715A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6" xlink:to="loc_hsy_RippleBrandCollectiveLLCMember_0A88EA15D59E811CE77A32BF6491715A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member" xlink:label="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_58CFAE40CC4570856D3932BF6491F9E9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6" xlink:to="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_58CFAE40CC4570856D3932BF6491F9E9" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_KRAVEPureFoodsInc.Member" xlink:label="loc_hsy_KRAVEPureFoodsInc.Member_B2D455E5D6F0A282BB2F32BF64914740" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_E0A8E49E1825676A949E32BF6491A4A6" xlink:to="loc_hsy_KRAVEPureFoodsInc.Member_B2D455E5D6F0A282BB2F32BF64914740" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_29C2581D0ACC0586A2B932BF64911430" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_12FC3D8F9E90127F135C32BF6491C9D1" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_29C2581D0ACC0586A2B932BF64911430" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_EF972344F6EFF2455E0D32BF6491E27B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_29C2581D0ACC0586A2B932BF64911430" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_EF972344F6EFF2455E0D32BF6491E27B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_EF972344F6EFF2455E0D32BF6491E27B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_29C2581D0ACC0586A2B932BF64911430" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_EF972344F6EFF2455E0D32BF6491E27B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationAxis" xlink:label="loc_us-gaap_DisposalGroupClassificationAxis_BA206614DDFD56C0689332BF64918FB8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_12FC3D8F9E90127F135C32BF6491C9D1" xlink:to="loc_us-gaap_DisposalGroupClassificationAxis_BA206614DDFD56C0689332BF64918FB8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationDomain" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_5F51819A950794376CFB32BF6491B5E6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_BA206614DDFD56C0689332BF64918FB8" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_5F51819A950794376CFB32BF6491B5E6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupClassificationDomain" xlink:label="loc_us-gaap_DisposalGroupClassificationDomain_5F51819A950794376CFB32BF6491B5E6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DisposalGroupClassificationAxis_BA206614DDFD56C0689332BF64918FB8" xlink:to="loc_us-gaap_DisposalGroupClassificationDomain_5F51819A950794376CFB32BF6491B5E6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock" xlink:label="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_BB7BD2E1D468A52C785F32BF64915C47" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_0F17B7CE57B75D3B601032BF6491A28A" xlink:to="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_BB7BD2E1D468A52C785F32BF64915C47" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessRealignmentActivities" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessRealignmentActivitiesBusinessRealignmentActivitiesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_BB76AE007AD6279DA5CD57BFE7C578E3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_RangeAxis_BB76AE007AD6279DA5CD57BFE7C578E3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_BB76AE007AD6279DA5CD57BFE7C578E3" xlink:to="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_BB76AE007AD6279DA5CD57BFE7C578E3" xlink:to="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_EE811E3BFF7FA6CB982C57BFE7C52AFC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58" xlink:to="loc_us-gaap_MinimumMember_EE811E3BFF7FA6CB982C57BFE7C52AFC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_62229B39FAFDC1595E2E57BFE7C55D21" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_F40BE5313792EBFF1BD657BFE7C5BC58" xlink:to="loc_us-gaap_MaximumMember_62229B39FAFDC1595E2E57BFE7C55D21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_DDA23FED02432166B3F557BFE7C5C9F7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_DDA23FED02432166B3F557BFE7C5C9F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_00E679AE13671CCB428F57BFE7C5FCF7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_DDA23FED02432166B3F557BFE7C5C9F7" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_00E679AE13671CCB428F57BFE7C5FCF7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_00E679AE13671CCB428F57BFE7C5FCF7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_DDA23FED02432166B3F557BFE7C5C9F7" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_00E679AE13671CCB428F57BFE7C5FCF7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringChargesMember" xlink:label="loc_us-gaap_RestructuringChargesMember_0A3EC931C15E2C84301A57BFE7C5F4FD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_00E679AE13671CCB428F57BFE7C5FCF7" xlink:to="loc_us-gaap_RestructuringChargesMember_0A3EC931C15E2C84301A57BFE7C5F4FD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_613631272ECFA1E8B54857BFE7C5EE5F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_613631272ECFA1E8B54857BFE7C5EE5F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_65C062FA243B871BBAD857BFE7C5D632_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_613631272ECFA1E8B54857BFE7C5EE5F" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_65C062FA243B871BBAD857BFE7C5D632_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_65C062FA243B871BBAD857BFE7C5D632" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_613631272ECFA1E8B54857BFE7C5EE5F" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_65C062FA243B871BBAD857BFE7C5D632" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GeographicConcentrationRiskMember" xlink:label="loc_us-gaap_GeographicConcentrationRiskMember_412CAAB02F3FA431A5D157BFE7C53F43" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_65C062FA243B871BBAD857BFE7C5D632" xlink:to="loc_us-gaap_GeographicConcentrationRiskMember_412CAAB02F3FA431A5D157BFE7C53F43" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_8496F92F856C83863C8057BFE7C535C0" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_8496F92F856C83863C8057BFE7C535C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8496F92F856C83863C8057BFE7C535C0" xlink:to="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8496F92F856C83863C8057BFE7C535C0" xlink:to="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NorthAmericaMember" xlink:label="loc_us-gaap_NorthAmericaMember_AEC96151C170436B868657BFE7C51D5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703" xlink:to="loc_us-gaap_NorthAmericaMember_AEC96151C170436B868657BFE7C51D5B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_AFE12407749D5931953F57BFE7C58196" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9F9141485D1747DF077457BFE7C59703" xlink:to="loc_hsy_InternationalandOtherSegmentMember_AFE12407749D5931953F57BFE7C58196" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_9D2C6BD89B98D0830C0557BFE7C54BEB" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_RestructuringPlanAxis_9D2C6BD89B98D0830C0557BFE7C54BEB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_9D2C6BD89B98D0830C0557BFE7C54BEB" xlink:to="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_9D2C6BD89B98D0830C0557BFE7C54BEB" xlink:to="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NorthAmericaMember" xlink:label="loc_us-gaap_NorthAmericaMember_7D00E9596F453D73EEC157BFE7C59D5A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:to="loc_us-gaap_NorthAmericaMember_7D00E9596F453D73EEC157BFE7C59D5A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_D4CB1B4A08173856509357BFE7C5A593" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:to="loc_hsy_MarginforGrowthProgramMember_D4CB1B4A08173856509357BFE7C5A593" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ChinaStructureOptimizationMember" xlink:label="loc_hsy_ChinaStructureOptimizationMember_3763FDBF3F4E334606C257BFE7C5ADF6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:to="loc_hsy_ChinaStructureOptimizationMember_3763FDBF3F4E334606C257BFE7C5ADF6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ProductivityInitiative2015Member" xlink:label="loc_hsy_ProductivityInitiative2015Member_1222FE2F2525092D52F257BFE7C59A21" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_3B169295700804252B9257BFE7C5BA32" xlink:to="loc_hsy_ProductivityInitiative2015Member_1222FE2F2525092D52F257BFE7C59A21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_CD7DAE8FA57FE728311957BFE7C59BF0" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_FF7E2373155758F4B02B57BFE7C5F4F5" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_CD7DAE8FA57FE728311957BFE7C59BF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_CD7DAE8FA57FE728311957BFE7C59BF0" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_CD7DAE8FA57FE728311957BFE7C59BF0" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FacilityClosingMember" xlink:label="loc_us-gaap_FacilityClosingMember_B7BFE9C48EA7DC1EC3DE57BFE7C58752" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_us-gaap_FacilityClosingMember_B7BFE9C48EA7DC1EC3DE57BFE7C58752" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="loc_us-gaap_EmployeeSeveranceMember_FE75E96A42F74E794D9D57BFE7C537DC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_us-gaap_EmployeeSeveranceMember_FE75E96A42F74E794D9D57BFE7C537DC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_AcceleratedDepreciationandAmortizationMember" xlink:label="loc_hsy_AcceleratedDepreciationandAmortizationMember_FF74DC9B4E00EED09BC857BFE7C51C0A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_hsy_AcceleratedDepreciationandAmortizationMember_FF74DC9B4E00EED09BC857BFE7C51C0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ContractTerminationMember" xlink:label="loc_us-gaap_ContractTerminationMember_19B74805EA02486FF01557BFE7C571A3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_us-gaap_ContractTerminationMember_19B74805EA02486FF01557BFE7C571A3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherRestructuringMember" xlink:label="loc_us-gaap_OtherRestructuringMember_28B748383B7242A1719957BFE7C52157" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_us-gaap_OtherRestructuringMember_28B748383B7242A1719957BFE7C52157" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OneTimeTerminationBenefitsMember" xlink:label="loc_us-gaap_OneTimeTerminationBenefitsMember_240F35694F6038AA727557BFE7C54013" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_0C10464AE59BDD8A87B657BFE7C581B5" xlink:to="loc_us-gaap_OneTimeTerminationBenefitsMember_240F35694F6038AA727557BFE7C54013" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_0ECBADCA74EB5D39756357BFE7C556AE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_0ECBADCA74EB5D39756357BFE7C556AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedCost1" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_7314C394F8163D46E45F57BFE7C5FD91" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_7314C394F8163D46E45F57BFE7C5FD91" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_3D29BD26D63100EEBFF957BFE7C5D8C4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_3D29BD26D63100EEBFF957BFE7C5D8C4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EffectOnFutureCashFlowsAmount" xlink:label="loc_us-gaap_EffectOnFutureCashFlowsAmount_34BA2619F1D3ECD5CF8857BFE7C5A6E7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_EffectOnFutureCashFlowsAmount_34BA2619F1D3ECD5CF8857BFE7C5A6E7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent" xlink:label="loc_hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent_A61EF908757B7919161557BFE7C58184" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent_A61EF908757B7919161557BFE7C58184" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetImpairmentCharges" xlink:label="loc_us-gaap_AssetImpairmentCharges_C295A7F80999613CBCA357BFE7C59249" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_AssetImpairmentCharges_C295A7F80999613CBCA357BFE7C59249" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfLongLivedAssetsHeldForUse" xlink:label="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_63905E3E2E6EECE646DB57BFE7C5E306" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_63905E3E2E6EECE646DB57BFE7C5E306" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_450454F43DE8AF0ACB2F57BFE7C5452B" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_RestructuringCharges_450454F43DE8AF0ACB2F57BFE7C5452B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts" xlink:label="loc_hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts_511D4AC99933AD1C976157BFE7C52721" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts_511D4AC99933AD1C976157BFE7C52721" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_E1FE2C7F4284A3AF58C857BFE7C5197A" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_E1FE2C7F4284A3AF58C857BFE7C5197A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringAndRelatedCostCostIncurredToDate1" xlink:label="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_A9B1D8C072BC572D338B57BFE7C58A6B" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_C5CE0ADC4D5816BF4BC757BFE7C5BBD4" xlink:to="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_A9B1D8C072BC572D338B57BFE7C58A6B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfBusinessRealignmentActivityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_4AFC077A16B5BD146EA933C559364E29" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_4AFC077A16B5BD146EA933C559364E29" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_BC6CDE7895C659F012F133C55934171D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_BC6CDE7895C659F012F133C55934171D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_BC6CDE7895C659F012F133C55934171D" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_BC6CDE7895C659F012F133C55934171D" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="loc_us-gaap_EmployeeSeveranceMember_134E70D768DEB57101AF33C55934258F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:to="loc_us-gaap_EmployeeSeveranceMember_134E70D768DEB57101AF33C55934258F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_AcceleratedDepreciationandAmortizationMember" xlink:label="loc_hsy_AcceleratedDepreciationandAmortizationMember_E53BAC0A4F2D2417AAD333C5593558D7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:to="loc_hsy_AcceleratedDepreciationandAmortizationMember_E53BAC0A4F2D2417AAD333C5593558D7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherRestructuringMember" xlink:label="loc_us-gaap_OtherRestructuringMember_FDDA02B47ED03379A0E833C5593559B3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:to="loc_us-gaap_OtherRestructuringMember_FDDA02B47ED03379A0E833C5593559B3" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PensionSettlementChargeMember" xlink:label="loc_hsy_PensionSettlementChargeMember_CBDF81F298DAAA62079D33C5593585BC" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_BF03AA416B751099E1C233C55934625A" xlink:to="loc_hsy_PensionSettlementChargeMember_CBDF81F298DAAA62079D33C5593585BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis" xlink:label="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_489191F92B2B85219C8F33C55935D158" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_489191F92B2B85219C8F33C55935D158" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_8F44FB2ECDE54C59B24333C559357F27_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_489191F92B2B85219C8F33C55935D158" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_8F44FB2ECDE54C59B24333C559357F27_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain" xlink:label="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_8F44FB2ECDE54C59B24333C559357F27" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsAxis_489191F92B2B85219C8F33C55935D158" xlink:to="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_8F44FB2ECDE54C59B24333C559357F27" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MaunaLoaMacadamiaNutCorporationMember" xlink:label="loc_hsy_MaunaLoaMacadamiaNutCorporationMember_10E4DEE769DE9C7586A233C559350D59" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisposalGroupsIncludingDiscontinuedOperationsNameDomain_8F44FB2ECDE54C59B24333C559357F27" xlink:to="loc_hsy_MaunaLoaMacadamiaNutCorporationMember_10E4DEE769DE9C7586A233C559350D59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_B36B3C5500440989B34833C55935F8C6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:to="loc_us-gaap_RestructuringPlanAxis_B36B3C5500440989B34833C55935F8C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_B36B3C5500440989B34833C55935F8C6" xlink:to="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_B36B3C5500440989B34833C55935F8C6" xlink:to="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_9BCCCC358D2F2EA1884D33C559353548" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:to="loc_hsy_MarginforGrowthProgramMember_9BCCCC358D2F2EA1884D33C559353548" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ChinaStructureOptimizationMember" xlink:label="loc_hsy_ChinaStructureOptimizationMember_6BB62E85D8D0A3785D7A33C55935AAF3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:to="loc_hsy_ChinaStructureOptimizationMember_6BB62E85D8D0A3785D7A33C55935AAF3" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ProductivityInitiative2015Member" xlink:label="loc_hsy_ProductivityInitiative2015Member_5EC0D56BBB69379B5BC633C5593596E0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:to="loc_hsy_ProductivityInitiative2015Member_5EC0D56BBB69379B5BC633C5593596E0" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_OtherInternationalRestructuringProgramsMember" xlink:label="loc_hsy_OtherInternationalRestructuringProgramsMember_AE21945A98B1322E15C933C55936FF2D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_FA05D62ED7B277E2126033C55935109B" xlink:to="loc_hsy_OtherInternationalRestructuringProgramsMember_AE21945A98B1322E15C933C55936FF2D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_87BDFC80D5F99044FA9333C55936A7A6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_CACFE1195D827560A38C33C55934F9F0" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_87BDFC80D5F99044FA9333C55936A7A6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_87BDFC80D5F99044FA9333C55936A7A6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_87BDFC80D5F99044FA9333C55936A7A6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_E91B0479BB5767E6293133C55936A384" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108" xlink:to="loc_us-gaap_CostOfSalesMember_E91B0479BB5767E6293133C55936A384" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_B8C6E57CEF0BAF9DA87533C55936631F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_B8C6E57CEF0BAF9DA87533C55936631F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringChargesMember" xlink:label="loc_us-gaap_RestructuringChargesMember_77F6635B0AB24F127B8133C55936F17E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_1A18FDBA120EA81C80F533C559368108" xlink:to="loc_us-gaap_RestructuringChargesMember_77F6635B0AB24F127B8133C55936F17E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_AAF7F8EDC24D2D8A386433C5593764F5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_4AFC077A16B5BD146EA933C559364E29" xlink:to="loc_us-gaap_RestructuringCharges_AAF7F8EDC24D2D8A386433C5593764F5" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfLiabilityActivityForCostsQualifyingAsExitAndDisposalCostsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_B38307C42D636BF58B4D41E9622E9099" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_2E165171A4E12C09BB6D41E9622EA1F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B38307C42D636BF58B4D41E9622E9099" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_2E165171A4E12C09BB6D41E9622EA1F0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_D956EB5483EB957255EC41E9622EBC7D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_2E165171A4E12C09BB6D41E9622EA1F0" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_D956EB5483EB957255EC41E9622EBC7D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_EF81808D8C1E769D66D041E9622EE246_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_D956EB5483EB957255EC41E9622EBC7D" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_EF81808D8C1E769D66D041E9622EE246_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_EF81808D8C1E769D66D041E9622EE246" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_D956EB5483EB957255EC41E9622EBC7D" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_EF81808D8C1E769D66D041E9622EE246" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringReserveRollForward" xlink:label="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B38307C42D636BF58B4D41E9622E9099" xlink:to="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringReserve" xlink:label="loc_us-gaap_RestructuringReserve_894DD16E27B79FC7083041E9622E2476" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:to="loc_us-gaap_RestructuringReserve_894DD16E27B79FC7083041E9622E2476" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RestructuringChargesBusinessRealignmentReserve" xlink:label="loc_hsy_RestructuringChargesBusinessRealignmentReserve_5C8868E0E009DB49AC8E41E9622E540C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:to="loc_hsy_RestructuringChargesBusinessRealignmentReserve_5C8868E0E009DB49AC8E41E9622E540C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsForRestructuring" xlink:label="loc_us-gaap_PaymentsForRestructuring_0B9CF4C2D7953B3281AC41E9622E0953" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:to="loc_us-gaap_PaymentsForRestructuring_0B9CF4C2D7953B3281AC41E9622E0953" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringReserveAccrualAdjustment1" xlink:label="loc_us-gaap_RestructuringReserveAccrualAdjustment1_AAAE582DD92D5C78353D41E9622E2747" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_2FA9F3CDA92972E24F2441E9622E88E2" xlink:to="loc_us-gaap_RestructuringReserveAccrualAdjustment1_AAAE582DD92D5C78353D41E9622E2747" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessRealignmentActivitiesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CommitmentsAndContingenciesCommitmentsAndContingenciesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskLineItems" xlink:label="loc_us-gaap_ConcentrationRiskLineItems_C4D95F7F491F969504F5775FB366AA57" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTable" xlink:label="loc_us-gaap_ConcentrationRiskTable_592A65DC4DD5B13DCED2775FB365F730" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_C4D95F7F491F969504F5775FB366AA57" xlink:to="loc_us-gaap_ConcentrationRiskTable_592A65DC4DD5B13DCED2775FB365F730" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D61D82EE30C8DB3F31BA7791B00D8BB6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_592A65DC4DD5B13DCED2775FB365F730" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D61D82EE30C8DB3F31BA7791B00D8BB6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_97BDCE315DA5852DAD6D7791B00EB61A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D61D82EE30C8DB3F31BA7791B00D8BB6" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_97BDCE315DA5852DAD6D7791B00EB61A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_97BDCE315DA5852DAD6D7791B00EB61A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_D61D82EE30C8DB3F31BA7791B00D8BB6" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_97BDCE315DA5852DAD6D7791B00EB61A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WorkforceSubjectToCollectiveBargainingArrangementsMember" xlink:label="loc_us-gaap_WorkforceSubjectToCollectiveBargainingArrangementsMember_54B5CDB1B5E4A1C9870D7791B01C6540" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_97BDCE315DA5852DAD6D7791B00EB61A" xlink:to="loc_us-gaap_WorkforceSubjectToCollectiveBargainingArrangementsMember_54B5CDB1B5E4A1C9870D7791B01C6540" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_FD0A29936BD7C697CF2D775FB365A543" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_592A65DC4DD5B13DCED2775FB365F730" xlink:to="loc_us-gaap_StatementScenarioAxis_FD0A29936BD7C697CF2D775FB365A543" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_B1B715F76DD47CAD371E775FB365FA24_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_FD0A29936BD7C697CF2D775FB365A543" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_B1B715F76DD47CAD371E775FB365FA24_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_B1B715F76DD47CAD371E775FB365FA24" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_FD0A29936BD7C697CF2D775FB365A543" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_B1B715F76DD47CAD371E775FB365FA24" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioForecastMember" xlink:label="loc_us-gaap_ScenarioForecastMember_58938A9129C0F943EEC377907059E491" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_B1B715F76DD47CAD371E775FB365FA24" xlink:to="loc_us-gaap_ScenarioForecastMember_58938A9129C0F943EEC377907059E491" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityNumberOfEmployees" xlink:label="loc_dei_EntityNumberOfEmployees_21348E057EEDE8690E73775FB3667C0B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_C4D95F7F491F969504F5775FB366AA57" xlink:to="loc_dei_EntityNumberOfEmployees_21348E057EEDE8690E73775FB3667C0B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_EntityNumberofPartTimeEmployees" xlink:label="loc_hsy_EntityNumberofPartTimeEmployees_5AF58F3B82E61120FAAC775FB3668385" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_C4D95F7F491F969504F5775FB366AA57" xlink:to="loc_hsy_EntityNumberofPartTimeEmployees_5AF58F3B82E61120FAAC775FB3668385" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_9E3BC9AC39C3FC52836C775FB3660A67" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_C4D95F7F491F969504F5775FB366AA57" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_9E3BC9AC39C3FC52836C775FB3660A67" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CommitmentsAndContingenciesScheduleOfOperatingAndCapitalLeaseObligationsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CommitmentsAndContingenciesScheduleOfPurchaseObligationsCoveredByPutchaseAgreementsWithVariousSuppliersFutureMaturtyScheduleDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationLineItems" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationLineItems_C0B9689C8E685248A0CB8FD2E85EFF5B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationTable" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationTable_AE18976353D2FA08CD9B8FD2E85E9ABF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationLineItems_C0B9689C8E685248A0CB8FD2E85EFF5B" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationTable_AE18976353D2FA08CD9B8FD2E85E9ABF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationByCategoryOfItemPurchasedAxis" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationByCategoryOfItemPurchasedAxis_863EF2A46F5548E630BC8FD2E85E3048" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationTable_AE18976353D2FA08CD9B8FD2E85E9ABF" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationByCategoryOfItemPurchasedAxis_863EF2A46F5548E630BC8FD2E85E3048" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain" xlink:label="loc_us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain_97317917388605A490138FD2E85EDA19_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationByCategoryOfItemPurchasedAxis_863EF2A46F5548E630BC8FD2E85E3048" xlink:to="loc_us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain_97317917388605A490138FD2E85EDA19_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain" xlink:label="loc_us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain_97317917388605A490138FD2E85EDA19" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationByCategoryOfItemPurchasedAxis_863EF2A46F5548E630BC8FD2E85E3048" xlink:to="loc_us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain_97317917388605A490138FD2E85EDA19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InventoriesMember" xlink:label="loc_us-gaap_InventoriesMember_6D97747802DE6AC632D08FD2E85ED7FE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnconditionalPurchaseObligationCategoryOfGoodsOrServicesAcquiredDomain_97317917388605A490138FD2E85EDA19" xlink:to="loc_us-gaap_InventoriesMember_6D97747802DE6AC632D08FD2E85ED7FE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationLineItems_C0B9689C8E685248A0CB8FD2E85EFF5B" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFirstAnniversary" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFirstAnniversary_F4275619EF617A00A84C8FD2E85E23C1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFirstAnniversary_F4275619EF617A00A84C8FD2E85E23C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnSecondAnniversary" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnSecondAnniversary_F24369049ED27BC1BEE68FD2E85E8F6E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnSecondAnniversary_F24369049ED27BC1BEE68FD2E85E8F6E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnThirdAnniversary" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnThirdAnniversary_04FF1935C706BB8611C18FD2E85E3B2C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnThirdAnniversary_04FF1935C706BB8611C18FD2E85E3B2C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFourthAnniversary" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFourthAnniversary_FA3232C60BACE42954138FD2E85EAD17" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFourthAnniversary_FA3232C60BACE42954138FD2E85EAD17" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFifthAnniversary" xlink:label="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFifthAnniversary_B838E9A5E7B9A911706890931F786798" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationAbstract_EDF70CC5C9A89C198AD48FD2E85E1B6C" xlink:to="loc_us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceOnFifthAnniversary_B838E9A5E7B9A911706890931F786798" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_6EC13BDA972EC092D0622A1F34882A6C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_1CBAF20F4CA0645648962A1F348811B8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_6EC13BDA972EC092D0622A1F34882A6C" xlink:to="loc_us-gaap_StatementTable_1CBAF20F4CA0645648962A1F348811B8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_4D77EC652492E1A052DF2A1F3488F512" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_1CBAF20F4CA0645648962A1F348811B8" xlink:to="loc_us-gaap_StatementClassOfStockAxis_4D77EC652492E1A052DF2A1F3488F512" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4D77EC652492E1A052DF2A1F3488F512" xlink:to="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4D77EC652492E1A052DF2A1F3488F512" xlink:to="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_F86A390A819904707FB02A1F3488CFFC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6" xlink:to="loc_hsy_HersheyCommonStockMember_F86A390A819904707FB02A1F3488CFFC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_67F6C0B5549C1FB838162A1F3488BC1F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_546FD07367E5C83123132A1F34887FF6" xlink:to="loc_us-gaap_CommonClassBMember_67F6C0B5549C1FB838162A1F3488BC1F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6EC13BDA972EC092D0622A1F34882A6C" xlink:to="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsCurrentAbstract" xlink:label="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_62CE6AEAF7C299A58FCA2A1F3488D6CB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_62CE6AEAF7C299A58FCA2A1F3488D6CB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableNetCurrent" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_E29426F55536CB8BC9672A1F34883F8A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_E29426F55536CB8BC9672A1F34883F8A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_714835E78CF848C9DD9D2A1F3488C313" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:to="loc_us-gaap_InventoryNet_714835E78CF848C9DD9D2A1F3488C313" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_37BE6695AA2B231977D02A1F348881D9" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_37BE6695AA2B231977D02A1F348881D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="loc_us-gaap_AssetsCurrent_BA110CEF86ACF0D95E7D2A1F3488754B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_3A4EE3F6BEA2C5E75AB92A1F348871A0" xlink:to="loc_us-gaap_AssetsCurrent_BA110CEF86ACF0D95E7D2A1F3488754B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_7177A39813718AD529352A1F34891C72" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_7177A39813718AD529352A1F34891C72" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_03507DB4C0B46F43AE392A1F34891AE3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_Goodwill_03507DB4C0B46F43AE392A1F34891AE3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_FADDDDB18B8E232365EB2A1F3489318F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_FADDDDB18B8E232365EB2A1F3489318F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_468AF56FBB330D645C2F2A1F34891E26" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_468AF56FBB330D645C2F2A1F34891E26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNetNoncurrent" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNetNoncurrent_78B7C3367DB29F5DAB662A1F3489AAFD" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_DeferredTaxAssetsLiabilitiesNetNoncurrent_78B7C3367DB29F5DAB662A1F3489AAFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_DEEA85E6A3E05DB2A3252A1F3489B8EA" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_D30884A0C7B016A93E812A1F3488A52A" xlink:to="loc_us-gaap_Assets_DEEA85E6A3E05DB2A3252A1F3489B8EA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6EC13BDA972EC092D0622A1F34882A6C" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="loc_us-gaap_AccountsPayableCurrent_46B741CB2F99F65EFDC12A1F3489B86B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_AccountsPayableCurrent_46B741CB2F99F65EFDC12A1F3489B86B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_76D75935D29B963906732A1F348999E7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_76D75935D29B963906732A1F348999E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccruedIncomeTaxesCurrent" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_7B5D1E17C7BF9487995C2A1F34895A51" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_7B5D1E17C7BF9487995C2A1F34895A51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermBorrowings" xlink:label="loc_us-gaap_ShortTermBorrowings_65A33FFBF420068B550C2A1F34892DFE" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_ShortTermBorrowings_65A33FFBF420068B550C2A1F34892DFE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtCurrent" xlink:label="loc_us-gaap_LongTermDebtCurrent_0F6B723C59611DEA6BC02A1F348943E0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_LongTermDebtCurrent_0F6B723C59611DEA6BC02A1F348943E0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="loc_us-gaap_LiabilitiesCurrent_322418A71DE7C2F39D232A1F34897681" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_0A86B3B2FD1DF0C8A1192A1F34894A17" xlink:to="loc_us-gaap_LiabilitiesCurrent_322418A71DE7C2F39D232A1F34897681" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligations" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_5EB9576042C7214E19BC2A1F348A4AD8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_5EB9576042C7214E19BC2A1F348A4AD8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_E1847E35BD5C224A2B0A2A1F348AC437" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_E1847E35BD5C224A2B0A2A1F348AC437" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredTaxLiabilitiesNoncurrent" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesNoncurrent_62397021716C6D5E7B662A1F348A6507" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesNoncurrent_62397021716C6D5E7B662A1F348A6507" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_4EB69D00DDFEC8D5FD8D2A1F348A5551" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_Liabilities_4EB69D00DDFEC8D5FD8D2A1F348A5551" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PreferredStockValue" xlink:label="loc_us-gaap_PreferredStockValue_51BF7EC7CA167A3C37D02A1F348ADED6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_PreferredStockValue_51BF7EC7CA167A3C37D02A1F348ADED6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockValue" xlink:label="loc_us-gaap_CommonStockValue_F0CAE836853B291955372A1F348A83E1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_CommonStockValue_F0CAE836853B291955372A1F348A83E1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_B9FB71616E029F04472F2A1F348A9602" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_AdditionalPaidInCapital_B9FB71616E029F04472F2A1F348A9602" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_CCDA21E575E8E32EEA572A1F348B8199" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_CCDA21E575E8E32EEA572A1F348B8199" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockValue" xlink:label="loc_us-gaap_TreasuryStockValue_7609537FB6F00232D5012A1F348BAC4F" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_TreasuryStockValue_7609537FB6F00232D5012A1F348BAC4F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_DFAB21B111CB6C4F602C2A1F348B5A12" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_DFAB21B111CB6C4F602C2A1F348B5A12" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_EE406453AA6A004640722A1F348B9467" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_StockholdersEquity_EE406453AA6A004640722A1F348B9467" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinorityInterest" xlink:label="loc_us-gaap_MinorityInterest_D4EE7B5D65CAEBD3F0452A1F348B2632" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_MinorityInterest_D4EE7B5D65CAEBD3F0452A1F348B2632" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_AE1E8CB79259BEA80B112A1F348B6129" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_422B579931EA8FAE2B9A2A1F348AEBA7" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_AE1E8CB79259BEA80B112A1F348B6129" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_FC7B2AC91D9FB05332972A1F348B5935" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_C23CAFE40FE673803F3D2A1F34892B73" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_FC7B2AC91D9FB05332972A1F348B5935" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_6E2DE6E752C3C610FCC3BB3094AE269B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_0AA9B2278257B48D7812BB3094AEA97A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_6E2DE6E752C3C610FCC3BB3094AE269B" xlink:to="loc_us-gaap_StatementTable_0AA9B2278257B48D7812BB3094AEA97A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_FB7108809B0670DBC56CBB3094AEA132" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_0AA9B2278257B48D7812BB3094AEA97A" xlink:to="loc_us-gaap_StatementClassOfStockAxis_FB7108809B0670DBC56CBB3094AEA132" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_FB7108809B0670DBC56CBB3094AEA132" xlink:to="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_FB7108809B0670DBC56CBB3094AEA132" xlink:to="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_4EC69B1D9E3E1ED0B88ABB3094AE3486" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218" xlink:to="loc_hsy_HersheyCommonStockMember_4EC69B1D9E3E1ED0B88ABB3094AE3486" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_98D212483C4858028329BB3094AE07D3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_B111F0F5216D2216A005BB3094AEE218" xlink:to="loc_us-gaap_CommonClassBMember_98D212483C4858028329BB3094AE07D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PreferredStockSharesIssued" xlink:label="loc_us-gaap_PreferredStockSharesIssued_BAF16E88E85F68ED0A28BB3094AE2813" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6E2DE6E752C3C610FCC3BB3094AE269B" xlink:to="loc_us-gaap_PreferredStockSharesIssued_BAF16E88E85F68ED0A28BB3094AE2813" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockSharesIssued" xlink:label="loc_us-gaap_CommonStockSharesIssued_4D42CB68F3F4D775A1B6BB3094AEEDD0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6E2DE6E752C3C610FCC3BB3094AE269B" xlink:to="loc_us-gaap_CommonStockSharesIssued_4D42CB68F3F4D775A1B6BB3094AEEDD0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockShares" xlink:label="loc_us-gaap_TreasuryStockShares_DD4D47D80A0DA371771EBB3094AE86D1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_6E2DE6E752C3C610FCC3BB3094AE269B" xlink:to="loc_us-gaap_TreasuryStockShares_DD4D47D80A0DA371771EBB3094AE86D1" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedStatementsOfIncome" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_C0D8E6511A1862AAF126758D975668F9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_StatementTable_C0D8E6511A1862AAF126758D975668F9" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_8584B5B37B3175DE73B5758D975614B0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_C0D8E6511A1862AAF126758D975668F9" xlink:to="loc_us-gaap_StatementClassOfStockAxis_8584B5B37B3175DE73B5758D975614B0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8584B5B37B3175DE73B5758D975614B0" xlink:to="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8584B5B37B3175DE73B5758D975614B0" xlink:to="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_2E25E1A24540FA3D5339758D9756D288" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B" xlink:to="loc_hsy_HersheyCommonStockMember_2E25E1A24540FA3D5339758D9756D288" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_76AA586A1AB568004CD9758D97564858" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_D55D5EB8CCE03E983CC0758D9756362B" xlink:to="loc_us-gaap_CommonClassBMember_76AA586A1AB568004CD9758D97564858" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNet" xlink:label="loc_us-gaap_SalesRevenueNet_39AC0DAAA60A480FA44F758D9756957B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_SalesRevenueNet_39AC0DAAA60A480FA44F758D9756957B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfGoodsSold" xlink:label="loc_us-gaap_CostOfGoodsSold_34AE76D818FBA1BD0DD4758D9756E32D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_CostOfGoodsSold_34AE76D818FBA1BD0DD4758D9756E32D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_12C914B10627C4EA9A7B758D9756D50E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_GrossProfit_12C914B10627C4EA9A7B758D9756D50E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_80B2C7B790C425066A52758D9756F00D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_80B2C7B790C425066A52758D9756F00D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetImpairmentCharges" xlink:label="loc_us-gaap_AssetImpairmentCharges_7AE6CFD63C041F005F23758D97569177" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_AssetImpairmentCharges_7AE6CFD63C041F005F23758D97569177" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_81029295285F1A6FE32B758D97566613" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_81029295285F1A6FE32B758D97566613" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_RestructuringChargesBusinessRealignment" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_ED7DF4331C585C745881758D97565304" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_ED7DF4331C585C745881758D97565304" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_675D71BA8D16972D59AC758D97564EE7" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_OperatingIncomeLoss_675D71BA8D16972D59AC758D97564EE7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_62F55B9E867A2CB60ACB758D97565DB5" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_62F55B9E867A2CB60ACB758D97565DB5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_063F513A34E947FFB4EE758D975646AE" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_063F513A34E947FFB4EE758D975646AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_74C828F18D72784D14F6758D9756AB7B" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_74C828F18D72784D14F6758D9756AB7B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_D6EF307EC313E1F7AAFD758D9756F375" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_D6EF307EC313E1F7AAFD758D9756F375" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProfitLoss" xlink:label="loc_us-gaap_ProfitLoss_A26D18250538412B82E3758D97569951" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_ProfitLoss_A26D18250538412B82E3758D97569951" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_F5E60F9925BC39FB7B2A758D9756F3ED" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_F5E60F9925BC39FB7B2A758D9756F3ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_26B377873917D572AC86758D97562235" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_NetIncomeLoss_26B377873917D572AC86758D97562235" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasicAbstract" xlink:label="loc_us-gaap_EarningsPerShareBasicAbstract_F0C993836FD2C5925885758D97567BA9" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_F0C993836FD2C5925885758D97567BA9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:label="loc_us-gaap_EarningsPerShareBasic_D7ED850F387EDB691781758D975694A1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_F0C993836FD2C5925885758D97567BA9" xlink:to="loc_us-gaap_EarningsPerShareBasic_D7ED850F387EDB691781758D975694A1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareDilutedAbstract" xlink:label="loc_us-gaap_EarningsPerShareDilutedAbstract_6F312CD02BA8ADE26F36758D97569300" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_6F312CD02BA8ADE26F36758D97569300" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:label="loc_us-gaap_EarningsPerShareDiluted_1DC6C27158079B57E5EC758D975614B5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_6F312CD02BA8ADE26F36758D97569300" xlink:to="loc_us-gaap_EarningsPerShareDiluted_1DC6C27158079B57E5EC758D975614B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DividendsCommonStockAbstract" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_F8703A27BACFB31678A5758D9756E691" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_D04DC958A44151C950D3758D97568BBD" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_F8703A27BACFB31678A5758D9756E691" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockDividendsPerShareCashPaid" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_E29415EC0AB1FBF62F66758D9756B434" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_F8703A27BACFB31678A5758D9756E691" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_E29415EC0AB1FBF62F66758D9756B434" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquity" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_F3C8A7D6B83BC6E798BF8FC886222809" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_CAE51C178A11E5BFF2938FC8861811C4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_F3C8A7D6B83BC6E798BF8FC886222809" xlink:to="loc_us-gaap_StatementTable_CAE51C178A11E5BFF2938FC8861811C4" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_6F1F0DDDAE8014C47BD78FC886183905" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_CAE51C178A11E5BFF2938FC8861811C4" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_6F1F0DDDAE8014C47BD78FC886183905" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_335A57CFE474936C19918FC88618B5B3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_6F1F0DDDAE8014C47BD78FC886183905" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_335A57CFE474936C19918FC88618B5B3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_335A57CFE474936C19918FC88618B5B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_6F1F0DDDAE8014C47BD78FC886183905" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_335A57CFE474936C19918FC88618B5B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_1B38495C5DABEA2F9F368FC886187B8B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_335A57CFE474936C19918FC88618B5B3" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_1B38495C5DABEA2F9F368FC886187B8B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_B971CCC7597A810D4FFD8FC886183823" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_CAE51C178A11E5BFF2938FC8861811C4" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_B971CCC7597A810D4FFD8FC886183823" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_B971CCC7597A810D4FFD8FC886183823" xlink:to="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_B971CCC7597A810D4FFD8FC886183823" xlink:to="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PreferredStockMember" xlink:label="loc_us-gaap_PreferredStockMember_2A9DB8BAA81B578518CE8FC88618FEE2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_PreferredStockMember_2A9DB8BAA81B578518CE8FC88618FEE2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_F0434162776DD7427D838FC886225DBA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_CommonStockMember_F0434162776DD7427D838FC886225DBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_35A836639B78526B7E678FC88622726A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_35A836639B78526B7E678FC88622726A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_1B9B4437A407C069B0A88FC886223E92" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_RetainedEarningsMember_1B9B4437A407C069B0A88FC886223E92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockMember" xlink:label="loc_us-gaap_TreasuryStockMember_11C3353C2DACD77443418FC88622B755" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_TreasuryStockMember_11C3353C2DACD77443418FC88622B755" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_10D67AA46A28472F4F238FC8862260C5" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_10D67AA46A28472F4F238FC8862260C5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NoncontrollingInterestMember" xlink:label="loc_us-gaap_NoncontrollingInterestMember_0979332B212AD37C70DA8FC88622E3CE" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6E64D23F19348B03F8DB8FC88618C510" xlink:to="loc_us-gaap_NoncontrollingInterestMember_0979332B212AD37C70DA8FC88622E3CE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_E6E6EE503A749FC483468FC88622D9AE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_CAE51C178A11E5BFF2938FC8861811C4" xlink:to="loc_us-gaap_StatementClassOfStockAxis_E6E6EE503A749FC483468FC88622D9AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_E6E6EE503A749FC483468FC88622D9AE" xlink:to="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_E6E6EE503A749FC483468FC88622D9AE" xlink:to="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_B6C7EC7D079CAE6860D18FC88622A15F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53" xlink:to="loc_hsy_HersheyCommonStockMember_B6C7EC7D079CAE6860D18FC88622A15F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_8DD7A4F27909D5EF43BC8FC886226677" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_97208125D9B68EE0C2F08FC886226C53" xlink:to="loc_us-gaap_CommonClassBMember_8DD7A4F27909D5EF43BC8FC886226677" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F3C8A7D6B83BC6E798BF8FC886222809" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_756C8DCFC705C26F0D808FC886225B14" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_756C8DCFC705C26F0D808FC886225B14" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_70F36F97F0A0C128B2138FC886229435" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_NetIncomeLoss_70F36F97F0A0C128B2138FC886229435" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_9FEB6857210F443DC7F28FC88622F402" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_9FEB6857210F443DC7F28FC88622F402" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProfitLoss" xlink:label="loc_us-gaap_ProfitLoss_C0F8787A78FECCDCDDE28FC88622C8D5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_ProfitLoss_C0F8787A78FECCDCDDE28FC88622C8D5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_C9D22B23EAF55FE6C9B28FC886226877" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_C9D22B23EAF55FE6C9B28FC886226877" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DividendsCommonStockAbstract" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_654374119C3C2E165F248FC88622C125" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_654374119C3C2E165F248FC88622C125" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DividendsCommonStockCash" xlink:label="loc_us-gaap_DividendsCommonStockCash_00A81CD499BC890501A68FC88622C8AA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_654374119C3C2E165F248FC88622C125" xlink:to="loc_us-gaap_DividendsCommonStockCash_00A81CD499BC890501A68FC88622C8AA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_293AC504AA33C969E9738FC886226FFB" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_293AC504AA33C969E9738FC886226FFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_64AD47708C0A0FC3F9538FC888B4DDDB" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_64AD47708C0A0FC3F9538FC888B4DDDB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_6D1F745E602B6F3BFC618FC886229E07" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_6D1F745E602B6F3BFC618FC886229E07" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ReclassificationsOfTemporaryToPermanentEquity" xlink:label="loc_us-gaap_ReclassificationsOfTemporaryToPermanentEquity_9777D11A6F0363E06E1E8FC88622E7C5" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_3A6EE4F9FF0B8694B1668FC8862277DF" xlink:to="loc_us-gaap_ReclassificationsOfTemporaryToPermanentEquity_9777D11A6F0363E06E1E8FC88622E7C5" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquityParenthetical" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_9814111CA6DD428CD765BB3095BEF6C0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_CD285470777EC53F42E0BB3095BE1741" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_9814111CA6DD428CD765BB3095BEF6C0" xlink:to="loc_us-gaap_StatementTable_CD285470777EC53F42E0BB3095BE1741" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_9659E1D251158F944482BB3095BEE411" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_CD285470777EC53F42E0BB3095BE1741" xlink:to="loc_us-gaap_StatementClassOfStockAxis_9659E1D251158F944482BB3095BEE411" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9659E1D251158F944482BB3095BEE411" xlink:to="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9659E1D251158F944482BB3095BEE411" xlink:to="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_336C51A6CA1D74CD7F17BB3095BE4B2D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C" xlink:to="loc_hsy_HersheyCommonStockMember_336C51A6CA1D74CD7F17BB3095BE4B2D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_07469B6AE12353BB97E0BB3095BEE266" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_952229091359AE67511ABB3095BE749C" xlink:to="loc_us-gaap_CommonClassBMember_07469B6AE12353BB97E0BB3095BEE266" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockDividendsPerShareCashPaid" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_5404F3B59A67F3249403BB3095BE6273" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9814111CA6DD428CD765BB3095BEF6C0" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_5404F3B59A67F3249403BB3095BE6273" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DerivativeInstruments" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DerivativeInstrumentsDerivativeInstrumentsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_BB0C7441EC858F3111C88FD2EB3351E5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_BB0C7441EC858F3111C88FD2EB3351E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_BB0C7441EC858F3111C88FD2EB3351E5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_BB0C7441EC858F3111C88FD2EB3351E5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_295F06E737E82055C25C8FD2EB3310D2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:to="loc_us-gaap_CommodityContractMember_295F06E737E82055C25C8FD2EB3310D2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:label="loc_us-gaap_ForeignExchangeContractMember_FEC261F05BE5D1A0CCED8FD2EB33F9BC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:to="loc_us-gaap_ForeignExchangeContractMember_FEC261F05BE5D1A0CCED8FD2EB33F9BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestRateContractMember" xlink:label="loc_us-gaap_InterestRateContractMember_0DD2574B4975DC9F2B528FD2EB33327C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:to="loc_us-gaap_InterestRateContractMember_0DD2574B4975DC9F2B528FD2EB33327C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquitySwapMember" xlink:label="loc_us-gaap_EquitySwapMember_9925C6139B32067C7E708FD2EB346989" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:to="loc_us-gaap_EquitySwapMember_9925C6139B32067C7E708FD2EB346989" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestRateSwapMember" xlink:label="loc_us-gaap_InterestRateSwapMember_1A1A2E42849380EE3C8C8FD2EB3459BF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_C0430BFF134C046264568FD2EB334BE9" xlink:to="loc_us-gaap_InterestRateSwapMember_1A1A2E42849380EE3C8C8FD2EB3459BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_7CEC07A29AF3DEC8B1048FD2EB349C9A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:to="loc_us-gaap_HedgingDesignationAxis_7CEC07A29AF3DEC8B1048FD2EB349C9A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_7CEC07A29AF3DEC8B1048FD2EB349C9A" xlink:to="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_7CEC07A29AF3DEC8B1048FD2EB349C9A" xlink:to="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_B3BC8C0D1C22AAA2596E8FD2EB34E1D6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_B3BC8C0D1C22AAA2596E8FD2EB34E1D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NondesignatedMember" xlink:label="loc_us-gaap_NondesignatedMember_1FE9CE4E03078F6CFC318FD2EB34A19B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_68E545CAD21D57230DD78FD2EB34CCDF" xlink:to="loc_us-gaap_NondesignatedMember_1FE9CE4E03078F6CFC318FD2EB34A19B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_8752B4C1E52347E70E5F8FD2EB34B417" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_8752B4C1E52347E70E5F8FD2EB34B417" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_8752B4C1E52347E70E5F8FD2EB34B417" xlink:to="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_8752B4C1E52347E70E5F8FD2EB34B417" xlink:to="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:label="loc_us-gaap_CashFlowHedgingMember_E68DF03160868FE8DF728FD2EB34AEC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D" xlink:to="loc_us-gaap_CashFlowHedgingMember_E68DF03160868FE8DF728FD2EB34AEC9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueHedgingMember" xlink:label="loc_us-gaap_FairValueHedgingMember_13942715A2CC445A9CA68FD2EB34BAE5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_E16B9EE0B2FB4D293C098FD2EB34BE3D" xlink:to="loc_us-gaap_FairValueHedgingMember_13942715A2CC445A9CA68FD2EB34BAE5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_CAAEEEAEFEA0F513F39C8FD2EB3458C8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:to="loc_us-gaap_RangeAxis_CAAEEEAEFEA0F513F39C8FD2EB3458C8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_CAAEEEAEFEA0F513F39C8FD2EB3458C8" xlink:to="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_CAAEEEAEFEA0F513F39C8FD2EB3458C8" xlink:to="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_452221F98B48D47E9F808FD2EB347C5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04" xlink:to="loc_us-gaap_MinimumMember_452221F98B48D47E9F808FD2EB347C5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_7880327D5D547A4BC49E8FD2EB34917C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5DD424D3BB1D264440AF8FD2EB34EA04" xlink:to="loc_us-gaap_MaximumMember_7880327D5D547A4BC49E8FD2EB34917C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_4379491553A817B7AA568FD2EB34EE51" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_EE11578C2CBE9C6D40058FD2EB334B40" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_4379491553A817B7AA568FD2EB34EE51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_8DE2C164BD4A706DA38D8FD2EB35F5F5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_4379491553A817B7AA568FD2EB34EE51" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_8DE2C164BD4A706DA38D8FD2EB35F5F5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_8DE2C164BD4A706DA38D8FD2EB35F5F5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_4379491553A817B7AA568FD2EB34EE51" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_8DE2C164BD4A706DA38D8FD2EB35F5F5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestExpenseMember" xlink:label="loc_us-gaap_InterestExpenseMember_F437EC178472B80696C88FD2EB3559C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_8DE2C164BD4A706DA38D8FD2EB35F5F5" xlink:to="loc_us-gaap_InterestExpenseMember_F437EC178472B80696C88FD2EB3559C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeTermOfContract" xlink:label="loc_us-gaap_DerivativeTermOfContract_B22FD8301714C51669F08FD2EB355825" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_DerivativeTermOfContract_B22FD8301714C51669F08FD2EB355825" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_DerivativeNotionalAmount" xlink:label="loc_invest_DerivativeNotionalAmount_69834F837E37DF8651108FD2EB35EA27" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_invest_DerivativeNotionalAmount_69834F837E37DF8651108FD2EB35EA27" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MinimumLengthofTimeHedgedinCashFlowHedge" xlink:label="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_511DB1F04C950728ECA08FD2EB352E17" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_511DB1F04C950728ECA08FD2EB352E17" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1" xlink:label="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_A58DC5EBCB75AF4B2EDD8FD2EB355E75" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_A58DC5EBCB75AF4B2EDD8FD2EB355E75" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncreaseDecreaseInDerivativeAssetsAndLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInDerivativeAssetsAndLiabilities_E06EE1FCA3EFFB3204C48FD2EB352D2B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_IncreaseDecreaseInDerivativeAssetsAndLiabilities_E06EE1FCA3EFFB3204C48FD2EB352D2B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths" xlink:label="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_C9875A55B3E3CD7ADF498FD2EB355F5F" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_C9875A55B3E3CD7ADF498FD2EB355F5F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncreaseDecreaseInFairValueOfHedgedItemInInterestRateFairValueHedge1" xlink:label="loc_us-gaap_IncreaseDecreaseInFairValueOfHedgedItemInInterestRateFairValueHedge1_04740C9C9B038AA5A9DE8FD2EB35D81B" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8AA832E068C62DC91AAD8FD2EB356C92" xlink:to="loc_us-gaap_IncreaseDecreaseInFairValueOfHedgedItemInInterestRateFairValueHedge1_04740C9C9B038AA5A9DE8FD2EB35D81B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfClassificationOfDerivativeAssetsAndLiabilitiesWithinConsolidatedBalanceSheetsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativesFairValueLineItems" xlink:label="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:label="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_D78932F01D904A3619418FD2EB2B9178" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:to="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_D78932F01D904A3619418FD2EB2B9178" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_A73EA9A4F533C54746538FD2EB2B4950" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_D78932F01D904A3619418FD2EB2B9178" xlink:to="loc_us-gaap_HedgingDesignationAxis_A73EA9A4F533C54746538FD2EB2B4950" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_A73EA9A4F533C54746538FD2EB2B4950" xlink:to="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_A73EA9A4F533C54746538FD2EB2B4950" xlink:to="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_74A23F5DB56B8843D9268FD2EB2B5CAA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_74A23F5DB56B8843D9268FD2EB2B5CAA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NondesignatedMember" xlink:label="loc_us-gaap_NondesignatedMember_A79B4E48D1CEE1A9F4AA8FD2EB2CE630" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_D04D6FF782BD17DCFD7E8FD2EB2BEDA3" xlink:to="loc_us-gaap_NondesignatedMember_A79B4E48D1CEE1A9F4AA8FD2EB2CE630" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_1EB6BB141BE73B5B3AE48FD2EB2CCAB9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_D78932F01D904A3619418FD2EB2B9178" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_1EB6BB141BE73B5B3AE48FD2EB2CCAB9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_1EB6BB141BE73B5B3AE48FD2EB2CCAB9" xlink:to="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_1EB6BB141BE73B5B3AE48FD2EB2CCAB9" xlink:to="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:label="loc_us-gaap_CashFlowHedgingMember_3A8944E4F578EE4C087E8FD2EB2C9F41" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5" xlink:to="loc_us-gaap_CashFlowHedgingMember_3A8944E4F578EE4C087E8FD2EB2C9F41" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueHedgingMember" xlink:label="loc_us-gaap_FairValueHedgingMember_66C430EC54C83DBE0A428FD2EB2C5E70" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_D98B6D29D7045DDEB48C8FD2EB2C25F5" xlink:to="loc_us-gaap_FairValueHedgingMember_66C430EC54C83DBE0A428FD2EB2C5E70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_0CA78F18441683416F7D8FD2EB2CDC5C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_D78932F01D904A3619418FD2EB2B9178" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_0CA78F18441683416F7D8FD2EB2CDC5C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_0CA78F18441683416F7D8FD2EB2CDC5C" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_0CA78F18441683416F7D8FD2EB2CDC5C" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_0DE0330D3484633E60088FD2EB2CB0DD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:to="loc_us-gaap_CommodityContractMember_0DE0330D3484633E60088FD2EB2CB0DD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:label="loc_us-gaap_ForeignExchangeContractMember_12715D54053573C368768FD2EB2CE0D3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:to="loc_us-gaap_ForeignExchangeContractMember_12715D54053573C368768FD2EB2CE0D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestRateContractMember" xlink:label="loc_us-gaap_InterestRateContractMember_9075DA929F8CE7F740398FD2EB2CEB33" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:to="loc_us-gaap_InterestRateContractMember_9075DA929F8CE7F740398FD2EB2CEB33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquitySwapMember" xlink:label="loc_us-gaap_EquitySwapMember_775B9811D353A40797538FD2EB2C044B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_7F3D40707EF1414EFB7B8FD2EB2C1E85" xlink:to="loc_us-gaap_EquitySwapMember_775B9811D353A40797538FD2EB2C044B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeAssets" xlink:label="loc_us-gaap_DerivativeAssets_394BFD0E5DD10C8DA9418FD2EB2CA53F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:to="loc_us-gaap_DerivativeAssets_394BFD0E5DD10C8DA9418FD2EB2CA53F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeLiabilities" xlink:label="loc_us-gaap_DerivativeLiabilities_F5E3E4C0DF13026797548FD2EB2C353C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:to="loc_us-gaap_DerivativeLiabilities_F5E3E4C0DF13026797548FD2EB2C353C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading" xlink:label="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_CC1D30D4C55510D418DB8FD2EB2DE918" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:to="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_CC1D30D4C55510D418DB8FD2EB2DE918" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading" xlink:label="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_850EEF9A890C8E9944F88FD2EB2DC583" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_3B71CA15B8A1809046AF8FD2EB2CC6E1" xlink:to="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_850EEF9A890C8E9944F88FD2EB2DC583" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfEffectOfDerivativeInstrumentsOnConsolidatedStatementsOfIncomeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_CFA169A703E6221E25CD32BF6368ED2A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_9AD245FE547DB223D99732BF6368B213" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_CFA169A703E6221E25CD32BF6368ED2A" xlink:to="loc_us-gaap_DerivativeTable_9AD245FE547DB223D99732BF6368B213" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_7468EA654376A4B8941C32BF636878A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_9AD245FE547DB223D99732BF6368B213" xlink:to="loc_us-gaap_HedgingDesignationAxis_7468EA654376A4B8941C32BF636878A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_8E6599CF677E930C796832BF6368A00A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_7468EA654376A4B8941C32BF636878A8" xlink:to="loc_us-gaap_HedgingDesignationDomain_8E6599CF677E930C796832BF6368A00A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_8E6599CF677E930C796832BF6368A00A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_7468EA654376A4B8941C32BF636878A8" xlink:to="loc_us-gaap_HedgingDesignationDomain_8E6599CF677E930C796832BF6368A00A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_C1FD61939DF4700FE88F32BF63683735" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_8E6599CF677E930C796832BF6368A00A" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_C1FD61939DF4700FE88F32BF63683735" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_687679B01B09107490E932BF6368D00A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_9AD245FE547DB223D99732BF6368B213" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_687679B01B09107490E932BF6368D00A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_AC0A97AD4B2F160F6DF932BF63688140_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_687679B01B09107490E932BF6368D00A" xlink:to="loc_us-gaap_HedgingRelationshipDomain_AC0A97AD4B2F160F6DF932BF63688140_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:label="loc_us-gaap_HedgingRelationshipDomain_AC0A97AD4B2F160F6DF932BF63688140" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_687679B01B09107490E932BF6368D00A" xlink:to="loc_us-gaap_HedgingRelationshipDomain_AC0A97AD4B2F160F6DF932BF63688140" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:label="loc_us-gaap_CashFlowHedgingMember_2E5F590E9BF9BDFD18B432BF63688401" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_AC0A97AD4B2F160F6DF932BF63688140" xlink:to="loc_us-gaap_CashFlowHedgingMember_2E5F590E9BF9BDFD18B432BF63688401" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_4358CBB4F73535A5C57932BF636820AD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_9AD245FE547DB223D99732BF6368B213" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_4358CBB4F73535A5C57932BF636820AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4358CBB4F73535A5C57932BF636820AD" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4358CBB4F73535A5C57932BF636820AD" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_2769EFAACFD683D94A3532BF63689443" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:to="loc_us-gaap_CommodityContractMember_2769EFAACFD683D94A3532BF63689443" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:label="loc_us-gaap_ForeignExchangeContractMember_B5D03B85FFFB8CD186C532BF6368C215" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:to="loc_us-gaap_ForeignExchangeContractMember_B5D03B85FFFB8CD186C532BF6368C215" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestRateContractMember" xlink:label="loc_us-gaap_InterestRateContractMember_B9269768846B0850412F32BF63687F11" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:to="loc_us-gaap_InterestRateContractMember_B9269768846B0850412F32BF63687F11" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquitySwapMember" xlink:label="loc_us-gaap_EquitySwapMember_3F535971F56A2250CAED32BF636880DC" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_9379A6CD289E644A5E4A32BF63684084" xlink:to="loc_us-gaap_EquitySwapMember_3F535971F56A2250CAED32BF636880DC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet" xlink:label="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_771A64BF639EF8CBB2E232BF6368357F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CFA169A703E6221E25CD32BF6368ED2A" xlink:to="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_771A64BF639EF8CBB2E232BF6368357F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossRecognizedInOtherComprehensiveIncomeEffectivePortionNet" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossRecognizedInOtherComprehensiveIncomeEffectivePortionNet_1B8D9231222E7CA1D4A632BF63680C23" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CFA169A703E6221E25CD32BF6368ED2A" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossRecognizedInOtherComprehensiveIncomeEffectivePortionNet_1B8D9231222E7CA1D4A632BF63680C23" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossReclassifiedFromAccumulatedOCIIntoIncomeEffectivePortionNet" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossReclassifiedFromAccumulatedOCIIntoIncomeEffectivePortionNet_E69C93D92EA1176EAAD632BF6368BB62" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CFA169A703E6221E25CD32BF6368ED2A" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossReclassifiedFromAccumulatedOCIIntoIncomeEffectivePortionNet_E69C93D92EA1176EAAD632BF6368BB62" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DerivativeInstrumentsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DocumentAndEntityInformation" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentInformationLineItems" xlink:label="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentInformationTable" xlink:label="loc_dei_DocumentInformationTable_C4F9FCC8C9D76A7BFB2CBB3094903229" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_DocumentInformationTable_C4F9FCC8C9D76A7BFB2CBB3094903229" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_02F3E75523186F636826BB309490BD66" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_DocumentInformationTable_C4F9FCC8C9D76A7BFB2CBB3094903229" xlink:to="loc_us-gaap_StatementClassOfStockAxis_02F3E75523186F636826BB309490BD66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_02F3E75523186F636826BB309490BD66" xlink:to="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_02F3E75523186F636826BB309490BD66" xlink:to="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_5E114A1A3E80BC710FD5BB309490A570" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2" xlink:to="loc_hsy_HersheyCommonStockMember_5E114A1A3E80BC710FD5BB309490A570" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_D9769ADD6012BA41036ABB309490899B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_1E286D93510E4A4327A9BB30949056A2" xlink:to="loc_us-gaap_CommonClassBMember_D9769ADD6012BA41036ABB309490899B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityRegistrantName" xlink:label="loc_dei_EntityRegistrantName_4B7DF410269AC615F0E4BB309490B65B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityRegistrantName_4B7DF410269AC615F0E4BB309490B65B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityCentralIndexKey" xlink:label="loc_dei_EntityCentralIndexKey_38B95719AB1A9AE216B0BB3094905633" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityCentralIndexKey_38B95719AB1A9AE216B0BB3094905633" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_CurrentFiscalYearEndDate" xlink:label="loc_dei_CurrentFiscalYearEndDate_F283716FC0993A9501B0BB30949061E5" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_CurrentFiscalYearEndDate_F283716FC0993A9501B0BB30949061E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityFilerCategory" xlink:label="loc_dei_EntityFilerCategory_033585D8768917369CDABB3094909E4D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityFilerCategory_033585D8768917369CDABB3094909E4D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentType" xlink:label="loc_dei_DocumentType_FF3CDB5A4242E5D33989BB30949046C9" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_DocumentType_FF3CDB5A4242E5D33989BB30949046C9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentPeriodEndDate" xlink:label="loc_dei_DocumentPeriodEndDate_BA806D38B39C728BA691BB30949083F2" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_DocumentPeriodEndDate_BA806D38B39C728BA691BB30949083F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentFiscalYearFocus" xlink:label="loc_dei_DocumentFiscalYearFocus_861CD5957CB4FA9249B3BB3094906B35" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_DocumentFiscalYearFocus_861CD5957CB4FA9249B3BB3094906B35" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_DocumentFiscalPeriodFocus" xlink:label="loc_dei_DocumentFiscalPeriodFocus_470171FC59839FC40918BB309490AE90" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_DocumentFiscalPeriodFocus_470171FC59839FC40918BB309490AE90" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_AmendmentFlag" xlink:label="loc_dei_AmendmentFlag_84CD120D15434029D818BB3094900E1A" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_AmendmentFlag_84CD120D15434029D818BB3094900E1A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityCommonStockSharesOutstanding" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_F3F17DB572E282B6493CBB30949AD9E7" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_F3F17DB572E282B6493CBB30949AD9E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityWellKnownSeasonedIssuer" xlink:label="loc_dei_EntityWellKnownSeasonedIssuer_720C1FFA3500E6055D6CBB30949A3BB7" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityWellKnownSeasonedIssuer_720C1FFA3500E6055D6CBB30949A3BB7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityVoluntaryFilers" xlink:label="loc_dei_EntityVoluntaryFilers_FAC8E218E92B14B18278BB30949A05D7" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityVoluntaryFilers_FAC8E218E92B14B18278BB30949A05D7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityCurrentReportingStatus" xlink:label="loc_dei_EntityCurrentReportingStatus_F2F94BACB4D8E08564CBBB30949A3F3C" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityCurrentReportingStatus_F2F94BACB4D8E08564CBBB30949A3F3C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityPublicFloat" xlink:label="loc_dei_EntityPublicFloat_1DF4A49822EFADAA22FEBB30949A64C5" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_2BC087D212042E51AB34BB309490AF09" xlink:to="loc_dei_EntityPublicFloat_1DF4A49822EFADAA22FEBB30949A64C5" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EarningsPerShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EarningsPerShareEarningsPerShareNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_6ED80BAD73CFADCD35B732BF61895FCE" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_86EA31F51D81253A3E9A32BF61793BCF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_6ED80BAD73CFADCD35B732BF61895FCE" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_86EA31F51D81253A3E9A32BF61793BCF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_52E4C69C315E2E920E7432BF6179A698" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_86EA31F51D81253A3E9A32BF61793BCF" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_52E4C69C315E2E920E7432BF6179A698" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_40B0DC322D9D35B47D7F32BF6189B354_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_52E4C69C315E2E920E7432BF6179A698" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_40B0DC322D9D35B47D7F32BF6189B354_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_40B0DC322D9D35B47D7F32BF6189B354" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_52E4C69C315E2E920E7432BF6179A698" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_40B0DC322D9D35B47D7F32BF6189B354" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_1AE461E02D72CC56E08D32BF61896D0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_40B0DC322D9D35B47D7F32BF6189B354" xlink:to="loc_us-gaap_EmployeeStockOptionMember_1AE461E02D72CC56E08D32BF61896D0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_F7F04D46246A41461F1832BF618914B0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_6ED80BAD73CFADCD35B732BF61895FCE" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_F7F04D46246A41461F1832BF618914B0" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EarningsPerShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EquityAndNoncontrollingInterest" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EquityAndNoncontrollingInterestEquityAndNoncontrollingInterestNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockLineItems" xlink:label="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_3B941032F10E619F07A48FD2E872409B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_3B941032F10E619F07A48FD2E872409B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_2A235D3FB7A91C6FD1F28FD2E872614F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3B941032F10E619F07A48FD2E872409B" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_2A235D3FB7A91C6FD1F28FD2E872614F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_2A235D3FB7A91C6FD1F28FD2E872614F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3B941032F10E619F07A48FD2E872409B" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_2A235D3FB7A91C6FD1F28FD2E872614F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_1D8F93478A755E5A34F28FD2E872A588" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_2A235D3FB7A91C6FD1F28FD2E872614F" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_1D8F93478A755E5A34F28FD2E872A588" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_EBEF53ABF1D37F6FE4678FD2E8725F6D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_us-gaap_AwardTypeAxis_EBEF53ABF1D37F6FE4678FD2E8725F6D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5C1AC0520B138EA908D38FD2E872F99C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_EBEF53ABF1D37F6FE4678FD2E8725F6D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5C1AC0520B138EA908D38FD2E872F99C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5C1AC0520B138EA908D38FD2E872F99C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_EBEF53ABF1D37F6FE4678FD2E8725F6D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5C1AC0520B138EA908D38FD2E872F99C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyTrustCompanyMember" xlink:label="loc_hsy_HersheyTrustCompanyMember_ADE399E987950CD927D88FD2E87233D1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5C1AC0520B138EA908D38FD2E872F99C" xlink:to="loc_hsy_HersheyTrustCompanyMember_ADE399E987950CD927D88FD2E87233D1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_97BC63149191BC72D0888FD2E8723842" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_us-gaap_StatementClassOfStockAxis_97BC63149191BC72D0888FD2E8723842" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_97BC63149191BC72D0888FD2E8723842" xlink:to="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_97BC63149191BC72D0888FD2E8723842" xlink:to="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_387105AF4A0D478C8E1D8FD2E8728F69" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43" xlink:to="loc_hsy_HersheyCommonStockMember_387105AF4A0D478C8E1D8FD2E8728F69" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_FF0F593DD772B6E658778FD2E8720EAA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_A776BA8FF2DC856125888FD2E872EC43" xlink:to="loc_us-gaap_CommonClassBMember_FF0F593DD772B6E658778FD2E8720EAA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CounterpartyNameAxis" xlink:label="loc_us-gaap_CounterpartyNameAxis_EAB0EC945610423358408FD2E8725FAF" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_us-gaap_CounterpartyNameAxis_EAB0EC945610423358408FD2E8725FAF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_F8F66D5F70BCD01982748FD2E872682E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CounterpartyNameAxis_EAB0EC945610423358408FD2E8725FAF" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_F8F66D5F70BCD01982748FD2E872682E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_F8F66D5F70BCD01982748FD2E872682E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CounterpartyNameAxis_EAB0EC945610423358408FD2E8725FAF" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_F8F66D5F70BCD01982748FD2E872682E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyTrustCompanyMember" xlink:label="loc_hsy_HersheyTrustCompanyMember_1A1780D8E6793A12BCEA8FD2E8724E29" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_F8F66D5F70BCD01982748FD2E872682E" xlink:to="loc_hsy_HersheyTrustCompanyMember_1A1780D8E6793A12BCEA8FD2E8724E29" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_D791F3FB280A0B0EFBEC8FD2E8726D29" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_D791F3FB280A0B0EFBEC8FD2E8726D29" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_33B347B57EA28A071FA18FD2E8721433_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_D791F3FB280A0B0EFBEC8FD2E8726D29" xlink:to="loc_us-gaap_EquityComponentDomain_33B347B57EA28A071FA18FD2E8721433_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_33B347B57EA28A071FA18FD2E8721433" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_D791F3FB280A0B0EFBEC8FD2E8726D29" xlink:to="loc_us-gaap_EquityComponentDomain_33B347B57EA28A071FA18FD2E8721433" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NoncontrollingInterestMember" xlink:label="loc_us-gaap_NoncontrollingInterestMember_F2821C87EFDF71AEBF8B8FD2E87327FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_33B347B57EA28A071FA18FD2E8721433" xlink:to="loc_us-gaap_NoncontrollingInterestMember_F2821C87EFDF71AEBF8B8FD2E87327FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_7E4B42481A99526E438F8FD2E87364D9" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_B1F7F04B3F2A1F2DE0698FD2E871F8AF" xlink:to="loc_dei_LegalEntityAxis_7E4B42481A99526E438F8FD2E87364D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_2308A698FB59C8EF87468FD2E873D887_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_7E4B42481A99526E438F8FD2E87364D9" xlink:to="loc_dei_EntityDomain_2308A698FB59C8EF87468FD2E873D887_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_2308A698FB59C8EF87468FD2E873D887" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_7E4B42481A99526E438F8FD2E87364D9" xlink:to="loc_dei_EntityDomain_2308A698FB59C8EF87468FD2E873D887" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_LotteShanghaiFoodCompanyMember" xlink:label="loc_hsy_LotteShanghaiFoodCompanyMember_26CB1841816A18518CFE8FD2E873F14A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_2308A698FB59C8EF87468FD2E873D887" xlink:to="loc_hsy_LotteShanghaiFoodCompanyMember_26CB1841816A18518CFE8FD2E873F14A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_ACF79B46AE547230B8F78FD2E87383FA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_ACF79B46AE547230B8F78FD2E87383FA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_CommonandPreferredStockSharesAuthorized" xlink:label="loc_hsy_CommonandPreferredStockSharesAuthorized_B4496F4216A22EF28AF48FD2E873D7BE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_hsy_CommonandPreferredStockSharesAuthorized_B4496F4216A22EF28AF48FD2E873D7BE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockSharesAuthorized" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_6F6DCDB460EAA99BF2298FD2E8739AA8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_6F6DCDB460EAA99BF2298FD2E8739AA8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PreferredStockSharesAuthorized" xlink:label="loc_us-gaap_PreferredStockSharesAuthorized_C513FE4EC0AF28AF4E7C8FD2E873B198" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_PreferredStockSharesAuthorized_C513FE4EC0AF28AF4E7C8FD2E873B198" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_00B374401BCABA3493218FD2E8738C28" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_00B374401BCABA3493218FD2E8738C28" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PreferredStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_PreferredStockParOrStatedValuePerShare_C8F08F4044C2CD51F7238FD2E8731E98" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_PreferredStockParOrStatedValuePerShare_C8F08F4044C2CD51F7238FD2E8731E98" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_CommonStockVotingRightsBoardElectionPercentage" xlink:label="loc_hsy_CommonStockVotingRightsBoardElectionPercentage_576EFF3DD85E78963F978FD2E8732C6F" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_hsy_CommonStockVotingRightsBoardElectionPercentage_576EFF3DD85E78963F978FD2E8732C6F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_CommonStockNumberofVotes" xlink:label="loc_hsy_CommonStockNumberofVotes_4CC5540F56919F94F1038FD2E8732002" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_hsy_CommonStockNumberofVotes_4CC5540F56919F94F1038FD2E8732002" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DividendsCommonStockCashAdditionalPercentageOverClassBCommonStockDividends" xlink:label="loc_hsy_DividendsCommonStockCashAdditionalPercentageOverClassBCommonStockDividends_334EC534F03CE8A2C42B8FD2E873B3C1" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_hsy_DividendsCommonStockCashAdditionalPercentageOverClassBCommonStockDividends_334EC534F03CE8A2C42B8FD2E873B3C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConversionOfStockSharesConverted1" xlink:label="loc_us-gaap_ConversionOfStockSharesConverted1_FFAB9BF7F8A4322FAE7D8FD2E8737C2B" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_ConversionOfStockSharesConverted1_FFAB9BF7F8A4322FAE7D8FD2E8737C2B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_F78F0DA1BC8F95B0F29E8FD2E873D3EB" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_F78F0DA1BC8F95B0F29E8FD2E873D3EB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_CommonStockVotingPercentage" xlink:label="loc_hsy_CommonStockVotingPercentage_9AB4D16742FDFCB596A38FD2E87418CB" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_hsy_CommonStockVotingPercentage_9AB4D16742FDFCB596A38FD2E87418CB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_B0FFF5235E5C8E18927C90773DEBB63E" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_B0FFF5235E5C8E18927C90773DEBB63E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockAcquiredAverageCostPerShare" xlink:label="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_6B6E74490B64109C4A798FD2E8740876" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_6B6E74490B64109C4A798FD2E8740876" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodValue" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_AD3CEDA9058062D0F68D9077A7B5034D" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_AD3CEDA9058062D0F68D9077A7B5034D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinorityInterestOwnershipPercentageByParent" xlink:label="loc_us-gaap_MinorityInterestOwnershipPercentageByParent_18B955D61A5B45C41CF78FD2E8746F47" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_E54260F3CC77644E8EF78FD2E8731A3B" xlink:to="loc_us-gaap_MinorityInterestOwnershipPercentageByParent_18B955D61A5B45C41CF78FD2E8746F47" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EquityAndNoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinorityInterestLineItems" xlink:label="loc_us-gaap_MinorityInterestLineItems_D813B1B5E620ACCF653F52CCE9ECE4CD" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinorityInterestTable" xlink:label="loc_us-gaap_MinorityInterestTable_F028EFF76A1DF7FAF8FE52CCE9EB87E7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MinorityInterestLineItems_D813B1B5E620ACCF653F52CCE9ECE4CD" xlink:to="loc_us-gaap_MinorityInterestTable_F028EFF76A1DF7FAF8FE52CCE9EB87E7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_E7867E6899F9B625A66852CCE9EB3D0B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_MinorityInterestTable_F028EFF76A1DF7FAF8FE52CCE9EB87E7" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_E7867E6899F9B625A66852CCE9EB3D0B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_0F0DF6550E084E80E5A852CCE9EC2A7D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_E7867E6899F9B625A66852CCE9EB3D0B" xlink:to="loc_us-gaap_EquityComponentDomain_0F0DF6550E084E80E5A852CCE9EC2A7D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_0F0DF6550E084E80E5A852CCE9EC2A7D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_E7867E6899F9B625A66852CCE9EB3D0B" xlink:to="loc_us-gaap_EquityComponentDomain_0F0DF6550E084E80E5A852CCE9EC2A7D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NoncontrollingInterestMember" xlink:label="loc_us-gaap_NoncontrollingInterestMember_CABA8036022F0AD66B1352CCE9EC3D30" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_0F0DF6550E084E80E5A852CCE9EC2A7D" xlink:to="loc_us-gaap_NoncontrollingInterestMember_CABA8036022F0AD66B1352CCE9EC3D30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MovementInMinorityInterestRollForward" xlink:label="loc_us-gaap_MovementInMinorityInterestRollForward_06560B295CB3B5029CA552CCE9EC7D6A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MinorityInterestLineItems_D813B1B5E620ACCF653F52CCE9ECE4CD" xlink:to="loc_us-gaap_MovementInMinorityInterestRollForward_06560B295CB3B5029CA552CCE9EC7D6A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinorityInterest" xlink:label="loc_us-gaap_MinorityInterest_81DDD4A8A06BFAC7C34F52CCE9EC1FF5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInMinorityInterestRollForward_06560B295CB3B5029CA552CCE9EC7D6A" xlink:to="loc_us-gaap_MinorityInterest_81DDD4A8A06BFAC7C34F52CCE9EC1FF5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_504BC7B079F3896245AA52CCE9EC99D2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInMinorityInterestRollForward_06560B295CB3B5029CA552CCE9EC7D6A" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_504BC7B079F3896245AA52CCE9EC99D2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToNoncontrollingInterest_3B711A7ACBC5813A07E152CCE9EC0553" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInMinorityInterestRollForward_06560B295CB3B5029CA552CCE9EC7D6A" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToNoncontrollingInterest_3B711A7ACBC5813A07E152CCE9EC0553" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EquityAndNoncontrollingInterestScheduleOfChangesInOutstandingSharesOfCommmonStockDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockLineItems" xlink:label="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_9C2920EDEB379082EE2E8FD2E8690179" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_9C2920EDEB379082EE2E8FD2E8690179" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_18A3BD91E222AFEC66598FD2E86A14AB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_9C2920EDEB379082EE2E8FD2E8690179" xlink:to="loc_us-gaap_StatementClassOfStockAxis_18A3BD91E222AFEC66598FD2E86A14AB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_18A3BD91E222AFEC66598FD2E86A14AB" xlink:to="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_18A3BD91E222AFEC66598FD2E86A14AB" xlink:to="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_0BE13482D837FBAC70B38FD2E86A090B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604" xlink:to="loc_hsy_HersheyCommonStockMember_0BE13482D837FBAC70B38FD2E86A090B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyTrustCompanyMember" xlink:label="loc_hsy_HersheyTrustCompanyMember_7267B15D0B6270A0438A8FD2E86A3A02" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_5ED40AB0B8C217B922D58FD2E86A1604" xlink:to="loc_hsy_HersheyTrustCompanyMember_7267B15D0B6270A0438A8FD2E86A3A02" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_F3BD379D618BD092F9B98FD2E86AC125" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_9C2920EDEB379082EE2E8FD2E8690179" xlink:to="loc_us-gaap_AwardTypeAxis_F3BD379D618BD092F9B98FD2E86AC125" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_38B33B100ECCFE5506FC8FD2E86A078A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_F3BD379D618BD092F9B98FD2E86AC125" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_38B33B100ECCFE5506FC8FD2E86A078A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_38B33B100ECCFE5506FC8FD2E86A078A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_F3BD379D618BD092F9B98FD2E86AC125" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_38B33B100ECCFE5506FC8FD2E86A078A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_883F9A79AE9F3CF55EFB8FD2E86A731E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_38B33B100ECCFE5506FC8FD2E86A078A" xlink:to="loc_us-gaap_EmployeeStockOptionMember_883F9A79AE9F3CF55EFB8FD2E86A731E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockSharesIssued" xlink:label="loc_us-gaap_CommonStockSharesIssued_F3603F216EA0A0728AE68FD2E86A6D80" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:to="loc_us-gaap_CommonStockSharesIssued_F3603F216EA0A0728AE68FD2E86A6D80" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockShares" xlink:label="loc_us-gaap_TreasuryStockShares_10EF08AFD7A350C85B5D8FD2E86A3D9A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:to="loc_us-gaap_TreasuryStockShares_10EF08AFD7A350C85B5D8FD2E86A3D9A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_TreasuryStockSharesRollForward" xlink:label="loc_hsy_TreasuryStockSharesRollForward_E4140C2BFD67265DBBB08FD2E86AE1EB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:to="loc_hsy_TreasuryStockSharesRollForward_E4140C2BFD67265DBBB08FD2E86AE1EB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShareRepurchaseProgramAbstract" xlink:label="loc_hsy_ShareRepurchaseProgramAbstract_463E62CDEA67FBDA76CF8FD2E86A598D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_hsy_TreasuryStockSharesRollForward_E4140C2BFD67265DBBB08FD2E86AE1EB" xlink:to="loc_hsy_ShareRepurchaseProgramAbstract_463E62CDEA67FBDA76CF8FD2E86A598D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_44BDDDE5FD97CE88A7659076514900D8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_hsy_ShareRepurchaseProgramAbstract_463E62CDEA67FBDA76CF8FD2E86A598D" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_44BDDDE5FD97CE88A7659076514900D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_14CCC0833BB31309EDA08FD2E86B8C1C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_hsy_TreasuryStockSharesRollForward_E4140C2BFD67265DBBB08FD2E86AE1EB" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_14CCC0833BB31309EDA08FD2E86B8C1C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_CF4EBFCFD364B42651BE8FD2E86B8B3A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_14CCC0833BB31309EDA08FD2E86B8C1C" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_CF4EBFCFD364B42651BE8FD2E86B8B3A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_9162B8F4075F309799AA8FD2E86B229A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_DFD663FD721E467A78D68FD2E86AB910" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_9162B8F4075F309799AA8FD2E86B229A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EquityAndNoncontrollingInterestTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurements" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_CDE74122F63B0FEFDD1B33C5594E627E" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_04EB61AC21E9B2DD3BF633C5594D02ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_CDE74122F63B0FEFDD1B33C5594E627E" xlink:to="loc_us-gaap_DerivativeTable_04EB61AC21E9B2DD3BF633C5594D02ED" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_19A537F99AF5BABB8B7533C5594D4DEE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_04EB61AC21E9B2DD3BF633C5594D02ED" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_19A537F99AF5BABB8B7533C5594D4DEE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_550DB8855673F4DC94E733C5594D1CDE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_19A537F99AF5BABB8B7533C5594D4DEE" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_550DB8855673F4DC94E733C5594D1CDE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_550DB8855673F4DC94E733C5594D1CDE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_19A537F99AF5BABB8B7533C5594D4DEE" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_550DB8855673F4DC94E733C5594D1CDE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_951BFAB13B34A843C08F33C5594D9912" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_550DB8855673F4DC94E733C5594D1CDE" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_951BFAB13B34A843C08F33C5594D9912" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_2DA69F605246C27520F133C5594E2AAC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_04EB61AC21E9B2DD3BF633C5594D02ED" xlink:to="loc_us-gaap_RestructuringPlanAxis_2DA69F605246C27520F133C5594E2AAC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_D1E93A5E329F88350E2433C5594E5B80_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_2DA69F605246C27520F133C5594E2AAC" xlink:to="loc_us-gaap_RestructuringPlanDomain_D1E93A5E329F88350E2433C5594E5B80_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_D1E93A5E329F88350E2433C5594E5B80" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_2DA69F605246C27520F133C5594E2AAC" xlink:to="loc_us-gaap_RestructuringPlanDomain_D1E93A5E329F88350E2433C5594E5B80" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_1B459CCFE740C6422BD733C5594E873D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_D1E93A5E329F88350E2433C5594E5B80" xlink:to="loc_hsy_MarginforGrowthProgramMember_1B459CCFE740C6422BD733C5594E873D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueNetAssetLiability" xlink:label="loc_us-gaap_FairValueNetAssetLiability_065D8C949FB8CA84B86433C5594EF363" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CDE74122F63B0FEFDD1B33C5594E627E" xlink:to="loc_us-gaap_FairValueNetAssetLiability_065D8C949FB8CA84B86433C5594EF363" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_11BD9FF4C7F83118CDE133C5594EC053" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CDE74122F63B0FEFDD1B33C5594E627E" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_11BD9FF4C7F83118CDE133C5594EC053" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfLongLivedAssetsHeldForUse" xlink:label="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_A668E35EE987B853FEDF33C5594ED9CC" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_CDE74122F63B0FEFDD1B33C5594E627E" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_A668E35EE987B853FEDF33C5594ED9CC" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_718525333B0C3021008532BF6358815A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByBalanceSheetGroupingTable" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_4668D1D57A7BAC191A7E32BF63580E20" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_718525333B0C3021008532BF6358815A" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_4668D1D57A7BAC191A7E32BF63580E20" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_68C29C75C1BBC18780B632BF6358F43E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_4668D1D57A7BAC191A7E32BF63580E20" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_68C29C75C1BBC18780B632BF6358F43E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_87838F69422F71E086CA32BF63585465_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_68C29C75C1BBC18780B632BF6358F43E" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_87838F69422F71E086CA32BF63585465_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_87838F69422F71E086CA32BF63585465" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_68C29C75C1BBC18780B632BF6358F43E" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_87838F69422F71E086CA32BF63585465" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_942C9159AAE67724E8BF32BF6358C1CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_87838F69422F71E086CA32BF63585465" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_942C9159AAE67724E8BF32BF6358C1CE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_F2E1E5D57B25C9C09B2E32BF6358513B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_4668D1D57A7BAC191A7E32BF63580E20" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_F2E1E5D57B25C9C09B2E32BF6358513B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_F2E1E5D57B25C9C09B2E32BF6358513B" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_F2E1E5D57B25C9C09B2E32BF6358513B" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:label="loc_us-gaap_ForeignExchangeContractMember_B39F2B3733643C120AAC32BF63581A94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:to="loc_us-gaap_ForeignExchangeContractMember_B39F2B3733643C120AAC32BF63581A94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestRateContractMember" xlink:label="loc_us-gaap_InterestRateContractMember_2A4BB492AA97B692134732BF6358274B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:to="loc_us-gaap_InterestRateContractMember_2A4BB492AA97B692134732BF6358274B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquitySwapMember" xlink:label="loc_us-gaap_EquitySwapMember_166FA5AD292369332FEB32BF6358EBE1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:to="loc_us-gaap_EquitySwapMember_166FA5AD292369332FEB32BF6358EBE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_CDBFF89EB277BAE234AA32BF63586E32" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_ADB220352E36E9B85B9B32BF63588E7B" xlink:to="loc_us-gaap_CommodityContractMember_CDBFF89EB277BAE234AA32BF63586E32" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_469CFB894598729D3B4132BF63584E00" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_4668D1D57A7BAC191A7E32BF63580E20" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_469CFB894598729D3B4132BF63584E00" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_469CFB894598729D3B4132BF63584E00" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_469CFB894598729D3B4132BF63584E00" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_2325C1B1EF2476E89FE332BF63583C93" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_2325C1B1EF2476E89FE332BF63583C93" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_0A4141C06F85E22461E232BF6358344F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_0A4141C06F85E22461E232BF6358344F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_1F10619839871C444AD332BF6358C469" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18E8D043E7FCCC14D1C432BF63584EB2" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_1F10619839871C444AD332BF6358C469" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeAssets" xlink:label="loc_us-gaap_DerivativeAssets_C9D5E522630E3750EDEC32BF635889C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_718525333B0C3021008532BF6358815A" xlink:to="loc_us-gaap_DerivativeAssets_C9D5E522630E3750EDEC32BF635889C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeLiabilities" xlink:label="loc_us-gaap_DerivativeLiabilities_857DA2754239342D44B832BF63581E3B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_718525333B0C3021008532BF6358815A" xlink:to="loc_us-gaap_DerivativeLiabilities_857DA2754239342D44B832BF63581E3B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfFairValuesAndCarryingValuesOfLongTermDebtDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_0B2113B4C44AF70D66AF32BF63589283" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_0B2113B4C44AF70D66AF32BF63589283" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_ECB5BB6668F4EB632AB632BF63587CD1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_0B2113B4C44AF70D66AF32BF63589283" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_ECB5BB6668F4EB632AB632BF63587CD1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_C20FA1B4B34DA7D92F5F32BF63585032_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_ECB5BB6668F4EB632AB632BF63587CD1" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_C20FA1B4B34DA7D92F5F32BF63585032_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_C20FA1B4B34DA7D92F5F32BF63585032" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_ECB5BB6668F4EB632AB632BF63587CD1" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_C20FA1B4B34DA7D92F5F32BF63585032" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_40C3BC756DDD4883FC9632BF63585EF1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_C20FA1B4B34DA7D92F5F32BF63585032" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_40C3BC756DDD4883FC9632BF63585EF1" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_LongtermDebtCurrentMaturitiesFairValue" xlink:label="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_9F53494D4D52CE19253132BF6358D297" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_9F53494D4D52CE19253132BF6358D297" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtCurrent" xlink:label="loc_us-gaap_LongTermDebtCurrent_B73A3650AAC4ED9C777D32BF63587328" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_us-gaap_LongTermDebtCurrent_B73A3650AAC4ED9C777D32BF63587328" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_LongtermDebtExcludingCurrentMaturitiesFairValue" xlink:label="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_12EBE8238CF0DF199C6C32BF6358F39C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_12EBE8238CF0DF199C6C32BF6358F39C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_B55A02A5DBE46AB8900732BF63589428" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_B55A02A5DBE46AB8900732BF63589428" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtFairValue" xlink:label="loc_us-gaap_LongTermDebtFairValue_574F4F28D2E510A4AD5232BF6358D46A" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_us-gaap_LongTermDebtFairValue_574F4F28D2E510A4AD5232BF6358D46A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_391EC63BFC167E4715CA32BF635813AC" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_E5DBBD393B740AC8B4FC32BF6358FD46" xlink:to="loc_us-gaap_LongTermDebt_391EC63BFC167E4715CA32BF635813AC" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsGoodwillAndIntangibleAssetsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillLineItems" xlink:label="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfGoodwillTable" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_1899AFF71666F4B6301BB46AE48B6AF3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_RestructuringPlanAxis_1899AFF71666F4B6301BB46AE48B6AF3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_66F46B517E0BE1FE1FC0B46AE48B4ADD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_1899AFF71666F4B6301BB46AE48B6AF3" xlink:to="loc_us-gaap_RestructuringPlanDomain_66F46B517E0BE1FE1FC0B46AE48B4ADD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_66F46B517E0BE1FE1FC0B46AE48B4ADD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_1899AFF71666F4B6301BB46AE48B6AF3" xlink:to="loc_us-gaap_RestructuringPlanDomain_66F46B517E0BE1FE1FC0B46AE48B4ADD" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_F81637FC9D479110BDC3B46AE48CF4D8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_66F46B517E0BE1FE1FC0B46AE48B4ADD" xlink:to="loc_hsy_MarginforGrowthProgramMember_F81637FC9D479110BDC3B46AE48CF4D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_309EB89A3D5F168080DAB46AE48C6D97" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_CreditFacilityAxis_309EB89A3D5F168080DAB46AE48C6D97" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_62C37B6C067BFFF9886AB46AE48C9D00_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_309EB89A3D5F168080DAB46AE48C6D97" xlink:to="loc_us-gaap_CreditFacilityDomain_62C37B6C067BFFF9886AB46AE48C9D00_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_62C37B6C067BFFF9886AB46AE48C9D00" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_309EB89A3D5F168080DAB46AE48C6D97" xlink:to="loc_us-gaap_CreditFacilityDomain_62C37B6C067BFFF9886AB46AE48C9D00" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_81865A4232FAEC5E2605B46AE48C1B36" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_81865A4232FAEC5E2605B46AE48C1B36" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_5CBDCB56CCBEB1778A71B46AE48CAEE5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_81865A4232FAEC5E2605B46AE48C1B36" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_5CBDCB56CCBEB1778A71B46AE48CAEE5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_5CBDCB56CCBEB1778A71B46AE48CAEE5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_81865A4232FAEC5E2605B46AE48C1B36" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_5CBDCB56CCBEB1778A71B46AE48CAEE5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_E62D1213C0E4BE29AFA4B46AE48CF22C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_E62D1213C0E4BE29AFA4B46AE48CF22C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9F0F42CBC17B34C536A2B46AE48C6335_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_E62D1213C0E4BE29AFA4B46AE48CF22C" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9F0F42CBC17B34C536A2B46AE48C6335_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9F0F42CBC17B34C536A2B46AE48C6335" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_E62D1213C0E4BE29AFA4B46AE48CF22C" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9F0F42CBC17B34C536A2B46AE48C6335" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member" xlink:label="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_F0F227A4DDBD850612BAB46AE48D3016" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9F0F42CBC17B34C536A2B46AE48C6335" xlink:to="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_F0F227A4DDBD850612BAB46AE48D3016" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_85F11DF71AEB9F413104B46AE48D321B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_ConsolidationItemsAxis_85F11DF71AEB9F413104B46AE48D321B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_22DBF4D6E4466174A71CB46AE48DD684_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_85F11DF71AEB9F413104B46AE48D321B" xlink:to="loc_us-gaap_ConsolidationItemsDomain_22DBF4D6E4466174A71CB46AE48DD684_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_22DBF4D6E4466174A71CB46AE48DD684" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_85F11DF71AEB9F413104B46AE48D321B" xlink:to="loc_us-gaap_ConsolidationItemsDomain_22DBF4D6E4466174A71CB46AE48DD684" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_DAC013440656B547B4F0B46AE48D0129" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_22DBF4D6E4466174A71CB46AE48DD684" xlink:to="loc_us-gaap_OperatingSegmentsMember_DAC013440656B547B4F0B46AE48D0129" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_86863912E0FD87679434B46AE48D4566" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_86863912E0FD87679434B46AE48D4566" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_9B70001748852D86156CB46AE48D17C4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_86863912E0FD87679434B46AE48D4566" xlink:to="loc_us-gaap_SegmentDomain_9B70001748852D86156CB46AE48D17C4_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_9B70001748852D86156CB46AE48D17C4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_86863912E0FD87679434B46AE48D4566" xlink:to="loc_us-gaap_SegmentDomain_9B70001748852D86156CB46AE48D17C4" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_7C8DAA3778B57FCBD1CEB46AE48D8DD0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9B70001748852D86156CB46AE48D17C4" xlink:to="loc_hsy_InternationalandOtherSegmentMember_7C8DAA3778B57FCBD1CEB46AE48D8DD0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementGeographicalAxis" xlink:label="loc_us-gaap_StatementGeographicalAxis_7CBA8B9B13EC51EF764CB46AE48D2083" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_EF4D160EE7FED1DB9E0FB46AE48B9FC0" xlink:to="loc_us-gaap_StatementGeographicalAxis_7CBA8B9B13EC51EF764CB46AE48D2083" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_7FB9582B8DC05915F7F5B46AE48D00BE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementGeographicalAxis_7CBA8B9B13EC51EF764CB46AE48D2083" xlink:to="loc_us-gaap_SegmentGeographicalDomain_7FB9582B8DC05915F7F5B46AE48D00BE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_7FB9582B8DC05915F7F5B46AE48D00BE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementGeographicalAxis_7CBA8B9B13EC51EF764CB46AE48D2083" xlink:to="loc_us-gaap_SegmentGeographicalDomain_7FB9582B8DC05915F7F5B46AE48D00BE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_CN" xlink:label="loc_country_CN_B3093F9B0A34FB5F7BCFB46AE48D30C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_7FB9582B8DC05915F7F5B46AE48D00BE" xlink:to="loc_country_CN_B3093F9B0A34FB5F7BCFB46AE48D30C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_26A7CE752A1AE5A89E93B46AE48D724D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_26A7CE752A1AE5A89E93B46AE48D724D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_83931D4329570B239BCBB46AE48D7EBF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_83931D4329570B239BCBB46AE48D7EBF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_0D3396A29774D0B6D77BB46AE48E1845" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_0D3396A29774D0B6D77BB46AE48E1845" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_8B6606D0C54F9B756AC5B46AE48E3BDD" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_Goodwill_8B6606D0C54F9B756AC5B46AE48E3BDD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_856A6B6EEBF70705C6F7B46AE48EA66D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_856A6B6EEBF70705C6F7B46AE48EA66D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AmortizationOfIntangibleAssets" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_7F207BF465CD811FCA56B46AE48E9383" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_34C7A0285F64E148D4B5B46AE48D3294" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_7F207BF465CD811FCA56B46AE48E9383" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfAmortizationExpenseForNextFiveYearsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfChangesInCarryingValueOfGoodwillByReportableSegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillLineItems" xlink:label="loc_us-gaap_GoodwillLineItems_43CE0825DFA237FBA65B8FD2EB70D07B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfGoodwillTable" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_E7FEF0EEA286B8C58FDD8FD2EB6FE110" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_43CE0825DFA237FBA65B8FD2EB70D07B" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_E7FEF0EEA286B8C58FDD8FD2EB6FE110" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_A7F96EBE79F2BAFFCE778FD2EB6F00E6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_E7FEF0EEA286B8C58FDD8FD2EB6FE110" xlink:to="loc_us-gaap_ConsolidationItemsAxis_A7F96EBE79F2BAFFCE778FD2EB6F00E6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_263B7FFE377A89561B2E8FD2EB70EC49_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_A7F96EBE79F2BAFFCE778FD2EB6F00E6" xlink:to="loc_us-gaap_ConsolidationItemsDomain_263B7FFE377A89561B2E8FD2EB70EC49_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_263B7FFE377A89561B2E8FD2EB70EC49" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_A7F96EBE79F2BAFFCE778FD2EB6F00E6" xlink:to="loc_us-gaap_ConsolidationItemsDomain_263B7FFE377A89561B2E8FD2EB70EC49" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_48E1878AC122148FC91F8FD2EB70588E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_263B7FFE377A89561B2E8FD2EB70EC49" xlink:to="loc_us-gaap_OperatingSegmentsMember_48E1878AC122148FC91F8FD2EB70588E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_676C42F96DF9673845ED8FD2EB7085AF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_E7FEF0EEA286B8C58FDD8FD2EB6FE110" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_676C42F96DF9673845ED8FD2EB7085AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_676C42F96DF9673845ED8FD2EB7085AF" xlink:to="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_676C42F96DF9673845ED8FD2EB7085AF" xlink:to="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_3E9A2A6115B78583B2438FD2EB70E666" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27" xlink:to="loc_hsy_NorthAmericaSegmentMember_3E9A2A6115B78583B2438FD2EB70E666" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_58644122CE32C373C1A98FD2EB7092C7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_0D44E125FC173F4015338FD2EB705F27" xlink:to="loc_hsy_InternationalandOtherSegmentMember_58644122CE32C373C1A98FD2EB7092C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillGross" xlink:label="loc_us-gaap_GoodwillGross_F15C14296D14DC2407A78FD2EB709AEE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_43CE0825DFA237FBA65B8FD2EB70D07B" xlink:to="loc_us-gaap_GoodwillGross_F15C14296D14DC2407A78FD2EB709AEE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_14213AD0D169915FFD498FD2EB70797A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_43CE0825DFA237FBA65B8FD2EB70D07B" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_14213AD0D169915FFD498FD2EB70797A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillRollForward" xlink:label="loc_us-gaap_GoodwillRollForward_4BB8B9DE7C88E6C81AE58FD2EB70197F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_43CE0825DFA237FBA65B8FD2EB70D07B" xlink:to="loc_us-gaap_GoodwillRollForward_4BB8B9DE7C88E6C81AE58FD2EB70197F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_423FE4260A418476D9668FD2EB70FFFC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_4BB8B9DE7C88E6C81AE58FD2EB70197F" xlink:to="loc_us-gaap_Goodwill_423FE4260A418476D9668FD2EB70FFFC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillAcquiredDuringPeriod" xlink:label="loc_us-gaap_GoodwillAcquiredDuringPeriod_18CB6D6F1B4358E4C2178FD2EB70A4F2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_4BB8B9DE7C88E6C81AE58FD2EB70197F" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_18CB6D6F1B4358E4C2178FD2EB70A4F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillForeignCurrencyTranslationGainLoss" xlink:label="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_48FB14152C49D43D0FF28FE9B9D932D6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_4BB8B9DE7C88E6C81AE58FD2EB70197F" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_48FB14152C49D43D0FF28FE9B9D932D6" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfGrossCarryingAmountAndAccumulatedAmortizationForEachMajorClassOfIntangibleAssetDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_701B3C0715232D19C20832BF63A79D98" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_701B3C0715232D19C20832BF63A79D98" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BE2B46B4F0851A4C1DE832BF63A76861" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_701B3C0715232D19C20832BF63A79D98" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BE2B46B4F0851A4C1DE832BF63A76861" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BE2B46B4F0851A4C1DE832BF63A76861" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BE2B46B4F0851A4C1DE832BF63A76861" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_38CE467AF9121CEE508332BF63A7F94C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E" xlink:to="loc_us-gaap_TrademarksMember_38CE467AF9121CEE508332BF63A7F94C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerRelatedIntangibleAssetsMember" xlink:label="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_A2A2C41635F58D78E91032BF63A724CA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E" xlink:to="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_A2A2C41635F58D78E91032BF63A724CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PatentsMember" xlink:label="loc_us-gaap_PatentsMember_9C365CD15D0352323F0F32BF63A7900A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_7EE10224351FF5A7A90132BF63A7450E" xlink:to="loc_us-gaap_PatentsMember_9C365CD15D0352323F0F32BF63A7900A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_FD1F38CA97EE38D6CC6B32BF63A7FE89" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_701B3C0715232D19C20832BF63A79D98" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_FD1F38CA97EE38D6CC6B32BF63A7FE89" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_742F331D867BBCD8286532BF63A79D15_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_FD1F38CA97EE38D6CC6B32BF63A7FE89" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_742F331D867BBCD8286532BF63A79D15_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_742F331D867BBCD8286532BF63A79D15" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_FD1F38CA97EE38D6CC6B32BF63A7FE89" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_742F331D867BBCD8286532BF63A79D15" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_F353C25E5F66E9D5ACC932BF63A7C597" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_742F331D867BBCD8286532BF63A79D15" xlink:to="loc_us-gaap_TrademarksMember_F353C25E5F66E9D5ACC932BF63A7C597" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_1744A9B819F49C3B8B7132BF63A7CA42" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_1744A9B819F49C3B8B7132BF63A7CA42" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_8675FF5E4E53E17611CA32BF63A72107" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_8675FF5E4E53E17611CA32BF63A72107" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_EE06005B7C1E468CAF7232BF63A7C19C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_EE06005B7C1E468CAF7232BF63A7C19C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_6E33A75FFBABB615E19632BF63A73E51" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_7603867143CB892C186432BF63A70372" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_6E33A75FFBABB615E19632BF63A73E51" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxes" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesIncomeTaxesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxContingencyLineItems" xlink:label="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxContingencyTable" xlink:label="loc_us-gaap_IncomeTaxContingencyTable_74B1FFB2DAECEF9A55BE9A5AD1397B4E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_IncomeTaxContingencyTable_74B1FFB2DAECEF9A55BE9A5AD1397B4E" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_F95BA5DEBC715792798B9A5AD1394646" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_74B1FFB2DAECEF9A55BE9A5AD1397B4E" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_F95BA5DEBC715792798B9A5AD1394646" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_51C741AB5E1BB94999599A5AD139D3E5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_F95BA5DEBC715792798B9A5AD1394646" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_51C741AB5E1BB94999599A5AD139D3E5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_51C741AB5E1BB94999599A5AD139D3E5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_F95BA5DEBC715792798B9A5AD1394646" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_51C741AB5E1BB94999599A5AD139D3E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpenseMember" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpenseMember_2F079EADB2D73331E5149A5AD1390CA0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_51C741AB5E1BB94999599A5AD139D3E5" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpenseMember_2F079EADB2D73331E5149A5AD1390CA0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:label="loc_us-gaap_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_A4446FA11AD8057F2BC09A5AD139D409" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_74B1FFB2DAECEF9A55BE9A5AD1397B4E" xlink:to="loc_us-gaap_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_A4446FA11AD8057F2BC09A5AD139D409" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityMethodInvesteeNameDomain" xlink:label="loc_us-gaap_EquityMethodInvesteeNameDomain_42BCDA6897C3EE3A34669A5AD1391A71_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_A4446FA11AD8057F2BC09A5AD139D409" xlink:to="loc_us-gaap_EquityMethodInvesteeNameDomain_42BCDA6897C3EE3A34669A5AD1391A71_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityMethodInvesteeNameDomain" xlink:label="loc_us-gaap_EquityMethodInvesteeNameDomain_42BCDA6897C3EE3A34669A5AD1391A71" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis_A4446FA11AD8057F2BC09A5AD139D409" xlink:to="loc_us-gaap_EquityMethodInvesteeNameDomain_42BCDA6897C3EE3A34669A5AD1391A71" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PartnershipsQualifyingForTaxCreditsMember" xlink:label="loc_hsy_PartnershipsQualifyingForTaxCreditsMember_28C66173C4926610AAD29A5AD1393BE0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityMethodInvesteeNameDomain_42BCDA6897C3EE3A34669A5AD1391A71" xlink:to="loc_hsy_PartnershipsQualifyingForTaxCreditsMember_28C66173C4926610AAD29A5AD1393BE0" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit" xlink:label="loc_hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit_EB66C26AEF15F9EF028D9A5AD1396B89" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit_EB66C26AEF15F9EF028D9A5AD1396B89" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsThatWouldImpactEffectiveTaxRate" xlink:label="loc_us-gaap_UnrecognizedTaxBenefitsThatWouldImpactEffectiveTaxRate_A46370F3E0E1B4C02E539A5AD139D0E0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_UnrecognizedTaxBenefitsThatWouldImpactEffectiveTaxRate_A46370F3E0E1B4C02E539A5AD139D0E0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense" xlink:label="loc_us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense_7D9BA875D464D3B5F99B9A5AD139559B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense_7D9BA875D464D3B5F99B9A5AD139559B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued" xlink:label="loc_us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued_2B10B932238268856F099A5AD1395D10" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued_2B10B932238268856F099A5AD1395D10" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SignificantChangeInUnrecognizedTaxBenefitsIsReasonablyPossibleAmountOfUnrecordedBenefit" xlink:label="loc_us-gaap_SignificantChangeInUnrecognizedTaxBenefitsIsReasonablyPossibleAmountOfUnrecordedBenefit_044804F1079800579DCD9A5AD13954B9" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_SignificantChangeInUnrecognizedTaxBenefitsIsReasonablyPossibleAmountOfUnrecordedBenefit_044804F1079800579DCD9A5AD13954B9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UndistributedEarningsOfForeignSubsidiaries" xlink:label="loc_us-gaap_UndistributedEarningsOfForeignSubsidiaries_4C5D59FED5B3E23B8F879A5AD1396BFC" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_UndistributedEarningsOfForeignSubsidiaries_4C5D59FED5B3E23B8F879A5AD1396BFC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxCreditsAndAdjustments" xlink:label="loc_us-gaap_IncomeTaxCreditsAndAdjustments_49E65F2D49E509768BCE9A5AD139C4C6" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_IncomeTaxCreditsAndAdjustments_49E65F2D49E509768BCE9A5AD139C4C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_199F2093D502925ED1B49A5AD139EB43" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_99C427A09F9054ADDD749A5AD1399052" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_199F2093D502925ED1B49A5AD139EB43" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesScheduleOfComponentsOfIncomeTaxExpenseBenefitDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesScheduleOfDeferredTaxAssetAndLiabilitiesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesScheduleOfEffectiveIncomeTaxRateReconciliationDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesScheduleOfIncomeLossBeforeTaxesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesScheduleOfUnrecognizedTaxBenefitsRollForwardDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/IncomeTaxesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNet" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNetTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/OtherIncomeExpenseNetScheduleOfOtherIncomeAndExpenseNetDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_5CD90B5E58B55D5A4CCF758D93FB76B8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_5CD90B5E58B55D5A4CCF758D93FB76B8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BFB2918988C234E94FDD758D93FB5580" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_5CD90B5E58B55D5A4CCF758D93FB76B8" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BFB2918988C234E94FDD758D93FB5580" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_C3D06874F86AC2827091758D93FB72CA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BFB2918988C234E94FDD758D93FB5580" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_C3D06874F86AC2827091758D93FB72CA_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_C3D06874F86AC2827091758D93FB72CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_BFB2918988C234E94FDD758D93FB5580" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_C3D06874F86AC2827091758D93FB72CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_3DCD410BF8FBC9909653758D93FB7B4E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_C3D06874F86AC2827091758D93FB72CA" xlink:to="loc_us-gaap_TrademarksMember_3DCD410BF8FBC9909653758D93FB7B4E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_5258CFC724C931351075758D93FB5F48" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_5CD90B5E58B55D5A4CCF758D93FB76B8" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_5258CFC724C931351075758D93FB5F48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_5258CFC724C931351075758D93FB5F48" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_5258CFC724C931351075758D93FB5F48" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member" xlink:label="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_8B316BE84EB07259C423758D93FC7123" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7" xlink:to="loc_hsy_ShanghaiGoldenMonkeyFoodJointStockCo.Ltd.Member_8B316BE84EB07259C423758D93FC7123" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_LotteShanghaiFoodCompanyMember" xlink:label="loc_hsy_LotteShanghaiFoodCompanyMember_38BFBC0B7E8857BB3002758D93FCE06E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_9DCA6A7C6A619370C563758D93FB06F7" xlink:to="loc_hsy_LotteShanghaiFoodCompanyMember_38BFBC0B7E8857BB3002758D93FCE06E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment" xlink:label="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_A9C77B5BB7823F87EEF4758D93FC3E5D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_us-gaap_EquityMethodInvestmentOtherThanTemporaryImpairment_A9C77B5BB7823F87EEF4758D93FC3E5D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount" xlink:label="loc_us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount_D64C869B3769AC82426975F7874EE1D4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_us-gaap_BusinessCombinationBargainPurchaseGainRecognizedAmount_D64C869B3769AC82426975F7874EE1D4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GainLossOnDispositionOfIntangibleAssets" xlink:label="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_4CEE9F67BF12A1306B32758D93FCFA74" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_4CEE9F67BF12A1306B32758D93FCFA74" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_OtherNonoperatingGainLoss" xlink:label="loc_hsy_OtherNonoperatingGainLoss_C898324E0F89D529E24C758D93FCEAD3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_hsy_OtherNonoperatingGainLoss_C898324E0F89D529E24C758D93FCEAD3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_F30C874EB99AA9763D0F758D93FC98B3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_8E2A76DF04228A65AE77758D93FC8A3B" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_F30C874EB99AA9763D0F758D93FC98B3" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlans" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansPensionAndOtherPostRetirementBenefitPlansNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_E442275E2EA07C4B9A1F8FD2EA8D4180" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:to="loc_us-gaap_RangeAxis_E442275E2EA07C4B9A1F8FD2EA8D4180" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_E442275E2EA07C4B9A1F8FD2EA8D4180" xlink:to="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_E442275E2EA07C4B9A1F8FD2EA8D4180" xlink:to="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_FD844CE92599527F2E278FD2EA8DA08C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9" xlink:to="loc_us-gaap_MinimumMember_FD844CE92599527F2E278FD2EA8DA08C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_395AC423AFA9BB4D56718FD2EA8D6AAF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_DCAC9AEC950E72AE47268FD2EA8D81F9" xlink:to="loc_us-gaap_MaximumMember_395AC423AFA9BB4D56718FD2EA8D6AAF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_E1519B7D2CC1B1459C308FD2EA8D495E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_E1519B7D2CC1B1459C308FD2EA8D495E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_E1519B7D2CC1B1459C308FD2EA8D495E" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_E1519B7D2CC1B1459C308FD2EA8D495E" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_52065DCA0D054749E36E8FD2EA8D1154" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_52065DCA0D054749E36E8FD2EA8D1154" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SupplementalEmployeeRetirementPlanDefinedBenefitMember" xlink:label="loc_us-gaap_SupplementalEmployeeRetirementPlanDefinedBenefitMember_0BCC2573B8B35277A4468FD2EA8DC962" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9" xlink:to="loc_us-gaap_SupplementalEmployeeRetirementPlanDefinedBenefitMember_0BCC2573B8B35277A4468FD2EA8DC962" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_EC9F4F4E669089A6304A8FD2EA8D6F03" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_E1773CC617478D30148B8FD2EA8DB0B9" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_EC9F4F4E669089A6304A8FD2EA8D6F03" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_201D983C2C12DF8445318FD2EA8D4E62" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:to="loc_us-gaap_StatementScenarioAxis_201D983C2C12DF8445318FD2EA8D4E62" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_201D983C2C12DF8445318FD2EA8D4E62" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_201D983C2C12DF8445318FD2EA8D4E62" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProFormaMember" xlink:label="loc_us-gaap_ProFormaMember_95A2951C7102149CC9788FD2EA8E9989" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A" xlink:to="loc_us-gaap_ProFormaMember_95A2951C7102149CC9788FD2EA8E9989" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioForecastMember" xlink:label="loc_us-gaap_ScenarioForecastMember_5BE48DE40453A17D22828FD2EA8EC68C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_6CE8A4A99CEF05A8A5F78FD2EA8E0C0A" xlink:to="loc_us-gaap_ScenarioForecastMember_5BE48DE40453A17D22828FD2EA8EC68C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanFundingStatusAxis" xlink:label="loc_us-gaap_RetirementPlanFundingStatusAxis_DBFE92C06257396FF9E28FD2EA8EC9B3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:to="loc_us-gaap_RetirementPlanFundingStatusAxis_DBFE92C06257396FF9E28FD2EA8EC9B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanFundingStatusDomain" xlink:label="loc_us-gaap_RetirementPlanFundingStatusDomain_3D5132538658A2F007578FD2EA8E2259_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanFundingStatusAxis_DBFE92C06257396FF9E28FD2EA8EC9B3" xlink:to="loc_us-gaap_RetirementPlanFundingStatusDomain_3D5132538658A2F007578FD2EA8E2259_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanFundingStatusDomain" xlink:label="loc_us-gaap_RetirementPlanFundingStatusDomain_3D5132538658A2F007578FD2EA8E2259" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanFundingStatusAxis_DBFE92C06257396FF9E28FD2EA8EC9B3" xlink:to="loc_us-gaap_RetirementPlanFundingStatusDomain_3D5132538658A2F007578FD2EA8E2259" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnfundedPlanMember" xlink:label="loc_us-gaap_UnfundedPlanMember_970BBDC57D031218F2398FD2EA8EE9A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanFundingStatusDomain_3D5132538658A2F007578FD2EA8E2259" xlink:to="loc_us-gaap_UnfundedPlanMember_970BBDC57D031218F2398FD2EA8EE9A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanNameAxis" xlink:label="loc_us-gaap_RetirementPlanNameAxis_FCC2FC0E34F954055A708FD2EA8E1D83" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8F3DC47630D067552C748FD2EA8DD31C" xlink:to="loc_us-gaap_RetirementPlanNameAxis_FCC2FC0E34F954055A708FD2EA8E1D83" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanNameDomain" xlink:label="loc_us-gaap_RetirementPlanNameDomain_E7C5C9FB3E6A7D7C310D8FD2EA8E2CF2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanNameAxis_FCC2FC0E34F954055A708FD2EA8E1D83" xlink:to="loc_us-gaap_RetirementPlanNameDomain_E7C5C9FB3E6A7D7C310D8FD2EA8E2CF2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanNameDomain" xlink:label="loc_us-gaap_RetirementPlanNameDomain_E7C5C9FB3E6A7D7C310D8FD2EA8E2CF2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanNameAxis_FCC2FC0E34F954055A708FD2EA8E1D83" xlink:to="loc_us-gaap_RetirementPlanNameDomain_E7C5C9FB3E6A7D7C310D8FD2EA8E2CF2" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCompanyPuertoRicoHourlyPensionPlanMember" xlink:label="loc_hsy_HersheyCompanyPuertoRicoHourlyPensionPlanMember_3B811B92AE5DB201599A8FD2EA8E6554" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanNameDomain_E7C5C9FB3E6A7D7C310D8FD2EA8E2CF2" xlink:to="loc_hsy_HersheyCompanyPuertoRicoHourlyPensionPlanMember_3B811B92AE5DB201599A8FD2EA8E6554" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NumberofDefinedBenefitOtherPostretirementPlansandDefinedContributionOtherPostretirementPlans" xlink:label="loc_hsy_NumberofDefinedBenefitOtherPostretirementPlansandDefinedContributionOtherPostretirementPlans_BF6370D57C6C493CCB798FD2EA8E58A4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_hsy_NumberofDefinedBenefitOtherPostretirementPlansandDefinedContributionOtherPostretirementPlans_BF6370D57C6C493CCB798FD2EA8E58A4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation_06171DFF31AAE396FA408FD2EA8F1523" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation_06171DFF31AAE396FA408FD2EA8F1523" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Definedbenefitplaneffectofchangeininterestmethodonserviceandinterestcostcomponents" xlink:label="loc_hsy_Definedbenefitplaneffectofchangeininterestmethodonserviceandinterestcostcomponents_4D98F7D71263C8945BAB9060303CF2E0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_hsy_Definedbenefitplaneffectofchangeininterestmethodonserviceandinterestcostcomponents_4D98F7D71263C8945BAB9060303CF2E0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear" xlink:label="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_40627DC6854B0E39907B906888370905" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_40627DC6854B0E39907B906888370905" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1" xlink:label="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_5BBC11E5744424C9B6478FD2EA8F650F" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_5BBC11E5744424C9B6478FD2EA8F650F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_B49CDA1ADAA4195371148FD2EA8F819F" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_B49CDA1ADAA4195371148FD2EA8F819F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DefinedBenefitPlansMinimumFutureEmployerContributionsinNextFiscalYear" xlink:label="loc_hsy_DefinedBenefitPlansMinimumFutureEmployerContributionsinNextFiscalYear_8D334D9B793A60EA87138FD2EA8F2558" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_hsy_DefinedBenefitPlansMinimumFutureEmployerContributionsinNextFiscalYear_8D334D9B793A60EA87138FD2EA8F2558" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedContributionPlanCostRecognized" xlink:label="loc_us-gaap_DefinedContributionPlanCostRecognized_41AC3D0ED4D1D33B2CC18FD2EA8F2E66" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_A9953396ED5A54B6C5EC8FD2EA8EE4E9" xlink:to="loc_us-gaap_DefinedContributionPlanCostRecognized_41AC3D0ED4D1D33B2CC18FD2EA8F2E66" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfAccumulatedBenefitObligationsInExcessOfPlanAssetsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfAmountsExpectedToBeAmortizedFromAociIntoNetPeriodicBenefitDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_802638F0BD08DF78933632BECCA2D25F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_C209EF7DBDC9EBA275F232BECCA22DDB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_802638F0BD08DF78933632BECCA2D25F" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_C209EF7DBDC9EBA275F232BECCA22DDB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_FF43F9DCD8F5B89FB56B32BECCA20A7F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_C209EF7DBDC9EBA275F232BECCA22DDB" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_FF43F9DCD8F5B89FB56B32BECCA20A7F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_FF43F9DCD8F5B89FB56B32BECCA20A7F" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_FF43F9DCD8F5B89FB56B32BECCA20A7F" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_D39488F84F5DE29D853A32BECCA2D969" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_D39488F84F5DE29D853A32BECCA2D969" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_1C781ABB76F9FAA977F332BECCA20516" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8BFA545D751C240D563D32BECCA2356D" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_1C781ABB76F9FAA977F332BECCA20516" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedAmortizationOfGainLossNextFiscalYear" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedAmortizationOfGainLossNextFiscalYear_ED154600E4E9DD4240AD32BECCA2017C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_802638F0BD08DF78933632BECCA2D25F" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedAmortizationOfGainLossNextFiscalYear_ED154600E4E9DD4240AD32BECCA2017C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedAmortizationOfPriorServiceCostCreditNextFiscalYear" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedAmortizationOfPriorServiceCostCreditNextFiscalYear_C2FC6CBAC6B14039467032BECCA2B48F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_802638F0BD08DF78933632BECCA2D25F" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedAmortizationOfPriorServiceCostCreditNextFiscalYear_C2FC6CBAC6B14039467032BECCA2B48F" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfComponentsOfNetPeriodicBenefitCostDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3553033333A18C1E566432BF6318D9D2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8AD778AB83099A549DEB32BF6318CA15" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3553033333A18C1E566432BF6318D9D2" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8AD778AB83099A549DEB32BF6318CA15" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_70982C3787628A1E3FEA32BF6318851B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8AD778AB83099A549DEB32BF6318CA15" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_70982C3787628A1E3FEA32BF6318851B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_70982C3787628A1E3FEA32BF6318851B" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_70982C3787628A1E3FEA32BF6318851B" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_01A85CA4F706F55CD44532BF6318D900" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_01A85CA4F706F55CD44532BF6318D900" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_A0842F45FE129AA3DAC332BF631839B1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_515267FA812A4311624332BF63181C22" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_A0842F45FE129AA3DAC332BF631839B1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3553033333A18C1E566432BF6318D9D2" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_1BB5EB95C04732E6429D32BF631868A2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_1BB5EB95C04732E6429D32BF631868A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_7B1C7F9446E2E7C413DC32BF6318C554" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_7B1C7F9446E2E7C413DC32BF6318C554" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_C3274EF4DED5FC90002C32BF6318430E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_C3274EF4DED5FC90002C32BF6318430E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_D4CEFEC4F405651CAD9532BF6318C130" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_D4CEFEC4F405651CAD9532BF6318C130" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_A936ADE3D3B3565F497E32BF631812FD" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_A936ADE3D3B3565F497E32BF631812FD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments_8E323E7375EDA94A57FD32BF631895F0" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToCurtailments_8E323E7375EDA94A57FD32BF631895F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_14DC737F2D2F3F338D5D32BF63188A28" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_14DC737F2D2F3F338D5D32BF63188A28" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_EFD2F3EA89FBB455CC6832BF631880F0" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_0958203348785FAD81DC32BF63182002" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_EFD2F3EA89FBB455CC6832BF631880F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract_F0C0D5F2140D097068A632BF63183388" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3553033333A18C1E566432BF6318D9D2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract_F0C0D5F2140D097068A632BF63183388" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_0F4430CBDB7D665A2ECC32BF631872E7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract_F0C0D5F2140D097068A632BF63183388" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeLossNetGainLossBeforeTax_0F4430CBDB7D665A2ECC32BF631872E7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_7A5074C461F34A0187F032BF6318CCD2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract_F0C0D5F2140D097068A632BF63183388" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_7A5074C461F34A0187F032BF6318CCD2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_A8B39A9DFEB2EB94F7AD32BF6318C3B9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentBeforeTaxPeriodIncreaseDecreaseAbstract_F0C0D5F2140D097068A632BF63183388" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeTax_A8B39A9DFEB2EB94F7AD32BF6318C3B9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax" xlink:label="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_DF05E948A4F8AFA78A4532BF6318840D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3553033333A18C1E566432BF6318D9D2" xlink:to="loc_us-gaap_AmountRecognizedInNetPeriodicBenefitCostAndOtherComprehensiveIncomeLossBeforeTax_DF05E948A4F8AFA78A4532BF6318840D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfDefinedBenefitObligationsPlanAssetsAndFundedStatusDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1944DC137E37CB76751357BFE796F288" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1944DC137E37CB76751357BFE796F288" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_EFABFB987CA5D83AA7C757BFE796275E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1944DC137E37CB76751357BFE796F288" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_EFABFB987CA5D83AA7C757BFE796275E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_EFABFB987CA5D83AA7C757BFE796275E" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_EFABFB987CA5D83AA7C757BFE796275E" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_7AEB422E3E0CC22B6ACA57BFE796886D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_7AEB422E3E0CC22B6ACA57BFE796886D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_C38BC49AFA775FD872B757BFE7960FDA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_0C8B4B447B0A88543ABC57BFE796803E" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_C38BC49AFA775FD872B757BFE7960FDA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward" xlink:label="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanBenefitObligation" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_B8AF7D8244FE267EA05C57BFE7969D35" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_B8AF7D8244FE267EA05C57BFE7969D35" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_A9160B041971FB0B0BB757BFE7960008" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_A9160B041971FB0B0BB757BFE7960008" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_CA3378AF042FC779049C57BFE796322F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_CA3378AF042FC779049C57BFE796322F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanPlanAmendments" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAmendments_22C6AC27F4F5ADCD905357BFE79603D5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAmendments_22C6AC27F4F5ADCD905357BFE79603D5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanActuarialGainLoss" xlink:label="loc_us-gaap_DefinedBenefitPlanActuarialGainLoss_1BD26054010B8B3FC7E757BFE796E6F3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanActuarialGainLoss_1BD26054010B8B3FC7E757BFE796E6F3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanSettlementsBenefitObligation" xlink:label="loc_us-gaap_DefinedBenefitPlanSettlementsBenefitObligation_BC6B473D2DEF0458071F57BFE796FD4F" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanSettlementsBenefitObligation_BC6B473D2DEF0458071F57BFE796FD4F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanForeignCurrencyExchangeRateChangesBenefitObligation" xlink:label="loc_us-gaap_DefinedBenefitPlanForeignCurrencyExchangeRateChangesBenefitObligation_720580BFA052212FBE6157BFE7961962" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanForeignCurrencyExchangeRateChangesBenefitObligation_720580BFA052212FBE6157BFE7961962" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid_DC3BD2E6ACF29AC1EA5157BFE79635DA" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_CC66C6F2006AD5AAEE0157BFE7964177" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid_DC3BD2E6ACF29AC1EA5157BFE79635DA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward" xlink:label="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_40F4EC1FE617F4981E5057BFE796CF0A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_40F4EC1FE617F4981E5057BFE796CF0A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets_8B6AE2128E8BFB28B4B157BFE7968EDE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets_8B6AE2128E8BFB28B4B157BFE7968EDE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_5F0AA15418DE20F6C2DD57BFE7962821" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_5F0AA15418DE20F6C2DD57BFE7962821" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanSettlementsPlanAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanSettlementsPlanAssets_502E0B80AC423797DDB357BFE7966D10" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanSettlementsPlanAssets_502E0B80AC423797DDB357BFE7966D10" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanPlanAssetsForeignCurrencyTranslationGainLoss" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsForeignCurrencyTranslationGainLoss_8D2CCC19D42D61275B1457BFE796822A" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsForeignCurrencyTranslationGainLoss_8D2CCC19D42D61275B1457BFE796822A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid_0E38DA1F0E97EBE2D76F57BFE796AF4A" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_CB62798EDA7694DD333857BFE79625B5" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid_0E38DA1F0E97EBE2D76F57BFE796AF4A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanFundedStatusOfPlan" xlink:label="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_0A2BE743E3F3540C57E657BFE796C665" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_0A2BE743E3F3540C57E657BFE796C665" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent" xlink:label="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_A1F6216E33BEEDE4CDCF57BFE796F004" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:to="loc_us-gaap_DefinedBenefitPlanAssetsForPlanBenefitsNoncurrent_A1F6216E33BEEDE4CDCF57BFE796F004" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_524C79A3DCC3AFC3E49F57BFE79693E8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansCurrentLiabilities_524C79A3DCC3AFC3E49F57BFE79693E8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent" xlink:label="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_B8FBF9D107A0B8A731BE57BFE7964312" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:to="loc_us-gaap_PensionAndOtherPostretirementDefinedBenefitPlansLiabilitiesNoncurrent_B8FBF9D107A0B8A731BE57BFE7964312" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet" xlink:label="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_EA88EA0ED251AECB2A3257BFE796DE2F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheetAbstract_727CA1624117D191675857BFE7966B19" xlink:to="loc_us-gaap_DefinedBenefitPlanAmountsRecognizedInBalanceSheet_EA88EA0ED251AECB2A3257BFE796DE2F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract_26A8B285B39CEF728DB657BFE796241E" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_C7FB4F77452C080ED32C57BFE7965E7C" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract_26A8B285B39CEF728DB657BFE796241E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_C56174C523E47304B02357BFE7969392" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract_26A8B285B39CEF728DB657BFE796241E" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesAfterTax_C56174C523E47304B02357BFE7969392" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_AAE974012F20D67003FF57BFE7962861" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract_26A8B285B39CEF728DB657BFE796241E" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditAfterTax_AAE974012F20D67003FF57BFE7962861" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_B811742DEC5C6F59755D57BFE7964BC2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeLossAfterTaxAbstract_26A8B285B39CEF728DB657BFE796241E" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossDefinedBenefitPensionAndOtherPostretirementPlansNetOfTax_B811742DEC5C6F59755D57BFE7964BC2" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfEffectOfOnePercentChangeInAssumedHealthCareTrendRatesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfExpectedBenefitPaymentsToBePaidDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_50EF72DFB5A95652859A32BF62DA2DFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_50EF72DFB5A95652859A32BF62DA2DFD" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_4CB1898BA992190DA0E532BF62DA3CB1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_50EF72DFB5A95652859A32BF62DA2DFD" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_4CB1898BA992190DA0E532BF62DA3CB1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_4CB1898BA992190DA0E532BF62DA3CB1" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_4CB1898BA992190DA0E532BF62DA3CB1" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_64C7D12E44A431998C8932BF62DA8D2B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_64C7D12E44A431998C8932BF62DA8D2B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_381A45D24103F09AF2D032BF62DA8279" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_6E0FE716E87A9ACCF00E32BF62DA3495" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_381A45D24103F09AF2D032BF62DA8279" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths_0A3443207395F836B15E32BF62DAB199" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths_0A3443207395F836B15E32BF62DAB199" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo_710A5731618FB8D43DA532BF62DAA03A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo_710A5731618FB8D43DA532BF62DAA03A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree_473AEB16C17F76590E7532BF62DA74DC" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree_473AEB16C17F76590E7532BF62DA74DC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour_8ED284A61FCF55C827C932BF62DA8CD5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour_8ED284A61FCF55C827C932BF62DA8CD5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive_6EAB72F507BD47687DBB32BF62DAC8E3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive_6EAB72F507BD47687DBB32BF62DAC8E3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter_BDD03A6612AD01E67A1932BF62DA4B77" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_1E3735DEADCE2BA469F132BF62DA0888" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter_BDD03A6612AD01E67A1932BF62DA4B77" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfPensionPlanAssetsWithinFairValueHierarchyDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_E551D76199722EB149A38FD2E9E10A16" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_E551D76199722EB149A38FD2E9E10A16" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_CABA05A0F7833634047D8FD2E9DB72A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_CABA05A0F7833634047D8FD2E9DB72A0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_8253B650B6E60C77E8D78FD2E9DBDEBD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_CABA05A0F7833634047D8FD2E9DB72A0" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_8253B650B6E60C77E8D78FD2E9DBDEBD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_8253B650B6E60C77E8D78FD2E9DBDEBD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_CABA05A0F7833634047D8FD2E9DB72A0" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_8253B650B6E60C77E8D78FD2E9DBDEBD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_CA87E3C16261ED9D707C8FD2E9DB2457" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_8253B650B6E60C77E8D78FD2E9DBDEBD" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_CA87E3C16261ED9D707C8FD2E9DB2457" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_862EC5075E3B9E98B2A58FD2E9DBFE16" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_862EC5075E3B9E98B2A58FD2E9DBFE16" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_027C5B028B168CE8DB0C8FD2E9DB8A18_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_862EC5075E3B9E98B2A58FD2E9DBFE16" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_027C5B028B168CE8DB0C8FD2E9DB8A18_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_027C5B028B168CE8DB0C8FD2E9DB8A18" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_862EC5075E3B9E98B2A58FD2E9DBFE16" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_027C5B028B168CE8DB0C8FD2E9DB8A18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_F1EC419C4ADD9B2804FB8FD2E9DBB802" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_027C5B028B168CE8DB0C8FD2E9DB8A18" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_F1EC419C4ADD9B2804FB8FD2E9DBB802" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_DF01DC6D2ABB1CE4C8B88FD2E9DB6257" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_DF01DC6D2ABB1CE4C8B88FD2E9DB6257" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanAssetCategoriesDomain" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_DF01DC6D2ABB1CE4C8B88FD2E9DB6257" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanAssetCategoriesDomain" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_DF01DC6D2ABB1CE4C8B88FD2E9DB6257" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsMember" xlink:label="loc_us-gaap_CashAndCashEquivalentsMember_5A2802F92F8EF60DD1198FD2E9DBF0CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_us-gaap_CashAndCashEquivalentsMember_5A2802F92F8EF60DD1198FD2E9DBF0CE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_GlobalAllCapMember" xlink:label="loc_hsy_GlobalAllCapMember_E02B1E7139739F554F138FD2E9DC5AE6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_hsy_GlobalAllCapMember_E02B1E7139739F554F138FD2E9DC5AE6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_473BA57175D3DAA713688FD2E9DC2A6C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_473BA57175D3DAA713688FD2E9DC2A6C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateBondSecuritiesMember" xlink:label="loc_us-gaap_CorporateBondSecuritiesMember_4BBF5C124DFBC65832AB8FD2E9DC538B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_us-gaap_CorporateBondSecuritiesMember_4BBF5C124DFBC65832AB8FD2E9DC538B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CollateralizedDebtObligationsMember" xlink:label="loc_us-gaap_CollateralizedDebtObligationsMember_A3C496A09D04ED0F13848FD2E9DCF7DB" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_us-gaap_CollateralizedDebtObligationsMember_A3C496A09D04ED0F13848FD2E9DCF7DB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember" xlink:label="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_74E6710DF745AEC328628FD2E9DCCFAA" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_74E6710DF745AEC328628FD2E9DCCFAA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_GlobaldiversifiedassetsMember" xlink:label="loc_hsy_GlobaldiversifiedassetsMember_32F43A5E91A532B5B8138FD2E9DC3015" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_hsy_GlobaldiversifiedassetsMember_32F43A5E91A532B5B8138FD2E9DC3015" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_GlobalrealestateinvestmenttrustsMember" xlink:label="loc_hsy_GlobalrealestateinvestmenttrustsMember_DAB982AF7981A83C990B8FD2E9E1FC10" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_hsy_GlobalrealestateinvestmenttrustsMember_DAB982AF7981A83C990B8FD2E9E1FC10" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_GlobalinfrastructureMember" xlink:label="loc_hsy_GlobalinfrastructureMember_1CFDC2CEE2D79ED9AB018FD2E9E10EA3" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_65D6CD1BF800764B0D158FD2E9DB9B37" xlink:to="loc_hsy_GlobalinfrastructureMember_1CFDC2CEE2D79ED9AB018FD2E9E10EA3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_A259265EB8E6E4A714058FD2E9E1966A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_654D159B54CE4498AA278FD2E9DB6692" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_A259265EB8E6E4A714058FD2E9E1966A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_A259265EB8E6E4A714058FD2E9E1966A" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_A259265EB8E6E4A714058FD2E9E1966A" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_E1B92A29169557FFAFCC8FD2E9E10910" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_E1B92A29169557FFAFCC8FD2E9E10910" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_688AFC77849BA62276168FD2E9E10B92" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_688AFC77849BA62276168FD2E9E10B92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_714923E2315D428EC0358FD2E9E1F697" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_E3FEB60E08313DAED0988FD2E9E10594" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_714923E2315D428EC0358FD2E9E1F697" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_D1ABB8065DD89616FE958FD2E9E256C9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_E551D76199722EB149A38FD2E9E10A16" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_D1ABB8065DD89616FE958FD2E9E256C9" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DefinedBenefitPlanPlanAssetsMeasuredatNetAssetValue" xlink:label="loc_hsy_DefinedBenefitPlanPlanAssetsMeasuredatNetAssetValue_D88B7C30C683CF53CF838FD2E9E2DC81" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_E551D76199722EB149A38FD2E9E10A16" xlink:to="loc_hsy_DefinedBenefitPlanPlanAssetsMeasuredatNetAssetValue_D88B7C30C683CF53CF838FD2E9E2DC81" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfPlanAssetsAcrossAssetClassesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_482F7AD4C0C44C56707852CCEA54B206" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9C55440E0639619D4BAE52CCEA53E873" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_482F7AD4C0C44C56707852CCEA54B206" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9C55440E0639619D4BAE52CCEA53E873" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_78C8A76F977767B9167852CCEA539FF2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9C55440E0639619D4BAE52CCEA53E873" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_78C8A76F977767B9167852CCEA539FF2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_039D825EC75D43AA71F152CCEA536C82_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_78C8A76F977767B9167852CCEA539FF2" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_039D825EC75D43AA71F152CCEA536C82_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_039D825EC75D43AA71F152CCEA536C82" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_78C8A76F977767B9167852CCEA539FF2" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_039D825EC75D43AA71F152CCEA536C82" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticPlanMember" xlink:label="loc_us-gaap_DomesticPlanMember_95F950E6F2757FF2D33052CCEA53C2C1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_039D825EC75D43AA71F152CCEA536C82" xlink:to="loc_us-gaap_DomesticPlanMember_95F950E6F2757FF2D33052CCEA53C2C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9550B024A6713D750B4A52CCEA532D34" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9C55440E0639619D4BAE52CCEA53E873" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9550B024A6713D750B4A52CCEA532D34" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanAssetCategoriesDomain" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9550B024A6713D750B4A52CCEA532D34" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PlanAssetCategoriesDomain" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9550B024A6713D750B4A52CCEA532D34" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CashAndCashEquivalentsMember" xlink:label="loc_us-gaap_CashAndCashEquivalentsMember_91F5E94F08A8D819DDFA52CCEA54605D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:to="loc_us-gaap_CashAndCashEquivalentsMember_91F5E94F08A8D819DDFA52CCEA54605D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquitySecuritiesMember" xlink:label="loc_us-gaap_EquitySecuritiesMember_4C619D93B65A70EA6D8752CCEA541BB9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:to="loc_us-gaap_EquitySecuritiesMember_4C619D93B65A70EA6D8752CCEA541BB9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtSecuritiesMember" xlink:label="loc_us-gaap_DebtSecuritiesMember_7A72AB01F9480EA226B052CCEA54A01F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:to="loc_us-gaap_DebtSecuritiesMember_7A72AB01F9480EA226B052CCEA54A01F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherInvestmentsMember" xlink:label="loc_us-gaap_OtherInvestmentsMember_A5A600CD326771473C2E52CCEA54B41E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_120AC836477CFB121D9E52CCEA532FE5" xlink:to="loc_us-gaap_OtherInvestmentsMember_A5A600CD326771473C2E52CCEA54B41E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage_384376C0882F6CA28F1152CCEA54C3E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_482F7AD4C0C44C56707852CCEA54B206" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage_384376C0882F6CA28F1152CCEA54C3E2" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingBenefitObligationsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_116A674C3977C237321632BF63188C14" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8BAB8CEFB193552B5E2232BF631868BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_116A674C3977C237321632BF63188C14" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8BAB8CEFB193552B5E2232BF631868BB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_EBEB1470FDC7FD03C74832BF6318396B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8BAB8CEFB193552B5E2232BF631868BB" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_EBEB1470FDC7FD03C74832BF6318396B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_EBEB1470FDC7FD03C74832BF6318396B" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_EBEB1470FDC7FD03C74832BF6318396B" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_1F0C7A654B87A08B350032BF63184B18" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_1F0C7A654B87A08B350032BF63184B18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_9E3D7298C099EBF8268D32BF63184396" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_1ABE4457D8E7F62C18DC32BF6318019F" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_9E3D7298C099EBF8268D32BF63184396" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate_3D8AA0CC6C535F14892532BF6318CD68" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_116A674C3977C237321632BF63188C14" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate_3D8AA0CC6C535F14892532BF6318CD68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease_2A4991DE94FA044318C532BF631882A5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_116A674C3977C237321632BF63188C14" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease_2A4991DE94FA044318C532BF631882A5" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfWeightedAverageAssumptionsUsedInComputingNetPeriodicBenefitCostDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_32C82168662E58044CB432BF6318D06F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_3BD361FC6BED8267051232BF6318146A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_32C82168662E58044CB432BF6318D06F" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_3BD361FC6BED8267051232BF6318146A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeAxis" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_37E68805CBC9D6746A5732BF6318CF3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_3BD361FC6BED8267051232BF6318146A" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_37E68805CBC9D6746A5732BF6318CF3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_37E68805CBC9D6746A5732BF6318CF3D" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RetirementPlanTypeDomain" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_37E68805CBC9D6746A5732BF6318CF3D" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_6DCF432C0C3726D84D9732BF63188580" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_6DCF432C0C3726D84D9732BF63188580" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_0C62BC556AA792EEDE9932BF6318BAD2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8B40A3C8527F54AD60AE32BF6318CF64" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_0C62BC556AA792EEDE9932BF6318BAD2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate_5D2EA421EE65BDDB61F932BF6318F438" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_32C82168662E58044CB432BF6318D06F" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate_5D2EA421EE65BDDB61F932BF6318F438" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_F6F4C26B52ED2D291DEE32BF6318DB7A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_32C82168662E58044CB432BF6318D06F" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_F6F4C26B52ED2D291DEE32BF6318DB7A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease_F6AD342CF171DAF322AF32BF631861C6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_32C82168662E58044CB432BF6318D06F" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease_F6AD342CF171DAF322AF32BF631861C6" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/QuarterlyDataTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/QuarterlyDataUnaudited" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleIiValuationAndQualifyingAccounts" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleIiValuationAndQualifyingAccountsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAndQualifyingAccountsDisclosureLineItems" xlink:label="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureLineItems_ED6DA0F5904FC961DA09BB309622895E" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAndQualifyingAccountsDisclosureTable" xlink:label="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureTable_6918945E15615A2948F3BB309622A378" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureLineItems_ED6DA0F5904FC961DA09BB309622895E" xlink:to="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureTable_6918945E15615A2948F3BB309622A378" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_DC54E56C4BD1407EB643BB30962236E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureTable_6918945E15615A2948F3BB309622A378" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_DC54E56C4BD1407EB643BB30962236E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_DC54E56C4BD1407EB643BB30962236E9" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesTypeAxis_DC54E56C4BD1407EB643BB30962236E9" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AllowanceForTradeReceivablesMember" xlink:label="loc_us-gaap_AllowanceForTradeReceivablesMember_21DD930754E3A3A965B4BB3096222BA8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079" xlink:to="loc_us-gaap_AllowanceForTradeReceivablesMember_21DD930754E3A3A965B4BB3096222BA8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember" xlink:label="loc_us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember_4A513DA5C85C36A91499BB3096225D30" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079" xlink:to="loc_us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember_4A513DA5C85C36A91499BB3096225D30" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InventoryValuationReserveMember" xlink:label="loc_us-gaap_InventoryValuationReserveMember_F086FD90A1338A4DD47ABB3096226FE7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAllowancesAndReservesDomain_C18C93CF6FC4BB6E532ABB309622C079" xlink:to="loc_us-gaap_InventoryValuationReserveMember_F086FD90A1338A4DD47ABB3096226FE7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MovementInValuationAllowancesAndReservesRollForward" xlink:label="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationAndQualifyingAccountsDisclosureLineItems_ED6DA0F5904FC961DA09BB309622895E" xlink:to="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesBalance" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesBalance_5DD4AE19FCD40848B10DBB309622C7E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesBalance_5DD4AE19FCD40848B10DBB309622C7E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense_2C978C49462F1B5E128CBB309622D350" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense_2C978C49462F1B5E128CBB309622D350" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts_E857F4C443855FCE051EBB309622C182" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesChargedToOtherAccounts_E857F4C443855FCE051EBB309622C182" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowancesAndReservesDeductions" xlink:label="loc_us-gaap_ValuationAllowancesAndReservesDeductions_EF61480BC8441A1C97B1BB309622E900" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MovementInValuationAllowancesAndReservesRollForward_235E1FADDFB71E23CEE1BB3096220805" xlink:to="loc_us-gaap_ValuationAllowancesAndReservesDeductions_EF61480BC8441A1C97B1BB309622E900" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfBasicAndDilutedEarningsPerShareDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasicLineItems" xlink:label="loc_us-gaap_EarningsPerShareBasicLineItems_423CA5B38E3FD5A473C732BF6198FD28" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable" xlink:label="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_479E9865F6A30934164032BF6198D1A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_423CA5B38E3FD5A473C732BF6198FD28" xlink:to="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_479E9865F6A30934164032BF6198D1A0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_4F43A832CD88CCF1F17832BF61984DE4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_479E9865F6A30934164032BF6198D1A0" xlink:to="loc_us-gaap_StatementClassOfStockAxis_4F43A832CD88CCF1F17832BF61984DE4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4F43A832CD88CCF1F17832BF61984DE4" xlink:to="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4F43A832CD88CCF1F17832BF61984DE4" xlink:to="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_20AE888D16AA01F1FA7732BF6198EF01" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3" xlink:to="loc_hsy_HersheyCommonStockMember_20AE888D16AA01F1FA7732BF6198EF01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_D7995918A2B92D21C43532BF61983540" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2EA0FA9528A3AEED888F32BF6198D8B3" xlink:to="loc_us-gaap_CommonClassBMember_D7995918A2B92D21C43532BF61983540" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_FB637DD4025FFA536F5532BF619815E5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_479E9865F6A30934164032BF6198D1A0" xlink:to="loc_us-gaap_AwardTypeAxis_FB637DD4025FFA536F5532BF619815E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_FB637DD4025FFA536F5532BF619815E5" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_FB637DD4025FFA536F5532BF619815E5" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_E00A6F225DDEF04E001F32BF6198B072" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9" xlink:to="loc_us-gaap_EmployeeStockOptionMember_E00A6F225DDEF04E001F32BF6198B072" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_20291F2D648A9167371C32BF61982666" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5698B54D25A95D3FC89432BF61982BE9" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_20291F2D648A9167371C32BF61982666" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasicTwoClassMethodAbstract" xlink:label="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_423CA5B38E3FD5A473C732BF6198FD28" xlink:to="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Dividends" xlink:label="loc_us-gaap_Dividends_27F0E893407650A00A4232BF6198D316" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:to="loc_us-gaap_Dividends_27F0E893407650A00A4232BF6198D316" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_34A8DE7E90704DB062B732BF61986AFE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_34A8DE7E90704DB062B732BF61986AFE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_2E656BC95B5F8693787632BF6198A16B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_2E656BC95B5F8693787632BF6198A16B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_1FC921FBDF3C4894D7BF32BF6198950C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_1FC921FBDF3C4894D7BF32BF6198950C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:label="loc_us-gaap_EarningsPerShareBasic_D53C95AAA945D30B6F3132BF6198D7FF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_C3330AC6C50B17249A6432BF6198993F" xlink:to="loc_us-gaap_EarningsPerShareBasic_D53C95AAA945D30B6F3132BF6198D7FF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract" xlink:label="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_423CA5B38E3FD5A473C732BF6198FD28" xlink:to="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DistributedEarnings" xlink:label="loc_us-gaap_DistributedEarnings_077579B4EA6A3C2752C032BF61989CBD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_DistributedEarnings_077579B4EA6A3C2752C032BF61989CBD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_714ED7B60053E018DA4B32BF619891F8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_714ED7B60053E018DA4B32BF619891F8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_EE0894F18ED00CB9F3AD32BF6198DF3E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_EE0894F18ED00CB9F3AD32BF6198DF3E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock" xlink:label="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_4CA156E4FA25091D755A32BF61982398" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_4CA156E4FA25091D755A32BF61982398" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_E447FA9C0711BE53EE2232BF61980DD0" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_E447FA9C0711BE53EE2232BF61980DD0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_A083A4AB4876D373A23D32BF6198B0B7" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_A083A4AB4876D373A23D32BF6198B0B7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:label="loc_us-gaap_EarningsPerShareDiluted_79704DAA061401F5B8BF32BF61980350" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_2E61BABF745EC8B4A84F32BF61984DC7" xlink:to="loc_us-gaap_EarningsPerShareDiluted_79704DAA061401F5B8BF32BF61980350" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfDepreciationAndAmortizationExpenseIncludedWithinSegmentIncomeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_9B060D88D415E5B580FD32BF6234EFD8" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4BB65913339185D9112632BF6234E458" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_9B060D88D415E5B580FD32BF6234EFD8" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4BB65913339185D9112632BF6234E458" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_C0F9D2B89439728C480532BF62345603" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4BB65913339185D9112632BF6234E458" xlink:to="loc_us-gaap_ConsolidationItemsAxis_C0F9D2B89439728C480532BF62345603" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_C0F9D2B89439728C480532BF62345603" xlink:to="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_C0F9D2B89439728C480532BF62345603" xlink:to="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_5B382937A865F27ABCB332BF62348AA5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C" xlink:to="loc_us-gaap_OperatingSegmentsMember_5B382937A865F27ABCB332BF62348AA5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateNonSegmentMember" xlink:label="loc_us-gaap_CorporateNonSegmentMember_A5CD3BC773EF69A1458432BF6234CC94" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_48F9F4A681DF8FD4EB2C32BF6234F53C" xlink:to="loc_us-gaap_CorporateNonSegmentMember_A5CD3BC773EF69A1458432BF6234CC94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_44DD5ACB93FFCF09856832BF62345322" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4BB65913339185D9112632BF6234E458" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_44DD5ACB93FFCF09856832BF62345322" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_44DD5ACB93FFCF09856832BF62345322" xlink:to="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_44DD5ACB93FFCF09856832BF62345322" xlink:to="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_CBBAA63F0AFAF17E6CD632BF6234231A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE" xlink:to="loc_hsy_NorthAmericaSegmentMember_CBBAA63F0AFAF17E6CD632BF6234231A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_08EA1DF96F9A8BC8AF6832BF6234434E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE" xlink:to="loc_hsy_InternationalandOtherSegmentMember_08EA1DF96F9A8BC8AF6832BF6234434E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateMember" xlink:label="loc_us-gaap_CorporateMember_C6D2D579F767D306471732BF6234EB2B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_317B6A33DD3A503BC8C732BF6234B8CE" xlink:to="loc_us-gaap_CorporateMember_C6D2D579F767D306471732BF6234EB2B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_000B072FDA9312DEC1F732BF62342CD8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_9B060D88D415E5B580FD32BF6234EFD8" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_000B072FDA9312DEC1F732BF62342CD8" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfNetSalesAndEarningsBySegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_BE2199A683C8A80B4B9B345C61B30193" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_BE2199A683C8A80B4B9B345C61B30193" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_3211E820D82D5E321CC0345C61B34200" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_BE2199A683C8A80B4B9B345C61B30193" xlink:to="loc_us-gaap_ConsolidationItemsAxis_3211E820D82D5E321CC0345C61B34200" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_3211E820D82D5E321CC0345C61B34200" xlink:to="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_3211E820D82D5E321CC0345C61B34200" xlink:to="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_CC22BAE6324DBD1D5C38345C61B35570" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48" xlink:to="loc_us-gaap_OperatingSegmentsMember_CC22BAE6324DBD1D5C38345C61B35570" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateNonSegmentMember" xlink:label="loc_us-gaap_CorporateNonSegmentMember_4465353C01D001C2D378345C61B3C564" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48" xlink:to="loc_us-gaap_CorporateNonSegmentMember_4465353C01D001C2D378345C61B3C564" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaterialReconcilingItemsMember" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_5E204575A4612E76533C345C61B3DBC2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_9BC88DEAEBB8A9E7DFF9345C61B37B48" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_5E204575A4612E76533C345C61B3DBC2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_7DD7462832A3ACE64C0D345C61B3A4CF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_BE2199A683C8A80B4B9B345C61B30193" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_7DD7462832A3ACE64C0D345C61B3A4CF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7DD7462832A3ACE64C0D345C61B3A4CF" xlink:to="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7DD7462832A3ACE64C0D345C61B3A4CF" xlink:to="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaterialReconcilingItemsMember" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_B8DD17D854EB543E6DC7345C61B33777" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_B8DD17D854EB543E6DC7345C61B33777" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_DAF800B566E609D1BB2F345C61B3E4AA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D" xlink:to="loc_hsy_NorthAmericaSegmentMember_DAF800B566E609D1BB2F345C61B3E4AA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_1D94D51F304E974A5F2C345C61B3AB1A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1C01F19A75D8EDC9BA89345C61B3EC1D" xlink:to="loc_hsy_InternationalandOtherSegmentMember_1D94D51F304E974A5F2C345C61B3AB1A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNet" xlink:label="loc_us-gaap_SalesRevenueNet_E4D1B8984492C340357C345C61B30DFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_SalesRevenueNet_E4D1B8984492C340357C345C61B30DFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_2847AB6B567894EFCEB9345C61B38ED6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_OperatingIncomeLoss_2847AB6B567894EFCEB9345C61B38ED6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeGainLossOnDerivativeNet" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_016C12042D5EDCD5D526345C61B3C329" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_016C12042D5EDCD5D526345C61B3C329" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GoodwillAndIntangibleAssetImpairment" xlink:label="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_AD7003001391BE4377D8345C61B35BC8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_AD7003001391BE4377D8345C61B35BC8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_90FA772911193A0A74B6345C61B3A6B1" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_RestructuringCharges_90FA772911193A0A74B6345C61B3A6B1" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PensionExpenseNonServiceRelated" xlink:label="loc_hsy_PensionExpenseNonServiceRelated_3460E45F3E27667C45AF345C61B37277" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_hsy_PensionExpenseNonServiceRelated_3460E45F3E27667C45AF345C61B37277" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationIntegrationRelatedCosts" xlink:label="loc_us-gaap_BusinessCombinationIntegrationRelatedCosts_48A78E261A4B97475582345C61B3A984" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_BusinessCombinationIntegrationRelatedCosts_48A78E261A4B97475582345C61B3A984" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_059DDBD48E677350A1EF345C61B316CD" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_059DDBD48E677350A1EF345C61B316CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_38CE1069E9360EB34231345C61B390A8" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_38CE1069E9360EB34231345C61B390A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_F46D4565ACC5802E78B2345C61B33043" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_FF5F6F8B0F50B9D90B73345C61B3A8CC" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_F46D4565ACC5802E78B2345C61B33043" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfQuarterlyFinancialInformationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_E85D742A4DF9E749D13332BF61042083" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_StatementTable_E85D742A4DF9E749D13332BF61042083" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_1D2B4C711E01C504EBD232BF6105ACC3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_E85D742A4DF9E749D13332BF61042083" xlink:to="loc_us-gaap_StatementClassOfStockAxis_1D2B4C711E01C504EBD232BF6105ACC3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_1D2B4C711E01C504EBD232BF6105ACC3" xlink:to="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_1D2B4C711E01C504EBD232BF6105ACC3" xlink:to="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_EE976D411AAA78FB5F2D32BF61054B7E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438" xlink:to="loc_hsy_HersheyCommonStockMember_EE976D411AAA78FB5F2D32BF61054B7E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_7C96204ED5E6019DD32032BF6105C39C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_020A3E882F5785BAE8D432BF61053438" xlink:to="loc_us-gaap_CommonClassBMember_7C96204ED5E6019DD32032BF6105C39C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_3E1C65ED23E9F8D64C9F32BF610561A7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_E85D742A4DF9E749D13332BF61042083" xlink:to="loc_us-gaap_RangeAxis_3E1C65ED23E9F8D64C9F32BF610561A7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_3E1C65ED23E9F8D64C9F32BF610561A7" xlink:to="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_3E1C65ED23E9F8D64C9F32BF610561A7" xlink:to="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_25835EC28EE9E89A193D32BF610532F9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB" xlink:to="loc_us-gaap_MaximumMember_25835EC28EE9E89A193D32BF610532F9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_59FC76506E48D1C7A38332BF6105C5A9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_72DA487A5D6F5033DC9D32BF610561CB" xlink:to="loc_us-gaap_MinimumMember_59FC76506E48D1C7A38332BF6105C5A9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNet" xlink:label="loc_us-gaap_SalesRevenueNet_B1EA74CCBBA3524A142A32BF6105A6AE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_SalesRevenueNet_B1EA74CCBBA3524A142A32BF6105A6AE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_970D7F85C078A063B47932BF61051962" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_GrossProfit_970D7F85C078A063B47932BF61051962" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_B7430E34DDB2823D71D232BF61066FF8" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_NetIncomeLoss_B7430E34DDB2823D71D232BF61066FF8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:label="loc_us-gaap_EarningsPerShareBasic_EC80E0CE67FDED40E24F32BF61067C2D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_EarningsPerShareBasic_EC80E0CE67FDED40E24F32BF61067C2D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:label="loc_us-gaap_EarningsPerShareDiluted_983996A57E3A1B70B05232BF610618CC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_EarningsPerShareDiluted_983996A57E3A1B70B05232BF610618CC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommonStockDividendsPerShareCashPaid" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_A1DA158C77202AC6B6E132BF61062CF0" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_A1DA158C77202AC6B6E132BF61062CF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_F5CE54B71929897897D132BF6106D850" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CCB7B9C67ABBE0966C9032BF6105DAEB" xlink:to="loc_us-gaap_SharePrice_F5CE54B71929897897D132BF6106D850" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfSegmentInformationByGeographyDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" xlink:label="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_012042E7C416C0E99F6332BF62252E25" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:label="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_F28E83E9FE170ED2F10332BF62257D94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_012042E7C416C0E99F6332BF62252E25" xlink:to="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_F28E83E9FE170ED2F10332BF62257D94" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementGeographicalAxis" xlink:label="loc_us-gaap_StatementGeographicalAxis_3AF6C17086D0C4B1319032BF62255F26" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_F28E83E9FE170ED2F10332BF62257D94" xlink:to="loc_us-gaap_StatementGeographicalAxis_3AF6C17086D0C4B1319032BF62255F26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementGeographicalAxis_3AF6C17086D0C4B1319032BF62255F26" xlink:to="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentGeographicalDomain" xlink:label="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementGeographicalAxis_3AF6C17086D0C4B1319032BF62255F26" xlink:to="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_2E4FE35D94C0B9D4ED6132BF6225F8E6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2" xlink:to="loc_country_US_2E4FE35D94C0B9D4ED6132BF6225F8E6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NonUsMember" xlink:label="loc_us-gaap_NonUsMember_1949206B1AAA41FCAFF232BF622572A0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentGeographicalDomain_FE9A2942F39C6E4794F932BF622517E2" xlink:to="loc_us-gaap_NonUsMember_1949206B1AAA41FCAFF232BF622572A0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNet" xlink:label="loc_us-gaap_SalesRevenueNet_EFC15F8CD16F8737C22E32BF6225E2C3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_012042E7C416C0E99F6332BF62252E25" xlink:to="loc_us-gaap_SalesRevenueNet_EFC15F8CD16F8737C22E32BF6225E2C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_4C4E8313845F2EC824A132BF6225680A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems_012042E7C416C0E99F6332BF62252E25" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_4C4E8313845F2EC824A132BF6225680A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ScheduleOfSupplementalBalanceSheetInformationDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SegmentInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SegmentInformationNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FC5C8056691F1BA2AB218FD2E8D0843A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FC5C8056691F1BA2AB218FD2E8D0843A" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_6715068C1DFD215A104B8FD2E8CA50F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_6715068C1DFD215A104B8FD2E8CA50F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_823A206FD42D7F8B7E978FD2E8CA7F31_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_6715068C1DFD215A104B8FD2E8CA50F0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_823A206FD42D7F8B7E978FD2E8CA7F31_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_823A206FD42D7F8B7E978FD2E8CA7F31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_6715068C1DFD215A104B8FD2E8CA50F0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_823A206FD42D7F8B7E978FD2E8CA7F31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_988A6C47E1DA39154E878FD2E8CA9AEB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_823A206FD42D7F8B7E978FD2E8CA7F31" xlink:to="loc_us-gaap_CostOfSalesMember_988A6C47E1DA39154E878FD2E8CA9AEB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_798251AB0CE7FA17EBF08FD2E8CA7BA1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_StatementScenarioAxis_798251AB0CE7FA17EBF08FD2E8CA7BA1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_F5942D6CFAEAE643C3E08FD2E8CA5308_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_798251AB0CE7FA17EBF08FD2E8CA7BA1" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_F5942D6CFAEAE643C3E08FD2E8CA5308_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_F5942D6CFAEAE643C3E08FD2E8CA5308" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_798251AB0CE7FA17EBF08FD2E8CA7BA1" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_F5942D6CFAEAE643C3E08FD2E8CA5308" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioForecastMember" xlink:label="loc_us-gaap_ScenarioForecastMember_93E2EA048213463603228FD2E8CA600A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_F5942D6CFAEAE643C3E08FD2E8CA5308" xlink:to="loc_us-gaap_ScenarioForecastMember_93E2EA048213463603228FD2E8CA600A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_32AE27DCD75B745EE2C78FD2E8CAA216" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_ConsolidationItemsAxis_32AE27DCD75B745EE2C78FD2E8CAA216" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_E54DCF94E05BB8CF3DAF8FD2E8CA35D8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_32AE27DCD75B745EE2C78FD2E8CAA216" xlink:to="loc_us-gaap_ConsolidationItemsDomain_E54DCF94E05BB8CF3DAF8FD2E8CA35D8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_E54DCF94E05BB8CF3DAF8FD2E8CA35D8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_32AE27DCD75B745EE2C78FD2E8CAA216" xlink:to="loc_us-gaap_ConsolidationItemsDomain_E54DCF94E05BB8CF3DAF8FD2E8CA35D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_FDE9013E8B2DCFACCE2E8FD2E8CAB827" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_E54DCF94E05BB8CF3DAF8FD2E8CA35D8" xlink:to="loc_us-gaap_OperatingSegmentsMember_FDE9013E8B2DCFACCE2E8FD2E8CAB827" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_A59D66C13D495AEBE06D8FD2E8CA0973" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_A59D66C13D495AEBE06D8FD2E8CA0973" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_314709EF6D1EF765C04C8FD2E8CA22FC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_A59D66C13D495AEBE06D8FD2E8CA0973" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_314709EF6D1EF765C04C8FD2E8CA22FC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_314709EF6D1EF765C04C8FD2E8CA22FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_A59D66C13D495AEBE06D8FD2E8CA0973" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_314709EF6D1EF765C04C8FD2E8CA22FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_F86126FF45A610D1F13D8FD2E8CB9C5A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_314709EF6D1EF765C04C8FD2E8CA22FC" xlink:to="loc_us-gaap_CommodityContractMember_F86126FF45A610D1F13D8FD2E8CB9C5A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_1DF65DD9B596FA6955418FD2E8CBACF0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_1DF65DD9B596FA6955418FD2E8CBACF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_A1610A026FFB67E275D58FD2E8CB8069_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1DF65DD9B596FA6955418FD2E8CBACF0" xlink:to="loc_us-gaap_SegmentDomain_A1610A026FFB67E275D58FD2E8CB8069_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_A1610A026FFB67E275D58FD2E8CB8069" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_1DF65DD9B596FA6955418FD2E8CBACF0" xlink:to="loc_us-gaap_SegmentDomain_A1610A026FFB67E275D58FD2E8CB8069" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_029F8DADCCE55CA606718FD2E8D0C992" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_A1610A026FFB67E275D58FD2E8CB8069" xlink:to="loc_hsy_NorthAmericaSegmentMember_029F8DADCCE55CA606718FD2E8D0C992" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_D1D77666FB2045FDCDE18FD2E8D09A44" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_D1D77666FB2045FDCDE18FD2E8D09A44" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_B0201994D740E088E2D58FD2E8D0AA0F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_D1D77666FB2045FDCDE18FD2E8D09A44" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_B0201994D740E088E2D58FD2E8D0AA0F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_B0201994D740E088E2D58FD2E8D0AA0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_D1D77666FB2045FDCDE18FD2E8D09A44" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_B0201994D740E088E2D58FD2E8D0AA0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GeographicConcentrationRiskMember" xlink:label="loc_us-gaap_GeographicConcentrationRiskMember_BFB06B922103F67797428FD2E8D06DDD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_B0201994D740E088E2D58FD2E8D0AA0F" xlink:to="loc_us-gaap_GeographicConcentrationRiskMember_BFB06B922103F67797428FD2E8D06DDD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_4FE4E765618C18065AE88FD2E8D0A360" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_F3AE47F72645E02BC3998FD2E8CA642B" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_4FE4E765618C18065AE88FD2E8D0A360" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_02939E68F7E863C20CF08FD2E8D0984F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_4FE4E765618C18065AE88FD2E8D0A360" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_02939E68F7E863C20CF08FD2E8D0984F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_02939E68F7E863C20CF08FD2E8D0984F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_4FE4E765618C18065AE88FD2E8D0A360" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_02939E68F7E863C20CF08FD2E8D0984F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueGoodsNetMember" xlink:label="loc_us-gaap_SalesRevenueGoodsNetMember_37C38F504B5E8A6EA7468FD2E8D00F0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_02939E68F7E863C20CF08FD2E8D0984F" xlink:to="loc_us-gaap_SalesRevenueGoodsNetMember_37C38F504B5E8A6EA7468FD2E8D00F0D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_09D45E27E2C27D21A57A8FD2E8D0FBDE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FC5C8056691F1BA2AB218FD2E8D0843A" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_09D45E27E2C27D21A57A8FD2E8D0FBDE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeGainLossOnDerivativeNet" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_3354528FB715CC3AA6338FD2E8D01E46" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FC5C8056691F1BA2AB218FD2E8D0843A" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_3354528FB715CC3AA6338FD2E8D01E46" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2F41239851F66B5A5E2D90C64A656341" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FC5C8056691F1BA2AB218FD2E8D0843A" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2F41239851F66B5A5E2D90C64A656341" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SegmentInformationScheduleOfUnallocatedMarkToMarketGainsLossesOnCommodityDerivativesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_4AFC9A2CD1156311F9D08FD2E884A1C5" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_4AFC9A2CD1156311F9D08FD2E884A1C5" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_3C731BB6883020A2B8D28FD2E8836820" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_HedgingDesignationAxis_3C731BB6883020A2B8D28FD2E8836820" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_5A11F99D30BC4363CF7C8FD2E8839410_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_3C731BB6883020A2B8D28FD2E8836820" xlink:to="loc_us-gaap_HedgingDesignationDomain_5A11F99D30BC4363CF7C8FD2E8839410_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_5A11F99D30BC4363CF7C8FD2E8839410" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_3C731BB6883020A2B8D28FD2E8836820" xlink:to="loc_us-gaap_HedgingDesignationDomain_5A11F99D30BC4363CF7C8FD2E8839410" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NondesignatedMember" xlink:label="loc_us-gaap_NondesignatedMember_2B854C73F7424D1E5A438FD2E88377DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_5A11F99D30BC4363CF7C8FD2E8839410" xlink:to="loc_us-gaap_NondesignatedMember_2B854C73F7424D1E5A438FD2E88377DE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_96EAF2C397A574B6A9CC8FD2E883371E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_96EAF2C397A574B6A9CC8FD2E883371E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_EBA575D2E222FC4637DF8FD2E8832FC0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_96EAF2C397A574B6A9CC8FD2E883371E" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_EBA575D2E222FC4637DF8FD2E8832FC0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_EBA575D2E222FC4637DF8FD2E8832FC0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_96EAF2C397A574B6A9CC8FD2E883371E" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_EBA575D2E222FC4637DF8FD2E8832FC0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommodityContractMember" xlink:label="loc_us-gaap_CommodityContractMember_2DBBE7D34005CDEB969C8FD2E88321C0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_EBA575D2E222FC4637DF8FD2E8832FC0" xlink:to="loc_us-gaap_CommodityContractMember_2DBBE7D34005CDEB969C8FD2E88321C0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_7706761E4FA65CE5B0698FD2E8834A51" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_ConsolidationItemsAxis_7706761E4FA65CE5B0698FD2E8834A51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_C762CD4FCDABB94651388FD2E883401D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_7706761E4FA65CE5B0698FD2E8834A51" xlink:to="loc_us-gaap_ConsolidationItemsDomain_C762CD4FCDABB94651388FD2E883401D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_C762CD4FCDABB94651388FD2E883401D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_7706761E4FA65CE5B0698FD2E8834A51" xlink:to="loc_us-gaap_ConsolidationItemsDomain_C762CD4FCDABB94651388FD2E883401D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_6E28B748750754845C728FD2E8844AE1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_C762CD4FCDABB94651388FD2E883401D" xlink:to="loc_us-gaap_OperatingSegmentsMember_6E28B748750754845C728FD2E8844AE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_9E36C3777D53F7E77E198FD2E884A4B9" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_9E36C3777D53F7E77E198FD2E884A4B9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_74842127F4CBC931E28B8FD2E8848D58_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_9E36C3777D53F7E77E198FD2E884A4B9" xlink:to="loc_us-gaap_SegmentDomain_74842127F4CBC931E28B8FD2E8848D58_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_74842127F4CBC931E28B8FD2E8848D58" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_9E36C3777D53F7E77E198FD2E884A4B9" xlink:to="loc_us-gaap_SegmentDomain_74842127F4CBC931E28B8FD2E8848D58" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaterialReconcilingItemsMember" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_EE35DDB27A8AFDC8ADDB8FD2E884C03E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74842127F4CBC931E28B8FD2E8848D58" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_EE35DDB27A8AFDC8ADDB8FD2E884C03E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsAxis" xlink:label="loc_us-gaap_SubsegmentsAxis_411493D67A78BE0CC1F98FD2E884B149" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_SubsegmentsAxis_411493D67A78BE0CC1F98FD2E884B149" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsDomain" xlink:label="loc_us-gaap_SubsegmentsDomain_A8D81B2E678CEF1578178FD2E884109F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsegmentsAxis_411493D67A78BE0CC1F98FD2E884B149" xlink:to="loc_us-gaap_SubsegmentsDomain_A8D81B2E678CEF1578178FD2E884109F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsDomain" xlink:label="loc_us-gaap_SubsegmentsDomain_A8D81B2E678CEF1578178FD2E884109F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsegmentsAxis_411493D67A78BE0CC1F98FD2E884B149" xlink:to="loc_us-gaap_SubsegmentsDomain_A8D81B2E678CEF1578178FD2E884109F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsConsolidationItemsAxis" xlink:label="loc_us-gaap_SubsegmentsConsolidationItemsAxis_5F00FEF3085AAAF0EA428FD2E8849FFD" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_851DB8943E7EC967E5428FD2E8833BA8" xlink:to="loc_us-gaap_SubsegmentsConsolidationItemsAxis_5F00FEF3085AAAF0EA428FD2E8849FFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsConsolidationItemsDomain" xlink:label="loc_us-gaap_SubsegmentsConsolidationItemsDomain_188C8357E22154190F2A8FD2E884D7FB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsegmentsConsolidationItemsAxis_5F00FEF3085AAAF0EA428FD2E8849FFD" xlink:to="loc_us-gaap_SubsegmentsConsolidationItemsDomain_188C8357E22154190F2A8FD2E884D7FB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsegmentsConsolidationItemsDomain" xlink:label="loc_us-gaap_SubsegmentsConsolidationItemsDomain_188C8357E22154190F2A8FD2E884D7FB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsegmentsConsolidationItemsAxis_5F00FEF3085AAAF0EA428FD2E8849FFD" xlink:to="loc_us-gaap_SubsegmentsConsolidationItemsDomain_188C8357E22154190F2A8FD2E884D7FB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DerivativeGainLossOnDerivativeNet" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_EE98A3215E93C78D44EC8FD2E884ADE8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_4AFC9A2CD1156311F9D08FD2E884A1C5" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_EE98A3215E93C78D44EC8FD2E884ADE8" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_D8524F30CB045EED81E390BF16911167" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_4AFC9A2CD1156311F9D08FD2E884A1C5" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_D8524F30CB045EED81E390BF16911167" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses" xlink:label="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_C8C7CEA86A7708CEB4858FD2E8846ADA" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_4AFC9A2CD1156311F9D08FD2E884A1C5" xlink:to="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_C8C7CEA86A7708CEB4858FD2E8846ADA" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SegmentInformationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebt" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtInterestRatesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_C4BA076A767679BEA7402E2EFA4E4F26" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_26EF9B02D84809ECE3D72E2EFA4E7335" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C4BA076A767679BEA7402E2EFA4E4F26" xlink:to="loc_us-gaap_DebtInstrumentTable_26EF9B02D84809ECE3D72E2EFA4E7335" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_EF700E475CF9D9BB0BC22E2EFA4E9BEE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_26EF9B02D84809ECE3D72E2EFA4E7335" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_EF700E475CF9D9BB0BC22E2EFA4E9BEE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_95A3ED25526B8340191D2E2EFA4E6351_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_EF700E475CF9D9BB0BC22E2EFA4E9BEE" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_95A3ED25526B8340191D2E2EFA4E6351_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_95A3ED25526B8340191D2E2EFA4E6351" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_EF700E475CF9D9BB0BC22E2EFA4E9BEE" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_95A3ED25526B8340191D2E2EFA4E6351" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_E416F1A2C79F4BBA3C332E2EFA4E9C51" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_95A3ED25526B8340191D2E2EFA4E6351" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_E416F1A2C79F4BBA3C332E2EFA4E9C51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_D162ACD3C67CB86EF5452E2EFA4E70FF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_26EF9B02D84809ECE3D72E2EFA4E7335" xlink:to="loc_us-gaap_DebtInstrumentAxis_D162ACD3C67CB86EF5452E2EFA4E70FF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_D162ACD3C67CB86EF5452E2EFA4E70FF" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_D162ACD3C67CB86EF5452E2EFA4E70FF" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes5.45Due2016Member" xlink:label="loc_hsy_Notes5.45Due2016Member_EE186491B619117527B12E2EFA4E63AC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes5.45Due2016Member_EE186491B619117527B12E2EFA4E63AC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes1.50Due2016Member" xlink:label="loc_hsy_Notes1.50Due2016Member_9CECBCA88BC81ED2D1E12E2EFA4E939A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes1.50Due2016Member_9CECBCA88BC81ED2D1E12E2EFA4E939A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes1.60Due2018Member" xlink:label="loc_hsy_Notes1.60Due2018Member_A9F44D8F6F51A3A421B22E2EFA4E93AB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes1.60Due2018Member_A9F44D8F6F51A3A421B22E2EFA4E93AB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes4.125Due2020Member" xlink:label="loc_hsy_Notes4.125Due2020Member_FF0DF0D44BE4264ED81F2E2EFA4E54F7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes4.125Due2020Member_FF0DF0D44BE4264ED81F2E2EFA4E54F7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures8.8Due2021Member" xlink:label="loc_hsy_Debentures8.8Due2021Member_117163B569BCF401DB532E2EFA4EFFAE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Debentures8.8Due2021Member_117163B569BCF401DB532E2EFA4EFFAE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes2.625Due2023Member" xlink:label="loc_hsy_Notes2.625Due2023Member_70F17CF3C1A3CAFC99C82E2EFA4E281D" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes2.625Due2023Member_70F17CF3C1A3CAFC99C82E2EFA4E281D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes3.20Due2025Member" xlink:label="loc_hsy_Notes3.20Due2025Member_1282962AE31032DD1FFB2E2EFA4EF3CC" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes3.20Due2025Member_1282962AE31032DD1FFB2E2EFA4EF3CC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes2.30Due2026Member" xlink:label="loc_hsy_Notes2.30Due2026Member_8802D14EEEBDC6C54B962E2EFA4EDFED" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes2.30Due2026Member_8802D14EEEBDC6C54B962E2EFA4EDFED" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures7.2Due2027Member" xlink:label="loc_hsy_Debentures7.2Due2027Member_C09EB89ADBE2683C63F32E2EFA4ED1A6" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Debentures7.2Due2027Member_C09EB89ADBE2683C63F32E2EFA4ED1A6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes3.375Due2046Member" xlink:label="loc_hsy_Notes3.375Due2046Member_52D53DC20E857835607A2E2EFA4E0404" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_59ACC31A88CBEAB6148C2E2EFA4EFADB" xlink:to="loc_hsy_Notes3.375Due2046Member_52D53DC20E857835607A2E2EFA4E0404" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_2054F8E3D5EF4EC7F8562E2EFA4EF3E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C4BA076A767679BEA7402E2EFA4E4F26" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_2054F8E3D5EF4EC7F8562E2EFA4EF3E9" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_0E9DBD33340AFE516030722FB1AB3B63" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_DebtInstrumentTable_0E9DBD33340AFE516030722FB1AB3B63" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_B89CBD5914F6766D81F4722FB1AB3011" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_0E9DBD33340AFE516030722FB1AB3B63" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_B89CBD5914F6766D81F4722FB1AB3011" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_5E9998E76CC9E3201FA5722FB1AC8B73_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_B89CBD5914F6766D81F4722FB1AB3011" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_5E9998E76CC9E3201FA5722FB1AC8B73_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_5E9998E76CC9E3201FA5722FB1AC8B73" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_B89CBD5914F6766D81F4722FB1AB3011" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_5E9998E76CC9E3201FA5722FB1AC8B73" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_E75C1652B1B3F8873273722FB1AC9F37" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_5E9998E76CC9E3201FA5722FB1AC8B73" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_E75C1652B1B3F8873273722FB1AC9F37" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_BE7D1EF29D4E56024FAA722FB1AC0E39" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_0E9DBD33340AFE516030722FB1AB3B63" xlink:to="loc_us-gaap_DebtInstrumentAxis_BE7D1EF29D4E56024FAA722FB1AC0E39" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_BE7D1EF29D4E56024FAA722FB1AC0E39" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_BE7D1EF29D4E56024FAA722FB1AC0E39" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes5.45Due2016Member" xlink:label="loc_hsy_Notes5.45Due2016Member_9612D3B60D7C5167D581722FB1AC4588" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Notes5.45Due2016Member_9612D3B60D7C5167D581722FB1AC4588" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes1.50Due2016Member" xlink:label="loc_hsy_Notes1.50Due2016Member_231FE0DAAF2CEB286468722FB1ACE00E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Notes1.50Due2016Member_231FE0DAAF2CEB286468722FB1ACE00E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes2.30Due2026Member" xlink:label="loc_hsy_Notes2.30Due2026Member_BCEDA2889DAD077A5378722FB1AC4032" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Notes2.30Due2026Member_BCEDA2889DAD077A5378722FB1AC4032" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes3.375Due2046Member" xlink:label="loc_hsy_Notes3.375Due2046Member_01FDAE87E29A9A598B3A722FB1AC6B93" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Notes3.375Due2046Member_01FDAE87E29A9A598B3A722FB1AC6B93" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures8.8Due2021Member" xlink:label="loc_hsy_Debentures8.8Due2021Member_79EB73AFA298A8868E9D722FB1AC0DAC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Debentures8.8Due2021Member_79EB73AFA298A8868E9D722FB1AC0DAC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures7.2Due2027Member" xlink:label="loc_hsy_Debentures7.2Due2027Member_7497CF9536D42EBC9AB2722FB1AC1846" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019051723749C05BC2F8722FB1ACB31E" xlink:to="loc_hsy_Debentures7.2Due2027Member_7497CF9536D42EBC9AB2722FB1AC1846" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtAxis" xlink:label="loc_us-gaap_ExtinguishmentOfDebtAxis_A4F1D7D6BD9005F62245722FB1AC95DA" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_0E9DBD33340AFE516030722FB1AB3B63" xlink:to="loc_us-gaap_ExtinguishmentOfDebtAxis_A4F1D7D6BD9005F62245722FB1AC95DA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtTypeDomain" xlink:label="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_FBFD918FDC3659B7FE3B722FB1AD8F0E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ExtinguishmentOfDebtAxis_A4F1D7D6BD9005F62245722FB1AC95DA" xlink:to="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_FBFD918FDC3659B7FE3B722FB1AD8F0E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtTypeDomain" xlink:label="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_FBFD918FDC3659B7FE3B722FB1AD8F0E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ExtinguishmentOfDebtAxis_A4F1D7D6BD9005F62245722FB1AC95DA" xlink:to="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_FBFD918FDC3659B7FE3B722FB1AD8F0E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_CD40A35138E7C86659E5722FB1AD34B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_FBFD918FDC3659B7FE3B722FB1AD8F0E" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_CD40A35138E7C86659E5722FB1AD34B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RepaymentsOfDebt" xlink:label="loc_us-gaap_RepaymentsOfDebt_24DE35E9AB3192633E73722FB1ADB481" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_RepaymentsOfDebt_24DE35E9AB3192633E73722FB1ADB481" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_E5BBBAABB532C8CE5C43722FB1AD4C6E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_E5BBBAABB532C8CE5C43722FB1AD4C6E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_0F5737DBC65FFEF08656722FB1AD5748" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_0F5737DBC65FFEF08656722FB1AD5748" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt_F9C89287C6B432BE9B9D722FB1AD4BC5" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt_F9C89287C6B432BE9B9D722FB1AD4BC5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentRepurchaseAmount" xlink:label="loc_us-gaap_DebtInstrumentRepurchaseAmount_1233D989FAAC0534AE44722FB1ADB1F6" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_DebtInstrumentRepurchaseAmount_1233D989FAAC0534AE44722FB1ADB1F6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtAmount" xlink:label="loc_us-gaap_ExtinguishmentOfDebtAmount_AB7933BB12591FEAE3D4722FB1ADC67C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_ExtinguishmentOfDebtAmount_AB7933BB12591FEAE3D4722FB1ADC67C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_7A843DF31CFC4B2BF8EA722FB1ADA243" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_7A843DF31CFC4B2BF8EA722FB1ADA243" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GainOnFairValueHedgeIneffectiveness" xlink:label="loc_us-gaap_GainOnFairValueHedgeIneffectiveness_CCE2CF2E8C9BADDAA468722FB1ADB48F" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_BD7CA0F9A0ED78DF0458722FB1AD3EF2" xlink:to="loc_us-gaap_GainOnFairValueHedgeIneffectiveness_CCE2CF2E8C9BADDAA468722FB1ADB48F" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfLongTermDebtInstrumentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_C42219EFB4738C4B6EC432BF63977B5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:to="loc_us-gaap_DebtInstrumentTable_C42219EFB4738C4B6EC432BF63977B5B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_F5A8D67CFCE736AA8B8232BF6397E097" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_C42219EFB4738C4B6EC432BF63977B5B" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_F5A8D67CFCE736AA8B8232BF6397E097" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_F5A8D67CFCE736AA8B8232BF6397E097" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_F5A8D67CFCE736AA8B8232BF6397E097" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_4CA46380FD92FD5E7BBF32BF6397ECFC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_4CA46380FD92FD5E7BBF32BF6397ECFC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalLeaseObligationsMember" xlink:label="loc_us-gaap_CapitalLeaseObligationsMember_BECCFF6305D8F7C0BA0332BF63974A41" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_4B1085ECA8BBE0B4D4AF32BF63975E44" xlink:to="loc_us-gaap_CapitalLeaseObligationsMember_BECCFF6305D8F7C0BA0332BF63974A41" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_992A7EEC5A6AA804DA2932BF6397D295" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_C42219EFB4738C4B6EC432BF63977B5B" xlink:to="loc_us-gaap_DebtInstrumentAxis_992A7EEC5A6AA804DA2932BF6397D295" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_992A7EEC5A6AA804DA2932BF6397D295" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_992A7EEC5A6AA804DA2932BF6397D295" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes5.45Due2016Member" xlink:label="loc_hsy_Notes5.45Due2016Member_65CB800F04A85CF7A37732BF63971914" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes5.45Due2016Member_65CB800F04A85CF7A37732BF63971914" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes1.50Due2016Member" xlink:label="loc_hsy_Notes1.50Due2016Member_9FBE1FB90EAD0AA94BB732BF63978484" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes1.50Due2016Member_9FBE1FB90EAD0AA94BB732BF63978484" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes1.60Due2018Member" xlink:label="loc_hsy_Notes1.60Due2018Member_743E567B9DD945B9214132BF63972869" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes1.60Due2018Member_743E567B9DD945B9214132BF63972869" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes4.125Due2020Member" xlink:label="loc_hsy_Notes4.125Due2020Member_593C48D433E8260F1FA032BF63973D34" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes4.125Due2020Member_593C48D433E8260F1FA032BF63973D34" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures8.8Due2021Member" xlink:label="loc_hsy_Debentures8.8Due2021Member_351C1240832DE22BE82932BF63979E93" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Debentures8.8Due2021Member_351C1240832DE22BE82932BF63979E93" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes2.625Due2023Member" xlink:label="loc_hsy_Notes2.625Due2023Member_2891EE099A680F3083A132BF63974724" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes2.625Due2023Member_2891EE099A680F3083A132BF63974724" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes3.20Due2025Member" xlink:label="loc_hsy_Notes3.20Due2025Member_D06922D765F1B9BCBA9C32BF6397F07E" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes3.20Due2025Member_D06922D765F1B9BCBA9C32BF6397F07E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes2.30Due2026Member" xlink:label="loc_hsy_Notes2.30Due2026Member_13F0AC7B66A40F4628DF32BF6397491E" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes2.30Due2026Member_13F0AC7B66A40F4628DF32BF6397491E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Debentures7.2Due2027Member" xlink:label="loc_hsy_Debentures7.2Due2027Member_4C34D0A29A1DAC39711E32BF6397B1A7" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Debentures7.2Due2027Member_4C34D0A29A1DAC39711E32BF6397B1A7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_Notes3.375Due2046Member" xlink:label="loc_hsy_Notes3.375Due2046Member_E83FAB57E3F636EBA81632BF63976684" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9C500C7DE2939A9E2C0D32BF6397BA5D" xlink:to="loc_hsy_Notes3.375Due2046Member_E83FAB57E3F636EBA81632BF63976684" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_57C0CEE19652C882038F32BF639714B0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:to="loc_us-gaap_LongTermDebt_57C0CEE19652C882038F32BF639714B0" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_C03D6AADB60589EDE01432BF639761BF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_C03D6AADB60589EDE01432BF639761BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtCurrent" xlink:label="loc_us-gaap_LongTermDebtCurrent_5B360406C0EF35997AA032BF6397503B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:to="loc_us-gaap_LongTermDebtCurrent_5B360406C0EF35997AA032BF6397503B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_0F4B67E60FB265EEF26932BF6397E33C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_AA140857EC486B55BBCD32BF6397F7D7" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_0F4B67E60FB265EEF26932BF6397E33C" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfMaturitiesOfLongTermDebtDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfNetInterestExpenseDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtShortTermDebtNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_5312960DE01A83882DD277477C2F763A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:to="loc_us-gaap_DebtInstrumentAxis_5312960DE01A83882DD277477C2F763A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_364F5AC34849176091B477477C2F3EB1_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_5312960DE01A83882DD277477C2F763A" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_364F5AC34849176091B477477C2F3EB1_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_364F5AC34849176091B477477C2F3EB1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_5312960DE01A83882DD277477C2F763A" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_364F5AC34849176091B477477C2F3EB1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditMember" xlink:label="loc_us-gaap_LineOfCreditMember_D202DB746E0CD756F4EE77477C2F280A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_364F5AC34849176091B477477C2F3EB1" xlink:to="loc_us-gaap_LineOfCreditMember_D202DB746E0CD756F4EE77477C2F280A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_6F3CFDFE7905301ED7B477477C2FF5A4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:to="loc_us-gaap_CreditFacilityAxis_6F3CFDFE7905301ED7B477477C2FF5A4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_91EBD1D00992906A04DF77477C2F74D3_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_6F3CFDFE7905301ED7B477477C2FF5A4" xlink:to="loc_us-gaap_CreditFacilityDomain_91EBD1D00992906A04DF77477C2F74D3_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_91EBD1D00992906A04DF77477C2F74D3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_6F3CFDFE7905301ED7B477477C2FF5A4" xlink:to="loc_us-gaap_CreditFacilityDomain_91EBD1D00992906A04DF77477C2F74D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevolvingCreditFacilityMember" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_890A2400ED60F6D5D64277477C2F836E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_91EBD1D00992906A04DF77477C2F74D3" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_890A2400ED60F6D5D64277477C2F836E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_1B54680E2A703311A51F77477C2F3518" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_1B54680E2A703311A51F77477C2F3518" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_1B54680E2A703311A51F77477C2F3518" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_1B54680E2A703311A51F77477C2F3518" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditMember" xlink:label="loc_us-gaap_LineOfCreditMember_19B6E856E31E5EA7C4FF77477C2F677F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175" xlink:to="loc_us-gaap_LineOfCreditMember_19B6E856E31E5EA7C4FF77477C2F677F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ForeignLineOfCreditMember" xlink:label="loc_us-gaap_ForeignLineOfCreditMember_154F8A44905F2E74B50077477C2F1F2F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_45F363CCEE856E7ED5DA77477C2F4175" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_154F8A44905F2E74B50077477C2F1F2F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermDebtTypeAxis" xlink:label="loc_us-gaap_ShortTermDebtTypeAxis_2F2D1AED7410A67F8E7A77477C2FAC37" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_F6F20F7F7A2E9BE89EEE77477C2F2B28" xlink:to="loc_us-gaap_ShortTermDebtTypeAxis_2F2D1AED7410A67F8E7A77477C2FAC37" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermDebtTypeDomain" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_6013D814689A97CBBFC077477C2F45AD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_2F2D1AED7410A67F8E7A77477C2FAC37" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_6013D814689A97CBBFC077477C2F45AD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermDebtTypeDomain" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_6013D814689A97CBBFC077477C2F45AD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_2F2D1AED7410A67F8E7A77477C2FAC37" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_6013D814689A97CBBFC077477C2F45AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CommercialPaperMember" xlink:label="loc_us-gaap_CommercialPaperMember_224414DF7579B3314DC177477C2F88B5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermDebtTypeDomain_6013D814689A97CBBFC077477C2F45AD" xlink:to="loc_us-gaap_CommercialPaperMember_224414DF7579B3314DC177477C2F88B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6C8D3520E3597AC0D2FE77477C2FEFBC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_6C8D3520E3597AC0D2FE77477C2FEFBC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit" xlink:label="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_95E61809FF244A3D12CF77477C2FDB74" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_95E61809FF244A3D12CF77477C2FDB74" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DebtInstrumentCovenantPretaxIncomeFromOperationsToConsolidatedInterestExpenseMinimum" xlink:label="loc_hsy_DebtInstrumentCovenantPretaxIncomeFromOperationsToConsolidatedInterestExpenseMinimum_72C13CD4A1B293C6785A77477C2F617C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_hsy_DebtInstrumentCovenantPretaxIncomeFromOperationsToConsolidatedInterestExpenseMinimum_72C13CD4A1B293C6785A77477C2F617C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LinesOfCreditCurrent" xlink:label="loc_us-gaap_LinesOfCreditCurrent_2410E9E08D950A17662677477C2F5443" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_LinesOfCreditCurrent_2410E9E08D950A17662677477C2F5443" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermBorrowings" xlink:label="loc_us-gaap_ShortTermBorrowings_918C60203334E1408C2377477C2F1A01" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_ShortTermBorrowings_918C60203334E1408C2377477C2F1A01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShortTermDebtWeightedAverageInterestRate" xlink:label="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_F723EA5CF70AC95FBA5677477C2FD3D3" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_F723EA5CF70AC95FBA5677477C2FD3D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumAmountOutstandingDuringPeriod" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumAmountOutstandingDuringPeriod_311282D4D7AAC722373677477C2F4B31" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_7E040D788E9975F9AF6377477C2F1760" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumAmountOutstandingDuringPeriod_311282D4D7AAC722373677477C2F4B31" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ShortAndLongTermDebtTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlans" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfCompensationExpenseAndIncomeTaxBenefitsForStockBasedCompensationProgramsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfFairValueWeightedAverageAssumptionsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusActivityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_50FE08AC3E693E42EB0F32BF6288E4D9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A6149B79225FE332791C32BF6288A03B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_50FE08AC3E693E42EB0F32BF6288E4D9" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A6149B79225FE332791C32BF6288A03B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_3BED31D87964378F579132BF6288CAA3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A6149B79225FE332791C32BF6288A03B" xlink:to="loc_us-gaap_AwardTypeAxis_3BED31D87964378F579132BF6288CAA3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0E5E8C4FD051BD84A15332BF62880F71_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_3BED31D87964378F579132BF6288CAA3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0E5E8C4FD051BD84A15332BF62880F71_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0E5E8C4FD051BD84A15332BF62880F71" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_3BED31D87964378F579132BF6288CAA3" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0E5E8C4FD051BD84A15332BF62880F71" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_0F5B2ABC61A73CCB55CD32BF628825EC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0E5E8C4FD051BD84A15332BF62880F71" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_0F5B2ABC61A73CCB55CD32BF628825EC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_50FE08AC3E693E42EB0F32BF6288E4D9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_2A438BB8317FE4EB20E032BF6288FB6C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_2A438BB8317FE4EB20E032BF6288FB6C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_4D917138A4A7C5A6874832BF6288F93B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_4D917138A4A7C5A6874832BF6288F93B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_959B0E8A8F50B07BD5E832BF6288BC07" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_959B0E8A8F50B07BD5E832BF6288BC07" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_E7FD10EB853C7386044432BF62880817" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_E7FD10EB853C7386044432BF62880817" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_BA123DECE6A9D3396E9D32BF62882DD4" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_718F13B7B97E6BF4319B32BF6288AE8D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_BA123DECE6A9D3396E9D32BF62882DD4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_50FE08AC3E693E42EB0F32BF6288E4D9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_5EC32916F06B0C173B0132BF6288BA7C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_5EC32916F06B0C173B0132BF6288BA7C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_D76CFD850097113174A532BF6288E034" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_D76CFD850097113174A532BF6288E034" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_02CCD3C24F6682AE3C6B32BF62881B47" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_02CCD3C24F6682AE3C6B32BF62881B47" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_E4232C3FB081F9F9593932BF6288D235" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_E4232C3FB081F9F9593932BF6288D235" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_260546AAB943720D7A7C32BF62889CFA" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_27EB27B95E398F8B287D32BF6288FC70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_260546AAB943720D7A7C32BF62889CFA" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusFairValueWeightedAverageAssumptionsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_D14C6D43015A5F51028332BF6264FEE7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_D14C6D43015A5F51028332BF6264FEE7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_FBF1C0B35BF34A9D419C32BF6264A117" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_D14C6D43015A5F51028332BF6264FEE7" xlink:to="loc_us-gaap_AwardTypeAxis_FBF1C0B35BF34A9D419C32BF6264A117" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4169077A224D63FC761A32BF62644DA7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_FBF1C0B35BF34A9D419C32BF6264A117" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4169077A224D63FC761A32BF62644DA7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4169077A224D63FC761A32BF62644DA7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_FBF1C0B35BF34A9D419C32BF6264A117" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4169077A224D63FC761A32BF62644DA7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_08939915877EBC87CBE432BF6264FD00" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4169077A224D63FC761A32BF62644DA7" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_08939915877EBC87CBE432BF6264FD00" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_B7C72E3C8839E09215C532BF6264649D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_B7C72E3C8839E09215C532BF6264649D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_304FF0BB442D63895C0832BF6264AF21" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_304FF0BB442D63895C0832BF6264AF21" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_A12FB2A1CDADE45AB4DD32BF626455C2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_SharePrice_A12FB2A1CDADE45AB4DD32BF626455C2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_92ED9496BE39B2E4EC3B32BF62641545" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_92ED9496BE39B2E4EC3B32BF62641545" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_BB2465BA9DF085083FEB32BF62687BD4" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9653FA57F47E42E7306132BF62647383" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_BB2465BA9DF085083FEB32BF62687BD4" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfStockOptionActivityDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansScheduleOfStockOptionInformationByExercisePriceRangeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_060C5D7259E4AC24958B32BF6289FE1D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_060C5D7259E4AC24958B32BF6289FE1D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_639C53F7324F588F859232BF62891A0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeTable_060C5D7259E4AC24958B32BF6289FE1D" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_639C53F7324F588F859232BF62891A0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_639C53F7324F588F859232BF62891A0F" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansByExercisePriceRangeAxis_639C53F7324F588F859232BF62891A0F" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ExercisePriceRangeOneMember" xlink:label="loc_hsy_ExercisePriceRangeOneMember_C0D2F345CBA91E20268932BF62899CEA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:to="loc_hsy_ExercisePriceRangeOneMember_C0D2F345CBA91E20268932BF62899CEA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ExercisePriceRangeTwoMember" xlink:label="loc_hsy_ExercisePriceRangeTwoMember_6260FBD63780E5F9946332BF6289B2BB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:to="loc_hsy_ExercisePriceRangeTwoMember_6260FBD63780E5F9946332BF6289B2BB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ExercisePriceRangeThreeMember" xlink:label="loc_hsy_ExercisePriceRangeThreeMember_909410F87B16633B30C532BF628965B1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:to="loc_hsy_ExercisePriceRangeThreeMember_909410F87B16633B30C532BF628965B1" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ExercisePriceRangeFourMember" xlink:label="loc_hsy_ExercisePriceRangeFourMember_F6624AC5E2BAF971BD0432BF6289DCCB" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeDomain_EE77B5AF63A3D4A24D3032BF6289122C" xlink:to="loc_hsy_ExercisePriceRangeFourMember_F6624AC5E2BAF971BD0432BF6289DCCB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit_3B196CF22B4FD206E42232BF62890263" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLowerRangeLimit_3B196CF22B4FD206E42232BF62890263" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit_8D1B48EE16548A635FAF32BF62896C4C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeUpperRangeLimit_8D1B48EE16548A635FAF32BF62896C4C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfOutstandingOptions" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfOutstandingOptions_44BB2DDB44FD22AC436F32BF6289F216" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfOutstandingOptions_44BB2DDB44FD22AC436F32BF6289F216" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageRemainingContractualTerm2" xlink:label="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageRemainingContractualTerm2_CBB4A30B48D7959AB96132BF6289A60A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageRemainingContractualTerm2_CBB4A30B48D7959AB96132BF6289A60A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1" xlink:label="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1_DB9C55B7C29B979E51DD32BF62893E68" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeOutstandingOptionsWeightedAverageExercisePriceBeginningBalance1_DB9C55B7C29B979E51DD32BF62893E68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfExercisableOptions" xlink:label="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfExercisableOptions_B3127E8214F32C730CA732BF6289F503" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeNumberOfExercisableOptions_B3127E8214F32C730CA732BF6289F503" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeExercisableOptionsWeightedAverageExercisePrice1" xlink:label="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeExercisableOptionsWeightedAverageExercisePrice1_7205366967F62FE5991B32BF62890524" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeLineItems_BD413D313BEE8D259A3132BF628933A2" xlink:to="loc_us-gaap_SharebasedCompensationSharesAuthorizedUnderStockOptionPlansExercisePriceRangeExercisableOptionsWeightedAverageExercisePrice1_7205366967F62FE5991B32BF62890524" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansStockCompensationPlansNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A2E93969C9BBA5CFBD8132BF62BA9EE7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A2E93969C9BBA5CFBD8132BF62BA9EE7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_25A16688FBCB0339BB7C32BF62BA3FBB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A2E93969C9BBA5CFBD8132BF62BA9EE7" xlink:to="loc_us-gaap_AwardTypeAxis_25A16688FBCB0339BB7C32BF62BA3FBB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_25A16688FBCB0339BB7C32BF62BA3FBB" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_25A16688FBCB0339BB7C32BF62BA3FBB" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_AC312F6C0F6F975D614C32BF62BAC390" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33" xlink:to="loc_us-gaap_EmployeeStockOptionMember_AC312F6C0F6F975D614C32BF62BAC390" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PerformanceSharesMember" xlink:label="loc_us-gaap_PerformanceSharesMember_7E242CE03E2977525E0132BF62BAB6BF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33" xlink:to="loc_us-gaap_PerformanceSharesMember_7E242CE03E2977525E0132BF62BAB6BF" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_PerformanceStockUnitsandRestrictedStockUnitsMember" xlink:label="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_7A844A9537390299415632BF62BACA99" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4CA10FA760C83B29E60132BF62BABF33" xlink:to="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_7A844A9537390299415632BF62BACA99" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_6BCD0066C43CF40EF49B32BF62BA5F5D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A2E93969C9BBA5CFBD8132BF62BA9EE7" xlink:to="loc_us-gaap_RangeAxis_6BCD0066C43CF40EF49B32BF62BA5F5D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_6BCD0066C43CF40EF49B32BF62BA5F5D" xlink:to="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_6BCD0066C43CF40EF49B32BF62BA5F5D" xlink:to="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_D909E7849F5F8C73B9FF32BF62BA308C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD" xlink:to="loc_us-gaap_MinimumMember_D909E7849F5F8C73B9FF32BF62BA308C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_87CD4206DB50EC03D51032BF62CAA460" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_DB3F09FF4DC0DEBE285132BF62BAADAD" xlink:to="loc_us-gaap_MaximumMember_87CD4206DB50EC03D51032BF62CAA460" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_37F878CD3882E91A5ED632BF62CA0621" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_37F878CD3882E91A5ED632BF62CA0621" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_B9BE2291F5D8CB642BF432BF62CADD3B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_B9BE2291F5D8CB642BF432BF62CADD3B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_2B66C23CE1EE49862D8F32BF62CA3FD7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_2B66C23CE1EE49862D8F32BF62CA3FD7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_4351FD9E6E33305FE4B632BF62CA2444" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_4351FD9E6E33305FE4B632BF62CA2444" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_BD3D2E2061E397FCBBA732BF62CA424A" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_BD3D2E2061E397FCBBA732BF62CA424A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_CD5A8803E9BA80E0163832BF62CA305B" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_CD5A8803E9BA80E0163832BF62CA305B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_7DD239CEC6FC75D878AC32BF62CA55D0" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_7DD239CEC6FC75D878AC32BF62CA55D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_CE601713C2775633311E32BF62CA71B8" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_CE601713C2775633311E32BF62CA71B8" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceScorePercentage" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceScorePercentage_674BF5FE0512BD84284632BF62CA1B9C" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceScorePercentage_674BF5FE0512BD84284632BF62CA1B9C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_B73588E295C5C3E1093132BF62CA7335" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_B73588E295C5C3E1093132BF62CA7335" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_815467F71AC097A6A36332BF62CAEC84" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_815467F71AC097A6A36332BF62CAEC84" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_DeferredCompensationArrangementwithIndividualConversionBasis" xlink:label="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_308F4181D023B1AAC44932BF62CA6E84" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D704EEEC275C57EBE6E832BF62CAF674" xlink:to="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_308F4181D023B1AAC44932BF62CA6E84" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/StockCompensationPlansTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SubsequentEventsSubsequentEvents" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SubsequentEventsSubsequentEventsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventLineItems" xlink:label="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTable" xlink:label="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeAxis" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_858E6C41B6E0CF8F88A6775F65553727" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_858E6C41B6E0CF8F88A6775F65553727" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_04122576E10C35099508775F6555FBF5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_858E6C41B6E0CF8F88A6775F65553727" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_04122576E10C35099508775F6555FBF5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_04122576E10C35099508775F6555FBF5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_858E6C41B6E0CF8F88A6775F65553727" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_04122576E10C35099508775F6555FBF5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SubsequentEventMember" xlink:label="loc_us-gaap_SubsequentEventMember_9BF2DED8503A5A58D4F7775F915DF458" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_04122576E10C35099508775F6555FBF5" xlink:to="loc_us-gaap_SubsequentEventMember_9BF2DED8503A5A58D4F7775F915DF458" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_A3EDC175ECD5AF0BE804775F65541C1E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_A3EDC175ECD5AF0BE804775F65541C1E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_EEE91982F164872A5A40775F6554A123_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_A3EDC175ECD5AF0BE804775F65541C1E" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_EEE91982F164872A5A40775F6554A123_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_EEE91982F164872A5A40775F6554A123" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_A3EDC175ECD5AF0BE804775F65541C1E" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_EEE91982F164872A5A40775F6554A123" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_AmplifySnackBrandsInc.Member" xlink:label="loc_hsy_AmplifySnackBrandsInc.Member_3B0502F0ADCFE71A0CBF775F65541CFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_EEE91982F164872A5A40775F6554A123" xlink:to="loc_hsy_AmplifySnackBrandsInc.Member_3B0502F0ADCFE71A0CBF775F65541CFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_35AF98622F3E0DC7DA19775F65548490" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_RangeAxis_35AF98622F3E0DC7DA19775F65548490" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_35AF98622F3E0DC7DA19775F65548490" xlink:to="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_35AF98622F3E0DC7DA19775F65548490" xlink:to="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_23D86579A2FD3E2A30A1775F6555BDF0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8" xlink:to="loc_us-gaap_MinimumMember_23D86579A2FD3E2A30A1775F6555BDF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_FBD38E874B1B071F4EC3775F6555BAE4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_67B76345A2A3F497DCE9775F655517F8" xlink:to="loc_us-gaap_MaximumMember_FBD38E874B1B071F4EC3775F6555BAE4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_C729D1A26DB7A6353ABE775F65550B1F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_CreditFacilityAxis_C729D1A26DB7A6353ABE775F65550B1F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_3EA361B1D24E291E65FC775F65552822_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_C729D1A26DB7A6353ABE775F65550B1F" xlink:to="loc_us-gaap_CreditFacilityDomain_3EA361B1D24E291E65FC775F65552822_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_3EA361B1D24E291E65FC775F65552822" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_C729D1A26DB7A6353ABE775F65550B1F" xlink:to="loc_us-gaap_CreditFacilityDomain_3EA361B1D24E291E65FC775F65552822" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevolvingCreditFacilityMember" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_D482D15F250C99806BE0775F655565DB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_3EA361B1D24E291E65FC775F65552822" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_D482D15F250C99806BE0775F655565DB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_D4801844A5C4DC17C583775F6555AF65" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_DebtInstrumentAxis_D4801844A5C4DC17C583775F6555AF65" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_6B2B18F6C47E8029F91D775F65554214_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_D4801844A5C4DC17C583775F6555AF65" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_6B2B18F6C47E8029F91D775F65554214_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_6B2B18F6C47E8029F91D775F65554214" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_D4801844A5C4DC17C583775F6555AF65" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_6B2B18F6C47E8029F91D775F65554214" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditMember" xlink:label="loc_us-gaap_LineOfCreditMember_4399D4564F7ECE3A8334775F65551151" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_6B2B18F6C47E8029F91D775F65554214" xlink:to="loc_us-gaap_LineOfCreditMember_4399D4564F7ECE3A8334775F65551151" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_68D4DB5ECFAC89C1A5B07761BBA93AD4" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SubsequentEventTable_3CDF53CE1AC0CA3DC964775F6553EFF9" xlink:to="loc_us-gaap_StatementScenarioAxis_68D4DB5ECFAC89C1A5B07761BBA93AD4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_C140227497084369F6BC7761BBB07259_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_68D4DB5ECFAC89C1A5B07761BBA93AD4" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_C140227497084369F6BC7761BBB07259_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_C140227497084369F6BC7761BBB07259" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_68D4DB5ECFAC89C1A5B07761BBA93AD4" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_C140227497084369F6BC7761BBB07259" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScenarioForecastMember" xlink:label="loc_us-gaap_ScenarioForecastMember_2DFEBDC66B06EA71EF5D77668807193A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_C140227497084369F6BC7761BBB07259" xlink:to="loc_us-gaap_ScenarioForecastMember_2DFEBDC66B06EA71EF5D77668807193A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_201837860F6C62F26577775F65557763" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_201837860F6C62F26577775F65557763" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNet" xlink:label="loc_us-gaap_SalesRevenueNet_1B15841F7406C36D93ED775F6555EA4E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_us-gaap_SalesRevenueNet_1B15841F7406C36D93ED775F6555EA4E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_9784B9C37712BA52197A775F65553FFE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_9784B9C37712BA52197A775F65553FFE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_BusinessCombinationConsiderationTransferredPerShareofCommonStock" xlink:label="loc_hsy_BusinessCombinationConsiderationTransferredPerShareofCommonStock_62A6D7A74FC774906B52775F65561BC6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_hsy_BusinessCombinationConsiderationTransferredPerShareofCommonStock_62A6D7A74FC774906B52775F65561BC6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt_C774EC84C488C4C520B3775F65563A43" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventLineItems_FAA33CE968D372CD3BAB775F6555E560" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesLongTermDebt_C774EC84C488C4C520B3775F65563A43" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SubsequentEventsSubsequentEventsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesAccountsReceivableTradeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FE0AE5610C4FB6D949A033C55D7FFD32" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_1CB70C4B5001C885E66533C55D7C9DEF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FE0AE5610C4FB6D949A033C55D7FFD32" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_1CB70C4B5001C885E66533C55D7C9DEF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorCustomersAxis" xlink:label="loc_us-gaap_MajorCustomersAxis_839B0B905B850B2E09FD33C55D7CCEB9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_1CB70C4B5001C885E66533C55D7C9DEF" xlink:to="loc_us-gaap_MajorCustomersAxis_839B0B905B850B2E09FD33C55D7CCEB9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorCustomersAxis_839B0B905B850B2E09FD33C55D7CCEB9" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorCustomersAxis_839B0B905B850B2E09FD33C55D7CCEB9" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_McLaneCompanyInc.Member" xlink:label="loc_hsy_McLaneCompanyInc.Member_6BDF61473069A886FFB833C55D7E421F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA" xlink:to="loc_hsy_McLaneCompanyInc.Member_6BDF61473069A886FFB833C55D7E421F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_TargetCorporationMember" xlink:label="loc_hsy_TargetCorporationMember_81979043A832CBADF9A633C55D7E3D4B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_55391A5CE7F9507CEFBD33C55D7EAECA" xlink:to="loc_hsy_TargetCorporationMember_81979043A832CBADF9A633C55D7E3D4B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_FFF22311D9FA9193C01633C55D7E7581" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_1CB70C4B5001C885E66533C55D7C9DEF" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_FFF22311D9FA9193C01633C55D7E7581" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_3A711C94F9C0DCF69B3133C55D7F34A2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_FFF22311D9FA9193C01633C55D7E7581" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_3A711C94F9C0DCF69B3133C55D7F34A2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_3A711C94F9C0DCF69B3133C55D7F34A2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_FFF22311D9FA9193C01633C55D7E7581" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_3A711C94F9C0DCF69B3133C55D7F34A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerConcentrationRiskMember" xlink:label="loc_us-gaap_CustomerConcentrationRiskMember_6CECAA4CAD7EB1FC353E33C55D7F06A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_3A711C94F9C0DCF69B3133C55D7F34A2" xlink:to="loc_us-gaap_CustomerConcentrationRiskMember_6CECAA4CAD7EB1FC353E33C55D7F06A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B71A013A7731D62968FF33C55D7FB75C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_1CB70C4B5001C885E66533C55D7C9DEF" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B71A013A7731D62968FF33C55D7FB75C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_AFD4CBC983DE8A15435033C55D7FFBBA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B71A013A7731D62968FF33C55D7FB75C" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_AFD4CBC983DE8A15435033C55D7FFBBA_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_AFD4CBC983DE8A15435033C55D7FFBBA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_B71A013A7731D62968FF33C55D7FB75C" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_AFD4CBC983DE8A15435033C55D7FFBBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableMember" xlink:label="loc_us-gaap_AccountsReceivableMember_132C3CAD9C9EB0FC71C933C55D7FD90D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_AFD4CBC983DE8A15435033C55D7FFBBA" xlink:to="loc_us-gaap_AccountsReceivableMember_132C3CAD9C9EB0FC71C933C55D7FD90D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_6E5BAE5DC7C08D55AAC533C55D7F40BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FE0AE5610C4FB6D949A033C55D7FFD32" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_6E5BAE5DC7C08D55AAC533C55D7F40BB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent" xlink:label="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_B9283869533D64EFCBF033C55D7F3AF1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_FE0AE5610C4FB6D949A033C55D7FFD32" xlink:to="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_B9283869533D64EFCBF033C55D7F3AF1" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesComputerSoftwareDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_C560769B0194EA438D36BB3095DC5070" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_E45203267BE57B25255BBB3095DCBD17" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_C560769B0194EA438D36BB3095DC5070" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_E45203267BE57B25255BBB3095DCBD17" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_A463312A83249B0B3E08BB3095DC643A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_E45203267BE57B25255BBB3095DCBD17" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_A463312A83249B0B3E08BB3095DC643A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2560D111D68D56C88136BB3095DCC03E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_A463312A83249B0B3E08BB3095DC643A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2560D111D68D56C88136BB3095DCC03E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2560D111D68D56C88136BB3095DCC03E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_A463312A83249B0B3E08BB3095DC643A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2560D111D68D56C88136BB3095DCC03E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SoftwareAndSoftwareDevelopmentCostsMember" xlink:label="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_FE2DADB64F38EBDEA388BB3095DC7156" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_2560D111D68D56C88136BB3095DCC03E" xlink:to="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_FE2DADB64F38EBDEA388BB3095DC7156" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_AEABC2A88456FBB7F1D6BB3095DC74BD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_E45203267BE57B25255BBB3095DCBD17" xlink:to="loc_us-gaap_RangeAxis_AEABC2A88456FBB7F1D6BB3095DC74BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_AEABC2A88456FBB7F1D6BB3095DC74BD" xlink:to="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_AEABC2A88456FBB7F1D6BB3095DC74BD" xlink:to="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_120764A6D9CFA8971961BB3095DC0EB4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB" xlink:to="loc_us-gaap_MinimumMember_120764A6D9CFA8971961BB3095DC0EB4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_3937B41BA4EAD244B027BB3095DC51FE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_B1261973A553C14C71B1BB3095DC6BFB" xlink:to="loc_us-gaap_MaximumMember_3937B41BA4EAD244B027BB3095DC51FE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalizedComputerSoftwareNet" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareNet_707C05FB149382F67D77BB3095DC4854" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_C560769B0194EA438D36BB3095DC5070" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareNet_707C05FB149382F67D77BB3095DC4854" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_E3ED98D70EB607A90FC8BB3095DCAF56" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_C560769B0194EA438D36BB3095DC5070" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_E3ED98D70EB607A90FC8BB3095DCAF56" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalizedComputerSoftwareAccumulatedAmortization" xlink:label="loc_us-gaap_CapitalizedComputerSoftwareAccumulatedAmortization_A5315DECF5AAF2AA5B32BB3095DC256B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_C560769B0194EA438D36BB3095DC5070" xlink:to="loc_us-gaap_CapitalizedComputerSoftwareAccumulatedAmortization_A5315DECF5AAF2AA5B32BB3095DC256B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesDescriptionOfBusinessAndBasisOfPresentationDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesGoodwillAndOtherIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4850226E4CD3D6FFBF85BB309175E4B3" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_80120AD53AD17EC2A1E8BB3091758E61" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4850226E4CD3D6FFBF85BB309175E4B3" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_80120AD53AD17EC2A1E8BB3091758E61" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_7851BB4D040EB00CDE56BB309175B342" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_80120AD53AD17EC2A1E8BB3091758E61" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_7851BB4D040EB00CDE56BB309175B342" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_7851BB4D040EB00CDE56BB309175B342" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_7851BB4D040EB00CDE56BB309175B342" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksMember" xlink:label="loc_us-gaap_TrademarksMember_959919EB297AD47987E3BB309175C799" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7" xlink:to="loc_us-gaap_TrademarksMember_959919EB297AD47987E3BB309175C799" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerRelationshipsMember" xlink:label="loc_us-gaap_CustomerRelationshipsMember_30D45D2FFD6B62D2725FBB309175EB53" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7" xlink:to="loc_us-gaap_CustomerRelationshipsMember_30D45D2FFD6B62D2725FBB309175EB53" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PatentsMember" xlink:label="loc_us-gaap_PatentsMember_F0C414E0A108BDBB9DB0BB3091753DC1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_239BE4C2742FA2F6152ABB30917578A7" xlink:to="loc_us-gaap_PatentsMember_F0C414E0A108BDBB9DB0BB3091753DC1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_61A46B78E9A9587FE671BB309175B8E1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4850226E4CD3D6FFBF85BB309175E4B3" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_61A46B78E9A9587FE671BB309175B8E1" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesInventoriesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesPropertyPlantAndEquipmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_75433E9104A117913EC98FD2EBA51D2C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_D776C41D649C5686BE4C8FD2EBA56685" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_75433E9104A117913EC98FD2EBA51D2C" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_D776C41D649C5686BE4C8FD2EBA56685" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_0FD901C653E4A7D0B8498FD2EBA54C04" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_D776C41D649C5686BE4C8FD2EBA56685" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_0FD901C653E4A7D0B8498FD2EBA54C04" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_0FD901C653E4A7D0B8498FD2EBA54C04" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_0FD901C653E4A7D0B8498FD2EBA54C04" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MachineryAndEquipmentMember" xlink:label="loc_us-gaap_MachineryAndEquipmentMember_4D3F2F537F521BF5AF198FD2EBA57048" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4" xlink:to="loc_us-gaap_MachineryAndEquipmentMember_4D3F2F537F521BF5AF198FD2EBA57048" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BuildingAndBuildingImprovementsMember" xlink:label="loc_us-gaap_BuildingAndBuildingImprovementsMember_60FC1F54226C0EA16BC28FD2EBA580D8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_AA1080AB0A408E79ED718FD2EBA5B9D4" xlink:to="loc_us-gaap_BuildingAndBuildingImprovementsMember_60FC1F54226C0EA16BC28FD2EBA580D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_490E50A676AAF88E80D58FD2EBA50437" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_D776C41D649C5686BE4C8FD2EBA56685" xlink:to="loc_us-gaap_RangeAxis_490E50A676AAF88E80D58FD2EBA50437" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_490E50A676AAF88E80D58FD2EBA50437" xlink:to="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_490E50A676AAF88E80D58FD2EBA50437" xlink:to="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_41889043256AA91D3B6C8FD2EBA5C60D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14" xlink:to="loc_us-gaap_MinimumMember_41889043256AA91D3B6C8FD2EBA5C60D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_00B58D590BF029A652288FD2EBA580BC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_BBD969539C73E11037188FD2EBA58D14" xlink:to="loc_us-gaap_MaximumMember_00B58D590BF029A652288FD2EBA580BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_727303C663B3639965AB8FD2EBA6AF12" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_75433E9104A117913EC98FD2EBA51D2C" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_727303C663B3639965AB8FD2EBA6AF12" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_CapitalLeasedAssetsNet" xlink:label="loc_hsy_CapitalLeasedAssetsNet_BE595B827FD1B2563E088FD2EBA6BC09" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_75433E9104A117913EC98FD2EBA51D2C" xlink:to="loc_hsy_CapitalLeasedAssetsNet_BE595B827FD1B2563E088FD2EBA6BC09" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Depreciation" xlink:label="loc_us-gaap_Depreciation_16727B6EAE13588B40FA8FE40C1AFD22" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_75433E9104A117913EC98FD2EBA51D2C" xlink:to="loc_us-gaap_Depreciation_16727B6EAE13588B40FA8FE40C1AFD22" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesRecentAccountingPronouncementsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_7D9A5D278A41FCE41B1B33C55D0D1490" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable" xlink:label="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_CB71244DDAAF220DD15033C55D0D37D1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_7D9A5D278A41FCE41B1B33C55D0D1490" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_CB71244DDAAF220DD15033C55D0D37D1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_A5E6D225317992F8491C33C55D0D9ADF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_CB71244DDAAF220DD15033C55D0D37D1" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_A5E6D225317992F8491C33C55D0D9ADF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_790CD81BA115A3E068B833C55D0DBCD6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_A5E6D225317992F8491C33C55D0D9ADF" xlink:to="loc_us-gaap_TypeOfAdoptionMember_790CD81BA115A3E068B833C55D0DBCD6_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_790CD81BA115A3E068B833C55D0DBCD6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_A5E6D225317992F8491C33C55D0D9ADF" xlink:to="loc_us-gaap_TypeOfAdoptionMember_790CD81BA115A3E068B833C55D0DBCD6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_AccountingStandardsUpdate201609ExcessTaxBenefitComponentMember" xlink:label="loc_hsy_AccountingStandardsUpdate201609ExcessTaxBenefitComponentMember_3D934E6FB6123251ABA633C55D0D89B1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_790CD81BA115A3E068B833C55D0DBCD6" xlink:to="loc_hsy_AccountingStandardsUpdate201609ExcessTaxBenefitComponentMember_3D934E6FB6123251ABA633C55D0D89B1" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_EffectiveIncomeTaxRateReconciliationSharebasedCompensationExcessTaxBenefitAmount" xlink:label="loc_hsy_EffectiveIncomeTaxRateReconciliationSharebasedCompensationExcessTaxBenefitAmount_5FA918F4DAC77E2F815733C55D0D46BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_7D9A5D278A41FCE41B1B33C55D0D1490" xlink:to="loc_hsy_EffectiveIncomeTaxRateReconciliationSharebasedCompensationExcessTaxBenefitAmount_5FA918F4DAC77E2F815733C55D0D46BB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_8657E6A881AC9512D62E33C55D0DC8E5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_7D9A5D278A41FCE41B1B33C55D0D1490" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_8657E6A881AC9512D62E33C55D0DC8E5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_BBD95822892DDB6C012C33C55D0D9420" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_7D9A5D278A41FCE41B1B33C55D0D1490" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_BBD95822892DDB6C012C33C55D0D9420" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_0F703DA4296B052AE0CFBB30951E5A72" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_809D2EA3B6085C4831B9BB30951E70BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_0F703DA4296B052AE0CFBB30951E5A72" xlink:to="loc_us-gaap_StatementTable_809D2EA3B6085C4831B9BB30951E70BC" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_E81253B643CCB98ECCA2BB30951EF3D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_809D2EA3B6085C4831B9BB30951E70BC" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_E81253B643CCB98ECCA2BB30951EF3D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_DAAAF30AD669604F7492BB30951E0AB0_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_E81253B643CCB98ECCA2BB30951EF3D0" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_DAAAF30AD669604F7492BB30951E0AB0_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_DAAAF30AD669604F7492BB30951E0AB0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_E81253B643CCB98ECCA2BB30951EF3D0" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_DAAAF30AD669604F7492BB30951E0AB0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueGoodsNetMember" xlink:label="loc_us-gaap_SalesRevenueGoodsNetMember_5AB973A5966E01C6D277BB30951E5311" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_DAAAF30AD669604F7492BB30951E0AB0" xlink:to="loc_us-gaap_SalesRevenueGoodsNetMember_5AB973A5966E01C6D277BB30951E5311" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_EB0FE189813D75D2976CBB30951EFB2F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_809D2EA3B6085C4831B9BB30951E70BC" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_EB0FE189813D75D2976CBB30951EFB2F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_429B23B801A35538BA24BB30951E5251_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_EB0FE189813D75D2976CBB30951EFB2F" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_429B23B801A35538BA24BB30951E5251_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_429B23B801A35538BA24BB30951E5251" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_EB0FE189813D75D2976CBB30951EFB2F" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_429B23B801A35538BA24BB30951E5251" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerConcentrationRiskMember" xlink:label="loc_us-gaap_CustomerConcentrationRiskMember_1E91DDC063BDF7A961DEBB30951E3785" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_429B23B801A35538BA24BB30951E5251" xlink:to="loc_us-gaap_CustomerConcentrationRiskMember_1E91DDC063BDF7A961DEBB30951E3785" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorCustomersAxis" xlink:label="loc_us-gaap_MajorCustomersAxis_84526C7BE8980E6DCCECBB30951EEF43" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_809D2EA3B6085C4831B9BB30951E70BC" xlink:to="loc_us-gaap_MajorCustomersAxis_84526C7BE8980E6DCCECBB30951EEF43" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_B4FF99219C34FF565CE9BB30951EBA48_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorCustomersAxis_84526C7BE8980E6DCCECBB30951EEF43" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_B4FF99219C34FF565CE9BB30951EBA48_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_B4FF99219C34FF565CE9BB30951EBA48" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorCustomersAxis_84526C7BE8980E6DCCECBB30951EEF43" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_B4FF99219C34FF565CE9BB30951EBA48" xlink:type="arc" />
    <link:loc xlink:href="hsy-20171231.xsd#hsy_McLaneCompanyInc.Member" xlink:label="loc_hsy_McLaneCompanyInc.Member_F40B00B82C843F89C958BB30951E95A3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_B4FF99219C34FF565CE9BB30951EBA48" xlink:to="loc_hsy_McLaneCompanyInc.Member_F40B00B82C843F89C958BB30951E95A3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_98AA7696769AB909F005BB30951E9C73" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_0F703DA4296B052AE0CFBB30951E5A72" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_98AA7696769AB909F005BB30951E9C73" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesSellingMarketingAndAdministrativeExpenseDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SupplementalBalanceSheetInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SupplementalBalanceSheetInformationTables" xlink:type="extended" />
</link:linkbase>
