<?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/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleDetails" xlink:href="hsy-20180701.xsd#AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleNotes" xlink:href="hsy-20180701.xsd#AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleTables" xlink:href="hsy-20180701.xsd#AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisition" xlink:href="hsy-20180701.xsd#BusinessAcquisition" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionAmplifySnackBrandsIncAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:href="hsy-20180701.xsd#BusinessAcquisitionAmplifySnackBrandsIncAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionAmplifySnackBrandsIncNarrativeDetails" xlink:href="hsy-20180701.xsd#BusinessAcquisitionAmplifySnackBrandsIncNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessAcquisitionTables" xlink:href="hsy-20180701.xsd#BusinessAcquisitionTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivities" xlink:href="hsy-20180701.xsd#BusinessRealignmentActivities" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesBusinessRealignmentActivitiesNarrativeDetails" xlink:href="hsy-20180701.xsd#BusinessRealignmentActivitiesBusinessRealignmentActivitiesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfBusinessRealignmentActivityDetails" xlink:href="hsy-20180701.xsd#BusinessRealignmentActivitiesScheduleOfBusinessRealignmentActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesScheduleOfLiabilityActivityForCostsQualifyingAsExitAndDisposalCostsDetails" xlink:href="hsy-20180701.xsd#BusinessRealignmentActivitiesScheduleOfLiabilityActivityForCostsQualifyingAsExitAndDisposalCostsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/BusinessRealignmentActivitiesTables" xlink:href="hsy-20180701.xsd#BusinessRealignmentActivitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedBalanceSheets" xlink:href="hsy-20180701.xsd#ConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="hsy-20180701.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="hsy-20180701.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfComprehensiveIncome" xlink:href="hsy-20180701.xsd#ConsolidatedStatementsOfComprehensiveIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfIncome" xlink:href="hsy-20180701.xsd#ConsolidatedStatementsOfIncome" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquity" xlink:href="hsy-20180701.xsd#ConsolidatedStatementsOfStockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ConsolidatedStatementsOfStockholdersEquityParenthetical" xlink:href="hsy-20180701.xsd#ConsolidatedStatementsOfStockholdersEquityParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/Contingencies" xlink:href="hsy-20180701.xsd#Contingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ContingenciesContingenciesNarrativeDetails" xlink:href="hsy-20180701.xsd#ContingenciesContingenciesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ContingenciesTables" xlink:href="hsy-20180701.xsd#ContingenciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstruments" xlink:href="hsy-20180701.xsd#DerivativeInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsDerivativeInstrumentsNarrativeDetails" xlink:href="hsy-20180701.xsd#DerivativeInstrumentsDerivativeInstrumentsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfClassificationOfDerivativeAssetsAndLiabilitiesWithinConsolidatedBalanceSheetsDetails" xlink:href="hsy-20180701.xsd#DerivativeInstrumentsScheduleOfClassificationOfDerivativeAssetsAndLiabilitiesWithinConsolidatedBalanceSheetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsScheduleOfEffectOfDerivativeInstrumentsOnConsolidatedStatementsOfIncomeDetails" xlink:href="hsy-20180701.xsd#DerivativeInstrumentsScheduleOfEffectOfDerivativeInstrumentsOnConsolidatedStatementsOfIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DerivativeInstrumentsTables" xlink:href="hsy-20180701.xsd#DerivativeInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/DocumentAndEntityInformation" xlink:href="hsy-20180701.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShare" xlink:href="hsy-20180701.xsd#EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShareEarningsPerShareNarrativeDetails" xlink:href="hsy-20180701.xsd#EarningsPerShareEarningsPerShareNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/EarningsPerShareTables" xlink:href="hsy-20180701.xsd#EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurements" xlink:href="hsy-20180701.xsd#FairValueMeasurementsFairValueMeasurements" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsNarrativeDetails" xlink:href="hsy-20180701.xsd#FairValueMeasurementsFairValueMeasurementsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsFairValueMeasurementsTables" xlink:href="hsy-20180701.xsd#FairValueMeasurementsFairValueMeasurementsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueDetails" xlink:href="hsy-20180701.xsd#FairValueMeasurementsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/FairValueMeasurementsScheduleOfFairValuesAndCarryingValuesOfLongTermDebtDetails" xlink:href="hsy-20180701.xsd#FairValueMeasurementsScheduleOfFairValuesAndCarryingValuesOfLongTermDebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssets" xlink:href="hsy-20180701.xsd#GoodwillAndIntangibleAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsGoodwillAndIntangibleAssetsNarrativeDetails" xlink:href="hsy-20180701.xsd#GoodwillAndIntangibleAssetsGoodwillAndIntangibleAssetsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfChangesInCarryingValueOfGoodwillByReportableSegmentDetails" xlink:href="hsy-20180701.xsd#GoodwillAndIntangibleAssetsScheduleOfChangesInCarryingValueOfGoodwillByReportableSegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsScheduleOfGrossCarryingAmountAndAccumulatedAmortizationForEachMajorClassOfIntangibleAssetDetails" xlink:href="hsy-20180701.xsd#GoodwillAndIntangibleAssetsScheduleOfGrossCarryingAmountAndAccumulatedAmortizationForEachMajorClassOfIntangibleAssetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/GoodwillAndIntangibleAssetsTables" xlink:href="hsy-20180701.xsd#GoodwillAndIntangibleAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxes" xlink:href="hsy-20180701.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/IncomeTaxesIncomeTaxesDetails" xlink:href="hsy-20180701.xsd#IncomeTaxesIncomeTaxesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/NoncontrollingInterestNarrativeDetails" xlink:href="hsy-20180701.xsd#NoncontrollingInterestNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/NoncontrollingInterestNoncontrollingInterestNotes" xlink:href="hsy-20180701.xsd#NoncontrollingInterestNoncontrollingInterestNotes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/NoncontrollingInterestNoncontrollingInterestTables" xlink:href="hsy-20180701.xsd#NoncontrollingInterestNoncontrollingInterestTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/NoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" xlink:href="hsy-20180701.xsd#NoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNet" xlink:href="hsy-20180701.xsd#OtherIncomeExpenseNetOtherIncomeExpenseNet" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetOtherIncomeExpenseNetTables" xlink:href="hsy-20180701.xsd#OtherIncomeExpenseNetOtherIncomeExpenseNetTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/OtherIncomeExpenseNetScheduleOfOtherIncomeAndExpenseNetDetails" xlink:href="hsy-20180701.xsd#OtherIncomeExpenseNetScheduleOfOtherIncomeAndExpenseNetDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlans" xlink:href="hsy-20180701.xsd#PensionAndOtherPostRetirementBenefitPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansPensionAndOtherPostRetirementBenefitPlansNarrativeDetails" xlink:href="hsy-20180701.xsd#PensionAndOtherPostRetirementBenefitPlansPensionAndOtherPostRetirementBenefitPlansNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansScheduleOfComponentsOfNetPeriodicBenefitCostDetails" xlink:href="hsy-20180701.xsd#PensionAndOtherPostRetirementBenefitPlansScheduleOfComponentsOfNetPeriodicBenefitCostDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/PensionAndOtherPostRetirementBenefitPlansTables" xlink:href="hsy-20180701.xsd#PensionAndOtherPostRetirementBenefitPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfBasicAndDilutedEarningsPerShareDetails" xlink:href="hsy-20180701.xsd#ScheduleOfBasicAndDilutedEarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfDepreciationAndAmortizationExpenseIncludedWithinSegmentIncomeDetails" xlink:href="hsy-20180701.xsd#ScheduleOfDepreciationAndAmortizationExpenseIncludedWithinSegmentIncomeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfNetSalesAndEarningsBySegmentDetails" xlink:href="hsy-20180701.xsd#ScheduleOfNetSalesAndEarningsBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ScheduleOfSupplementalBalanceSheetInformationDetails" xlink:href="hsy-20180701.xsd#ScheduleOfSupplementalBalanceSheetInformationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformation" xlink:href="hsy-20180701.xsd#SegmentInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationNarrativeDetails" xlink:href="hsy-20180701.xsd#SegmentInformationNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationScheduleOfUnallocatedMarkToMarketGainsLossesOnCommodityDerivativesDetails" xlink:href="hsy-20180701.xsd#SegmentInformationScheduleOfUnallocatedMarkToMarketGainsLossesOnCommodityDerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SegmentInformationTables" xlink:href="hsy-20180701.xsd#SegmentInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebt" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtInterestRatesDetails" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtLongTermDebtInterestRatesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtLongTermDebtNarrativeDetails" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtLongTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfLongTermDebtInstrumentsDetails" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtScheduleOfLongTermDebtInstrumentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtScheduleOfNetInterestExpenseDetails" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtScheduleOfNetInterestExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtShortTermDebtNarrativeDetails" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtShortTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/ShortAndLongTermDebtTables" xlink:href="hsy-20180701.xsd#ShortAndLongTermDebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlans" xlink:href="hsy-20180701.xsd#StockCompensationPlans" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfCompensationExpenseAndIncomeTaxBenefitsForStockBasedCompensationProgramsDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansScheduleOfCompensationExpenseAndIncomeTaxBenefitsForStockBasedCompensationProgramsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfFairValueWeightedAverageAssumptionsDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansScheduleOfFairValueWeightedAverageAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusActivityDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansScheduleOfPsusAndRsusActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfPsusAndRsusFairValueWeightedAverageAssumptionsDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansScheduleOfPsusAndRsusFairValueWeightedAverageAssumptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansScheduleOfStockOptionActivityDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansScheduleOfStockOptionActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansStockCompensationPlansNarrativeDetails" xlink:href="hsy-20180701.xsd#StockCompensationPlansStockCompensationPlansNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/StockCompensationPlansTables" xlink:href="hsy-20180701.xsd#StockCompensationPlansTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPolicies" xlink:href="hsy-20180701.xsd#SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:href="hsy-20180701.xsd#SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesRecentAccountingPronouncementsDetails" xlink:href="hsy-20180701.xsd#SummaryOfSignificantAccountingPoliciesRecentAccountingPronouncementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SummaryOfSignificantAccountingPoliciesTables" xlink:href="hsy-20180701.xsd#SummaryOfSignificantAccountingPoliciesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SupplementalBalanceSheetInformation" xlink:href="hsy-20180701.xsd#SupplementalBalanceSheetInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/SupplementalBalanceSheetInformationTables" xlink:href="hsy-20180701.xsd#SupplementalBalanceSheetInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/TreasuryStockActivityNarrativeDetails" xlink:href="hsy-20180701.xsd#TreasuryStockActivityNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/TreasuryStockActivityScheduleOfTreasuryStockActivityDetails" xlink:href="hsy-20180701.xsd#TreasuryStockActivityScheduleOfTreasuryStockActivityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/TreasuryStockActivityTreasuryStockActivity" xlink:href="hsy-20180701.xsd#TreasuryStockActivityTreasuryStockActivity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.hersheys.com/role/TreasuryStockActivityTreasuryStockActivityTables" xlink:href="hsy-20180701.xsd#TreasuryStockActivityTreasuryStockActivityTables" 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/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleDetails" 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_35E3D2C2AE5C0AD34A21B7FBB6493E12" 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_86FAC27ACEDA91A2942AB7FBB63C206A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_35E3D2C2AE5C0AD34A21B7FBB6493E12" xlink:to="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_86FAC27ACEDA91A2942AB7FBB63C206A" 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_IndefiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_30B781F1C48DD58AE305B7FC7A66685F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsTable_86FAC27ACEDA91A2942AB7FBB63C206A" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_30B781F1C48DD58AE305B7FC7A66685F" 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_58DED6DA9285A13C6A27B7FC7A767856_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_30B781F1C48DD58AE305B7FC7A66685F" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_58DED6DA9285A13C6A27B7FC7A767856_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_58DED6DA9285A13C6A27B7FC7A767856" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_30B781F1C48DD58AE305B7FC7A66685F" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_58DED6DA9285A13C6A27B7FC7A767856" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LicensingAgreementsMember" xlink:label="loc_us-gaap_LicensingAgreementsMember_E87F187B106A1FF570ACB7FCACC0AEED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_58DED6DA9285A13C6A27B7FC7A767856" xlink:to="loc_us-gaap_LicensingAgreementsMember_E87F187B106A1FF570ACB7FCACC0AEED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ProceedsFromSaleOfIntangibleAssets" xlink:label="loc_us-gaap_ProceedsFromSaleOfIntangibleAssets_9D803B546CB0E2FEF7D9B7FAAF708C63" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_35E3D2C2AE5C0AD34A21B7FBB6493E12" xlink:to="loc_us-gaap_ProceedsFromSaleOfIntangibleAssets_9D803B546CB0E2FEF7D9B7FAAF708C63" 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_D33FAEB9250F50E3EA33B7FB31CDF378" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementBalanceSheetAndAdditionalDisclosuresByDisposalGroupsIncludingDiscontinuedOperationsLineItems_35E3D2C2AE5C0AD34A21B7FBB6493E12" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_D33FAEB9250F50E3EA33B7FB31CDF378" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleNotes" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/AssetsAndLiabilitiesHeldForSaleAssetsAndLiabilitiesHeldForSaleTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisition" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionAmplifySnackBrandsIncAssetsAcquiredAndLiabilitiesAssumedAllocationDetails" 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_09D5548950E536BD49BEB7F50C1EF3C3" 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_730A23D57ADCECF30C62B7F50C1C0162" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_730A23D57ADCECF30C62B7F50C1C0162" 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_71A357D7F0761A230B5FB7F50C1D8593" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_730A23D57ADCECF30C62B7F50C1C0162" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_71A357D7F0761A230B5FB7F50C1D8593" 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_4B852BD3FC3133D23D64B7F50C1DEDB6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_71A357D7F0761A230B5FB7F50C1D8593" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4B852BD3FC3133D23D64B7F50C1DEDB6_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_4B852BD3FC3133D23D64B7F50C1DEDB6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_71A357D7F0761A230B5FB7F50C1D8593" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4B852BD3FC3133D23D64B7F50C1DEDB6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AmplifySnackBrandsInc.Member" xlink:label="loc_hsy_AmplifySnackBrandsInc.Member_4B66749071467F920A7DB7F50C1DD951" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_4B852BD3FC3133D23D64B7F50C1DEDB6" xlink:to="loc_hsy_AmplifySnackBrandsInc.Member_4B66749071467F920A7DB7F50C1DD951" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_764C96E56FAFC4B4C890B7F50C1FB274" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_764C96E56FAFC4B4C890B7F50C1FB274" 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_FDD759015E2793487D4EB7F50C224BDF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_FDD759015E2793487D4EB7F50C224BDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment_C0FC3AA497AB631BC727B7F50C226BB6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedEquipment_C0FC3AA497AB631BC727B7F50C226BB6" 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_16D47FFC0E8F5B2928CFB7F50C2389B8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_Goodwill_16D47FFC0E8F5B2928CFB7F50C2389B8" 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_887BD0A0AB9FCDAB0916B7F50C23C9E8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_887BD0A0AB9FCDAB0916B7F50C23C9E8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentAssets" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentAssets_229705094F16FA65DB6AB7F50C236C9D" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentAssets_229705094F16FA65DB6AB7F50C236C9D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_2A60689AAE1206796FDDB7F50C238A92" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable_2A60689AAE1206796FDDB7F50C238A92" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesAccruedLiabilities" xlink:label="loc_hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesAccruedLiabilities_9CDE37F588E8EA710680B7F50C2303D6" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesAccruedLiabilities_9CDE37F588E8EA710680B7F50C2303D6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesDebt" xlink:label="loc_hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesDebt_F008B249E4E88D16CCBBB7F50C24F643" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_hsy_BusinessCombinationRecognizedIdentifiableAssetsAcquiredandLiabilitiesAssumedCurrentLiabilitiesDebt_F008B249E4E88D16CCBBB7F50C24F643" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6A9BF1EF3CEDA143E049B7F50C24299F" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_6A9BF1EF3CEDA143E049B7F50C24299F" 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_111A5DB2BB5F6E1075E2B7F50C24E2F0" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilitiesNoncurrent_111A5DB2BB5F6E1075E2B7F50C24E2F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities_3EE2A3FB6EA1A7E257A6B7F50C245E2E" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities_3EE2A3FB6EA1A7E257A6B7F50C245E2E" 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_ADCE227142A232F23FA8B7F50C243A08" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_09D5548950E536BD49BEB7F50C1EF3C3" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_ADCE227142A232F23FA8B7F50C243A08" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionAmplifySnackBrandsIncNarrativeDetails" 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_E9D1CE75DAB3077D425CB7F50C40F474" 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_69A02627A2760EB08489B7F50C3B1DCB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69A02627A2760EB08489B7F50C3B1DCB" 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_B5190A4C93A457A4162AB7F50C3C4CC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69A02627A2760EB08489B7F50C3B1DCB" xlink:to="loc_us-gaap_RangeAxis_B5190A4C93A457A4162AB7F50C3C4CC9" 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_AD7CED8C92505D819EBAB7F50C3CE44B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_B5190A4C93A457A4162AB7F50C3C4CC9" xlink:to="loc_us-gaap_RangeMember_AD7CED8C92505D819EBAB7F50C3CE44B_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_AD7CED8C92505D819EBAB7F50C3CE44B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_B5190A4C93A457A4162AB7F50C3C4CC9" xlink:to="loc_us-gaap_RangeMember_AD7CED8C92505D819EBAB7F50C3CE44B" 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_05844B75BBAD4DABBFAAB7F50C3C5E47" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_AD7CED8C92505D819EBAB7F50C3CE44B" xlink:to="loc_us-gaap_MinimumMember_05844B75BBAD4DABBFAAB7F50C3C5E47" 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_393E41324B37E149CF55B7F50C3D1F7A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_AD7CED8C92505D819EBAB7F50C3CE44B" xlink:to="loc_us-gaap_MaximumMember_393E41324B37E149CF55B7F50C3D1F7A" 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_14C3BA2A1F102FD2631DB7F50C3D7A60" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69A02627A2760EB08489B7F50C3B1DCB" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_14C3BA2A1F102FD2631DB7F50C3D7A60" 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_A4BD86FAF56A585E9432B7F50C3DF43C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_14C3BA2A1F102FD2631DB7F50C3D7A60" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_A4BD86FAF56A585E9432B7F50C3DF43C_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_A4BD86FAF56A585E9432B7F50C3DF43C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_14C3BA2A1F102FD2631DB7F50C3D7A60" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_A4BD86FAF56A585E9432B7F50C3DF43C" 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_F19DBBA0C418C4B9A54BB7F50C3D6251" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_A4BD86FAF56A585E9432B7F50C3DF43C" xlink:to="loc_us-gaap_TrademarksMember_F19DBBA0C418C4B9A54BB7F50C3D6251" 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_BB7F23EE57BB8B444F3AB7F50C3E38A9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_A4BD86FAF56A585E9432B7F50C3DF43C" xlink:to="loc_us-gaap_CustomerRelationshipsMember_BB7F23EE57BB8B444F3AB7F50C3E38A9" 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_9530065375FA45EA929CB7F50C3E80C1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69A02627A2760EB08489B7F50C3B1DCB" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_9530065375FA45EA929CB7F50C3E80C1" 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_B3A7B951FEAA49787997B7F50C3F8C1D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_9530065375FA45EA929CB7F50C3E80C1" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3A7B951FEAA49787997B7F50C3F8C1D_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_B3A7B951FEAA49787997B7F50C3F8C1D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_9530065375FA45EA929CB7F50C3E80C1" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3A7B951FEAA49787997B7F50C3F8C1D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AmplifySnackBrandsInc.Member" xlink:label="loc_hsy_AmplifySnackBrandsInc.Member_04C1CDE15EAABCBE0129B7F50C3FC2E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_B3A7B951FEAA49787997B7F50C3F8C1D" xlink:to="loc_hsy_AmplifySnackBrandsInc.Member_04C1CDE15EAABCBE0129B7F50C3FC2E9" 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_28882B51A455AC72CC61B7F50C40A5CF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesGross_28882B51A455AC72CC61B7F50C40A5CF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessAcquisitionSharePrice" xlink:label="loc_us-gaap_BusinessAcquisitionSharePrice_1908D399826BAA94BA16B7F50C4067C3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_BusinessAcquisitionSharePrice_1908D399826BAA94BA16B7F50C4067C3" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_BusinessAcquisitionEquityInterestsReceivedCommonStockValue" xlink:label="loc_hsy_BusinessAcquisitionEquityInterestsReceivedCommonStockValue_CC4E7474BFB3765F32C3B7F50C4062DF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_hsy_BusinessAcquisitionEquityInterestsReceivedCommonStockValue_CC4E7474BFB3765F32C3B7F50C4062DF" 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_B7EDF461C10F15ABCCF1B7F50C415CE8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCashAndEquivalents_B7EDF461C10F15ABCCF1B7F50C415CE8" 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_EE7E88205524E6C2124CB7F50C411F22" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_EE7E88205524E6C2124CB7F50C411F22" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedTrademarksGross" xlink:label="loc_us-gaap_FiniteLivedTrademarksGross_2694015AF2B1489A6160B7F50C410521" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_FiniteLivedTrademarksGross_2694015AF2B1489A6160B7F50C410521" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedCustomerRelationshipsGross" xlink:label="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_0447A67C9544B3536F96B7F50C419147" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_0447A67C9544B3536F96B7F50C419147" 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_180DAFCAE8F295AB7ACFB7F50C4205B6" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_180DAFCAE8F295AB7ACFB7F50C4205B6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BusinessCombinationAcquisitionRelatedCosts" xlink:label="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_76053696178AD90701F8B7F50C42DBDA" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_E9D1CE75DAB3077D425CB7F50C40F474" xlink:to="loc_us-gaap_BusinessCombinationAcquisitionRelatedCosts_76053696178AD90701F8B7F50C42DBDA" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BusinessAcquisitionTables" 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_6599C6EDFCE7E1CA9D4AB7F50C30A6F0" 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_9F3D869E4B599BB93202B7F50C2F4CA7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6599C6EDFCE7E1CA9D4AB7F50C30A6F0" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_9F3D869E4B599BB93202B7F50C2F4CA7" 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_8E7543563D86F033EEF9B7F50C2F144B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_9F3D869E4B599BB93202B7F50C2F4CA7" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_8E7543563D86F033EEF9B7F50C2F144B" 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_316290E28F52243EEE8EB7F50C2FF297_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8E7543563D86F033EEF9B7F50C2F144B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_316290E28F52243EEE8EB7F50C2FF297_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_316290E28F52243EEE8EB7F50C2FF297" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8E7543563D86F033EEF9B7F50C2F144B" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_316290E28F52243EEE8EB7F50C2FF297" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AmplifySnackBrandsInc.Member" xlink:label="loc_hsy_AmplifySnackBrandsInc.Member_3A29650D39DA6B7C65E9B7F50C30ABA7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_316290E28F52243EEE8EB7F50C2FF297" xlink:to="loc_hsy_AmplifySnackBrandsInc.Member_3A29650D39DA6B7C65E9B7F50C30ABA7" 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_D0B04E50D1D92CFC3773B7F50C305301" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6599C6EDFCE7E1CA9D4AB7F50C30A6F0" xlink:to="loc_us-gaap_ScheduleOfRecognizedIdentifiedAssetsAcquiredAndLiabilitiesAssumedTableTextBlock_D0B04E50D1D92CFC3773B7F50C305301" 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_B3C2F8AB149510013673B7F57BCA75EA" 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_F222865086E935D5617EB7F57BC3407B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" 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_F3ACFF71F18498DA77F1B7F57BC3F760" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_RangeAxis_F3ACFF71F18498DA77F1B7F57BC3F760" 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_363D09398D8004FDBC4AB7F57BC49114_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_F3ACFF71F18498DA77F1B7F57BC3F760" xlink:to="loc_us-gaap_RangeMember_363D09398D8004FDBC4AB7F57BC49114_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_363D09398D8004FDBC4AB7F57BC49114" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_F3ACFF71F18498DA77F1B7F57BC3F760" xlink:to="loc_us-gaap_RangeMember_363D09398D8004FDBC4AB7F57BC49114" 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_24640A2AA47D56426813B7F57BC4A24B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_363D09398D8004FDBC4AB7F57BC49114" xlink:to="loc_us-gaap_MinimumMember_24640A2AA47D56426813B7F57BC4A24B" 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_4A76448867D3472A4586B7F57BC4D00B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_363D09398D8004FDBC4AB7F57BC49114" xlink:to="loc_us-gaap_MaximumMember_4A76448867D3472A4586B7F57BC4D00B" 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_31EEF99D83EA846C79F0B7F57BC48BEF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_31EEF99D83EA846C79F0B7F57BC48BEF" 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_A613A6A0BCCED1E5DAA0B7F57BC44962_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_31EEF99D83EA846C79F0B7F57BC48BEF" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_A613A6A0BCCED1E5DAA0B7F57BC44962_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_A613A6A0BCCED1E5DAA0B7F57BC44962" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_31EEF99D83EA846C79F0B7F57BC48BEF" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_A613A6A0BCCED1E5DAA0B7F57BC44962" 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_0D52720312AA91C66E21B7F57BC5A0DC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_A613A6A0BCCED1E5DAA0B7F57BC44962" xlink:to="loc_us-gaap_RestructuringChargesMember_0D52720312AA91C66E21B7F57BC5A0DC" 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_3CD497F82EEE2D97CC0AB7F57BC56070" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_3CD497F82EEE2D97CC0AB7F57BC56070" 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_55F4F3B7C024FDC4D762B7F57BC51442_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_3CD497F82EEE2D97CC0AB7F57BC56070" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_55F4F3B7C024FDC4D762B7F57BC51442_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_55F4F3B7C024FDC4D762B7F57BC51442" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_3CD497F82EEE2D97CC0AB7F57BC56070" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_55F4F3B7C024FDC4D762B7F57BC51442" 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_E2EDF59E8E87874A5321B7F57BC6FCA6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_55F4F3B7C024FDC4D762B7F57BC51442" xlink:to="loc_us-gaap_GeographicConcentrationRiskMember_E2EDF59E8E87874A5321B7F57BC6FCA6" 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_CBC6CCF0B55C2626602BB7F57BC60B13" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_CBC6CCF0B55C2626602BB7F57BC60B13" 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_877889ED8E2A5D634825B7F57BC69FA4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_CBC6CCF0B55C2626602BB7F57BC60B13" xlink:to="loc_us-gaap_SegmentDomain_877889ED8E2A5D634825B7F57BC69FA4_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_877889ED8E2A5D634825B7F57BC69FA4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_CBC6CCF0B55C2626602BB7F57BC60B13" xlink:to="loc_us-gaap_SegmentDomain_877889ED8E2A5D634825B7F57BC69FA4" 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_CD5FEF29212B5AC76828B7F57BC67891" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_877889ED8E2A5D634825B7F57BC69FA4" xlink:to="loc_us-gaap_NorthAmericaMember_CD5FEF29212B5AC76828B7F57BC67891" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_2C5E9A84B437C7E93681B7F57BC6993C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_877889ED8E2A5D634825B7F57BC69FA4" xlink:to="loc_hsy_InternationalandOtherSegmentMember_2C5E9A84B437C7E93681B7F57BC6993C" 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_1E2FCEFC361EB757B5CFB7F57BC76B37" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_RestructuringPlanAxis_1E2FCEFC361EB757B5CFB7F57BC76B37" 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_459A385EEF4271F88477B7F57BC75B94_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_1E2FCEFC361EB757B5CFB7F57BC76B37" xlink:to="loc_us-gaap_RestructuringPlanDomain_459A385EEF4271F88477B7F57BC75B94_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_459A385EEF4271F88477B7F57BC75B94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_1E2FCEFC361EB757B5CFB7F57BC76B37" xlink:to="loc_us-gaap_RestructuringPlanDomain_459A385EEF4271F88477B7F57BC75B94" 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_B5C611F169E3EBA79736B7F57BC8D50E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_459A385EEF4271F88477B7F57BC75B94" xlink:to="loc_us-gaap_NorthAmericaMember_B5C611F169E3EBA79736B7F57BC8D50E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_D06400FE9CBF39FD9D9FB7F57BC8B733" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_459A385EEF4271F88477B7F57BC75B94" xlink:to="loc_hsy_MarginforGrowthProgramMember_D06400FE9CBF39FD9D9FB7F57BC8B733" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_ChinaStructureOptimizationMember" xlink:label="loc_hsy_ChinaStructureOptimizationMember_6488D28F70A164FCDAF4B7F57BC84E48" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_459A385EEF4271F88477B7F57BC75B94" xlink:to="loc_hsy_ChinaStructureOptimizationMember_6488D28F70A164FCDAF4B7F57BC84E48" 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_CF7C5D1B2CAED10B5459B7F57BC9BC0C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_F222865086E935D5617EB7F57BC3407B" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_CF7C5D1B2CAED10B5459B7F57BC9BC0C" 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_1FC3CFC016B70B14D911B7F57BC9A896_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_CF7C5D1B2CAED10B5459B7F57BC9BC0C" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896_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_1FC3CFC016B70B14D911B7F57BC9A896" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_CF7C5D1B2CAED10B5459B7F57BC9BC0C" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" 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_847662376A2E6C0212ABB7F57BC928DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" xlink:to="loc_us-gaap_FacilityClosingMember_847662376A2E6C0212ABB7F57BC928DE" 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_51F0AF81C1EF3EA62123B7F57BC9187D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" xlink:to="loc_us-gaap_EmployeeSeveranceMember_51F0AF81C1EF3EA62123B7F57BC9187D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AcceleratedDepreciationandAmortizationMember" xlink:label="loc_hsy_AcceleratedDepreciationandAmortizationMember_8059293A6A503113D68BB7F57BCA5726" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" xlink:to="loc_hsy_AcceleratedDepreciationandAmortizationMember_8059293A6A503113D68BB7F57BCA5726" 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_A623AF5DC93C743969C4B7F57BCAB803" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" xlink:to="loc_us-gaap_ContractTerminationMember_A623AF5DC93C743969C4B7F57BCAB803" 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_2A3B7FFDE11E9A7FF97BB7F57BCA161C" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_1FC3CFC016B70B14D911B7F57BC9A896" xlink:to="loc_us-gaap_OtherRestructuringMember_2A3B7FFDE11E9A7FF97BB7F57BCA161C" 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_03A1C644D23386652D0DB7F57BCAECF3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_03A1C644D23386652D0DB7F57BCAECF3" 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_AF3653798CEF530EB6D4B7F57BCB9FD1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_AF3653798CEF530EB6D4B7F57BCB9FD1" 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_4CBB2FEBD9902B4D6036B7F57BCB37C6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_EffectOnFutureCashFlowsAmount_4CBB2FEBD9902B4D6036B7F57BCB37C6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent" xlink:label="loc_hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent_EB6976031160C3E80D0EB7F57BCB3070" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_hsy_RestructuringandRelatedCostExpectedNumberofPositionsEliminatedPercent_EB6976031160C3E80D0EB7F57BCB3070" 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_E73A12CDBC5B2AF89CD9B7F57BCB03DE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_AssetImpairmentCharges_E73A12CDBC5B2AF89CD9B7F57BCB03DE" 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_978FEF1619AFA072D732B7F57BCB9F1D" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_978FEF1619AFA072D732B7F57BCB9F1D" 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_A591AC9C2A8FA855FBCBB7F57BCCB1D5" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_RestructuringCharges_A591AC9C2A8FA855FBCBB7F57BCCB1D5" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts" xlink:label="loc_hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts_A6E10A76E29935CDA548B7F57BCC642F" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_hsy_RestructuringandRelatedCostPeriodofIncurredRestructuringCosts_A6E10A76E29935CDA548B7F57BCC642F" 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_2F8209FABB7C355AABA2B7F57BCC338F" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_B3C2F8AB149510013673B7F57BCA75EA" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_2F8209FABB7C355AABA2B7F57BCC338F" 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_1AE639AC520E9212EDF5B7F57BD762D2" 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_31D72443EFAE41BE2D2EB7F57BD3A3E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_1AE639AC520E9212EDF5B7F57BD762D2" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_31D72443EFAE41BE2D2EB7F57BD3A3E8" 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_3D51678EC77760F64BA4B7F57BD4057A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_31D72443EFAE41BE2D2EB7F57BD3A3E8" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_3D51678EC77760F64BA4B7F57BD4057A" 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_B2C30444A61D27C392B6B7F57BD4E2BC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_3D51678EC77760F64BA4B7F57BD4057A" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_B2C30444A61D27C392B6B7F57BD4E2BC_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_B2C30444A61D27C392B6B7F57BD4E2BC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_3D51678EC77760F64BA4B7F57BD4057A" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_B2C30444A61D27C392B6B7F57BD4E2BC" 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_4E5D97CE87D1FB2694E3B7F57BD479BA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_B2C30444A61D27C392B6B7F57BD4E2BC" xlink:to="loc_us-gaap_EmployeeSeveranceMember_4E5D97CE87D1FB2694E3B7F57BD479BA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AcceleratedDepreciationandAmortizationMember" xlink:label="loc_hsy_AcceleratedDepreciationandAmortizationMember_7D1A8B8FED3208AA24F5B7F57BD51AFB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_B2C30444A61D27C392B6B7F57BD4E2BC" xlink:to="loc_hsy_AcceleratedDepreciationandAmortizationMember_7D1A8B8FED3208AA24F5B7F57BD51AFB" 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_8281F181005ED239A591B7F57BD5012D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_B2C30444A61D27C392B6B7F57BD4E2BC" xlink:to="loc_us-gaap_OtherRestructuringMember_8281F181005ED239A591B7F57BD5012D" 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_4A777C03C3B177A50191B7F57BD54D48" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_31D72443EFAE41BE2D2EB7F57BD3A3E8" xlink:to="loc_us-gaap_RestructuringPlanAxis_4A777C03C3B177A50191B7F57BD54D48" 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_CBE9E2F0E1779C34DB9BB7F57BD5DFE2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_4A777C03C3B177A50191B7F57BD54D48" xlink:to="loc_us-gaap_RestructuringPlanDomain_CBE9E2F0E1779C34DB9BB7F57BD5DFE2_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_CBE9E2F0E1779C34DB9BB7F57BD5DFE2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_4A777C03C3B177A50191B7F57BD54D48" xlink:to="loc_us-gaap_RestructuringPlanDomain_CBE9E2F0E1779C34DB9BB7F57BD5DFE2" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_B1992B3CF3CBE82CB35DB7F57BD56F1F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_CBE9E2F0E1779C34DB9BB7F57BD5DFE2" xlink:to="loc_hsy_MarginforGrowthProgramMember_B1992B3CF3CBE82CB35DB7F57BD56F1F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_ChinaStructureOptimizationMember" xlink:label="loc_hsy_ChinaStructureOptimizationMember_A30214B0F8240933DD90B7F57BD6FF9F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_CBE9E2F0E1779C34DB9BB7F57BD5DFE2" xlink:to="loc_hsy_ChinaStructureOptimizationMember_A30214B0F8240933DD90B7F57BD6FF9F" 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_DCAFDDF2EA40F97EC901B7F57BD65FF0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_31D72443EFAE41BE2D2EB7F57BD3A3E8" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_DCAFDDF2EA40F97EC901B7F57BD65FF0" 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_664979A663075C543477B7F57BD6A00A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_DCAFDDF2EA40F97EC901B7F57BD65FF0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_664979A663075C543477B7F57BD6A00A_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_664979A663075C543477B7F57BD6A00A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_DCAFDDF2EA40F97EC901B7F57BD65FF0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_664979A663075C543477B7F57BD6A00A" 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_F14803AF5DCE79007ACFB7F57BD66238" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_664979A663075C543477B7F57BD6A00A" xlink:to="loc_us-gaap_CostOfSalesMember_F14803AF5DCE79007ACFB7F57BD66238" 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_1352CBFE5DA5E3A1E14DB7F57BD7F44C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_664979A663075C543477B7F57BD6A00A" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_1352CBFE5DA5E3A1E14DB7F57BD7F44C" 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_54B137DA726009ED3231B7F57BD7A661" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_664979A663075C543477B7F57BD6A00A" xlink:to="loc_us-gaap_RestructuringChargesMember_54B137DA726009ED3231B7F57BD7A661" 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_DC793114C2E0EF261A17B7F57BD7C0ED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_1AE639AC520E9212EDF5B7F57BD762D2" xlink:to="loc_us-gaap_RestructuringCharges_DC793114C2E0EF261A17B7F57BD7C0ED" 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_5FCB125BBA1AB85B67C8C7EA18C494EF" 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_4B97BD19C0810B0E43F8C7EA18C34F4F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_5FCB125BBA1AB85B67C8C7EA18C494EF" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_4B97BD19C0810B0E43F8C7EA18C34F4F" 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_3F3E01C2D446D8973305C7EA18C303FA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_4B97BD19C0810B0E43F8C7EA18C34F4F" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_3F3E01C2D446D8973305C7EA18C303FA" 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_D0651135B1399E46F4E6C7EA18C4BE70_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_3F3E01C2D446D8973305C7EA18C303FA" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_D0651135B1399E46F4E6C7EA18C4BE70_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_D0651135B1399E46F4E6C7EA18C4BE70" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_3F3E01C2D446D8973305C7EA18C303FA" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_D0651135B1399E46F4E6C7EA18C4BE70" 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_F2EC46D7C97E302325CCC7EA18C4AAE3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_5FCB125BBA1AB85B67C8C7EA18C494EF" xlink:to="loc_us-gaap_RestructuringReserveRollForward_F2EC46D7C97E302325CCC7EA18C4AAE3" 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_A969C6C4D9E1F5B01035C7EA18C55AF6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_F2EC46D7C97E302325CCC7EA18C4AAE3" xlink:to="loc_us-gaap_RestructuringReserve_A969C6C4D9E1F5B01035C7EA18C55AF6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_RestructuringChargesBusinessRealignmentReserve" xlink:label="loc_hsy_RestructuringChargesBusinessRealignmentReserve_5705E52D8EC7E1EF6E75C7EA18C595EC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_F2EC46D7C97E302325CCC7EA18C4AAE3" xlink:to="loc_hsy_RestructuringChargesBusinessRealignmentReserve_5705E52D8EC7E1EF6E75C7EA18C595EC" 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_CF2B55C76E79DEC896E7C7EA18C5E0C1" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_F2EC46D7C97E302325CCC7EA18C4AAE3" xlink:to="loc_us-gaap_PaymentsForRestructuring_CF2B55C76E79DEC896E7C7EA18C5E0C1" 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_541EF4403EFF85881B8CC7EA18C59B30" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_F2EC46D7C97E302325CCC7EA18C4AAE3" xlink:to="loc_us-gaap_RestructuringReserveAccrualAdjustment1_541EF4403EFF85881B8CC7EA18C59B30" 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/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_02AC2EAC70E6F283C34EB7F57CD8BFB8" 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_783877941C32EF0E441DB7F57CD788D1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_02AC2EAC70E6F283C34EB7F57CD8BFB8" xlink:to="loc_us-gaap_StatementTable_783877941C32EF0E441DB7F57CD788D1" 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_F6591B33E3760D4D355BB7F57CD716C1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_783877941C32EF0E441DB7F57CD788D1" xlink:to="loc_us-gaap_StatementClassOfStockAxis_F6591B33E3760D4D355BB7F57CD716C1" 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_2E4F9AD47D8BC8FE9B90B7F57CD82481_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F6591B33E3760D4D355BB7F57CD716C1" xlink:to="loc_us-gaap_ClassOfStockDomain_2E4F9AD47D8BC8FE9B90B7F57CD82481_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_2E4F9AD47D8BC8FE9B90B7F57CD82481" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F6591B33E3760D4D355BB7F57CD716C1" xlink:to="loc_us-gaap_ClassOfStockDomain_2E4F9AD47D8BC8FE9B90B7F57CD82481" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_1E273674A1A53207AE76B7F57CD8BB67" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2E4F9AD47D8BC8FE9B90B7F57CD82481" xlink:to="loc_hsy_HersheyCommonStockMember_1E273674A1A53207AE76B7F57CD8BB67" 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_074ADC01D1AE82D014F4B7F57CD8845B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2E4F9AD47D8BC8FE9B90B7F57CD82481" xlink:to="loc_us-gaap_CommonClassBMember_074ADC01D1AE82D014F4B7F57CD8845B" 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_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02AC2EAC70E6F283C34EB7F57CD8BFB8" xlink:to="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" 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_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" 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_BA5D26FC463A42904EE8B7F57CD9F0AD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_BA5D26FC463A42904EE8B7F57CD9F0AD" 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_837E2DA2168C66B457FEB7F57CD9FAC2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_837E2DA2168C66B457FEB7F57CD9FAC2" 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_E87A5B9A4A93288DACC0B7F57CD9DB86" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:to="loc_us-gaap_InventoryNet_E87A5B9A4A93288DACC0B7F57CD9DB86" 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_70EE91E21D1D147B4892B7F57CDA73D4" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_70EE91E21D1D147B4892B7F57CDA73D4" 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_BFDBEC0F15284AD6A91BB7F57CDABE06" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_EC7EA9E261BB437054FDB7F57CD9F9C9" xlink:to="loc_us-gaap_AssetsCurrent_BFDBEC0F15284AD6A91BB7F57CDABE06" 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_0E1915DBD159DA137C26B7F57CDA035C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_0E1915DBD159DA137C26B7F57CDA035C" 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_6E1C696D881F1827C98CB7F57CDA3BF0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_Goodwill_6E1C696D881F1827C98CB7F57CDA3BF0" 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_4DA9ED5D6A0504345625B7F57CDA62B2" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_4DA9ED5D6A0504345625B7F57CDA62B2" 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_17D46A2F46C108672FF8B7F57CDB1F5D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_17D46A2F46C108672FF8B7F57CDB1F5D" 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_FC02AB42888B0EF896E5B7F57CDB3466" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_DeferredTaxAssetsLiabilitiesNetNoncurrent_FC02AB42888B0EF896E5B7F57CDB3466" 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_97657CE90C9B6F564CE9B7F57CDBAA9D" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_B0388F177FF0F5ABF41BB7F57CD865FF" xlink:to="loc_us-gaap_Assets_97657CE90C9B6F564CE9B7F57CDBAA9D" 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_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_02AC2EAC70E6F283C34EB7F57CD8BFB8" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" 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_B9C470706952D454A05BB7F57CDBC2D8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" 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_ED03EB9E560DC985DC1DB7F57CDCBFFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_AccountsPayableCurrent_ED03EB9E560DC985DC1DB7F57CDCBFFD" 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_C9DB8E91EADA24D86500B7F57CDC4476" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_C9DB8E91EADA24D86500B7F57CDC4476" 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_DC7F2AA3388FBF74EF5FB7F57CDC7AEA" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_DC7F2AA3388FBF74EF5FB7F57CDC7AEA" 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_11A02EEC44253FC2A48FB7F57CDC2164" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_ShortTermBorrowings_11A02EEC44253FC2A48FB7F57CDC2164" 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_7D9AEC471A30695A71E1B7F57CDC8A8B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_LongTermDebtCurrent_7D9AEC471A30695A71E1B7F57CDC8A8B" 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_D04580CE6F392F34B264B7F57CDC1E85" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_B9C470706952D454A05BB7F57CDBC2D8" xlink:to="loc_us-gaap_LiabilitiesCurrent_D04580CE6F392F34B264B7F57CDC1E85" 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_9418140AF7C8A380B177B7F57CDDFA03" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_9418140AF7C8A380B177B7F57CDDFA03" 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_02CBF5E9C7C00E5D3BD5B7F57CDD112B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_02CBF5E9C7C00E5D3BD5B7F57CDD112B" 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_C687A842FB2BCF2000A3B7F57CDD7B59" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesNoncurrent_C687A842FB2BCF2000A3B7F57CDD7B59" 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_BF061E558AB8D75EC33EB7F57CDD21FF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_Liabilities_BF061E558AB8D75EC33EB7F57CDD21FF" 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_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" 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_7EE6108613034A0B0BCDB7F57CDE4018" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_PreferredStockValue_7EE6108613034A0B0BCDB7F57CDE4018" 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_64F88E3C5E4BF1CD81C4B7F57CDEFE4E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_CommonStockValue_64F88E3C5E4BF1CD81C4B7F57CDEFE4E" 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_286E4C7692994CC5D76BB7F57CDE852D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_AdditionalPaidInCapital_286E4C7692994CC5D76BB7F57CDE852D" 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_9D3E336C0D100DA7C314B7F57CDEB96D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_9D3E336C0D100DA7C314B7F57CDEB96D" 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_BCC9348087E3778E34D1B7F57CDF7A6D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_TreasuryStockValue_BCC9348087E3778E34D1B7F57CDF7A6D" 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_E3B5C892311A39C255A8B7F57CDF0586" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_E3B5C892311A39C255A8B7F57CDF0586" 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_B60BF49D60A1ED1770B5B7F57CDFA9F1" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_StockholdersEquity_B60BF49D60A1ED1770B5B7F57CDFA9F1" 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_4EF123DF0D6CBE2012F2B7F57CDF5DF2" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_MinorityInterest_4EF123DF0D6CBE2012F2B7F57CDF5DF2" 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_C5662E6DEBBBD6E46C95B7F57CDF584B" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_E25F98D0B17FD3D181AAB7F57CDEFA77" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_C5662E6DEBBBD6E46C95B7F57CDF584B" 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_20BB75E155ED40486F61B7F57CE0239A" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_11A7AEEB50ECE7C5D697B7F57CDB7D7F" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_20BB75E155ED40486F61B7F57CE0239A" 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_DF044A44784C193D9FFEB7F57CCB1490" 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_7BC056807FDF5E7D4BF2B7F57CCAC20E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_DF044A44784C193D9FFEB7F57CCB1490" xlink:to="loc_us-gaap_StatementTable_7BC056807FDF5E7D4BF2B7F57CCAC20E" 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_5CB74FC676A4DB3B8B7BB7F57CCAE5A4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_7BC056807FDF5E7D4BF2B7F57CCAC20E" xlink:to="loc_us-gaap_StatementClassOfStockAxis_5CB74FC676A4DB3B8B7BB7F57CCAE5A4" 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_281AE6FA5EF6B1F7E177B7F57CCA3B0D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_5CB74FC676A4DB3B8B7BB7F57CCAE5A4" xlink:to="loc_us-gaap_ClassOfStockDomain_281AE6FA5EF6B1F7E177B7F57CCA3B0D_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_281AE6FA5EF6B1F7E177B7F57CCA3B0D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_5CB74FC676A4DB3B8B7BB7F57CCAE5A4" xlink:to="loc_us-gaap_ClassOfStockDomain_281AE6FA5EF6B1F7E177B7F57CCA3B0D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_9C4480F5E6B907CAC962B7F57CCBAEAA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_281AE6FA5EF6B1F7E177B7F57CCA3B0D" xlink:to="loc_hsy_HersheyCommonStockMember_9C4480F5E6B907CAC962B7F57CCBAEAA" 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_322F6E55471CCC380EF3B7F57CCB5878" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_281AE6FA5EF6B1F7E177B7F57CCA3B0D" xlink:to="loc_us-gaap_CommonClassBMember_322F6E55471CCC380EF3B7F57CCB5878" 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_B6C7915A6FC9D8C6F2E2B7F57CCB7B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_DF044A44784C193D9FFEB7F57CCB1490" xlink:to="loc_us-gaap_PreferredStockSharesIssued_B6C7915A6FC9D8C6F2E2B7F57CCB7B31" 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_378CAB3FB27F08CC02E6B7F57CCC92F7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_DF044A44784C193D9FFEB7F57CCB1490" xlink:to="loc_us-gaap_CommonStockSharesIssued_378CAB3FB27F08CC02E6B7F57CCC92F7" 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_FA1E3898244A9DCC0A34B7F57CCCBC8C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_DF044A44784C193D9FFEB7F57CCB1490" xlink:to="loc_us-gaap_TreasuryStockShares_FA1E3898244A9DCC0A34B7F57CCCBC8C" 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: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_F54A6826808B43EB87B3B7F57CF36257" 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_F88207DB062B652C6D45B7F57CF2F963" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_StatementTable_F88207DB062B652C6D45B7F57CF2F963" 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_551829515F917A748469B7F57CF2E57D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_F88207DB062B652C6D45B7F57CF2F963" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_551829515F917A748469B7F57CF2E57D" 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_40EAEFDFA656F546D1D6B7F57CF2E640_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_551829515F917A748469B7F57CF2E57D" xlink:to="loc_us-gaap_EquityComponentDomain_40EAEFDFA656F546D1D6B7F57CF2E640_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_40EAEFDFA656F546D1D6B7F57CF2E640" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_551829515F917A748469B7F57CF2E57D" xlink:to="loc_us-gaap_EquityComponentDomain_40EAEFDFA656F546D1D6B7F57CF2E640" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember" xlink:label="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_4EE2EF9CF2E57B4542CEB7F57CF30AEB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_40EAEFDFA656F546D1D6B7F57CF2E640" xlink:to="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_4EE2EF9CF2E57B4542CEB7F57CF30AEB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedNetGainLossFromDesignatedOrQualifyingCashFlowHedgesMember" xlink:label="loc_us-gaap_AccumulatedNetGainLossFromDesignatedOrQualifyingCashFlowHedgesMember_97DF8FDE53DECD1BC957B7F57CF333CD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_40EAEFDFA656F546D1D6B7F57CF2E640" xlink:to="loc_us-gaap_AccumulatedNetGainLossFromDesignatedOrQualifyingCashFlowHedgesMember_97DF8FDE53DECD1BC957B7F57CF333CD" 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_5F777AB2695856299DBAB7F57CF32AC1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_ProfitLoss_5F777AB2695856299DBAB7F57CF32AC1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_1D2013FE38BA5E3D9A91B7F57CF45252" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentBeforeTax_1D2013FE38BA5E3D9A91B7F57CF45252" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_C2B5660B38FBE7F865BFB7F57CF41CF8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTranslationAdjustmentTax_C2B5660B38FBE7F865BFB7F57CF41CF8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_1CF382D607B476089AB0B7F57CF45F62" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_1CF382D607B476089AB0B7F57CF45F62" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_763BAA5267CCF8C2AE3EB7F57CF50112" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_763BAA5267CCF8C2AE3EB7F57CF50112" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_36BE907CF294250F39D5B7F57CF57590" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodTax_36BE907CF294250F39D5B7F57CF57590" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_05FD70E43E81FDAF213FB7F57CF5D3C3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansNetUnamortizedGainLossArisingDuringPeriodNetOfTax_05FD70E43E81FDAF213FB7F57CF5D3C3" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsPreTaxEffect" xlink:label="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsPreTaxEffect_161306C9E76F8A5F8BD6B7F57CF546FF" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsPreTaxEffect_161306C9E76F8A5F8BD6B7F57CF546FF" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect" xlink:label="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect_6BE04107C8EE1F1E7FD5B7F57CF6720B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect_6BE04107C8EE1F1E7FD5B7F57CF6720B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsAfterTax" xlink:label="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsAfterTax_098B8A9EF20E009A3533B7F57CF6085C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsAfterTax_098B8A9EF20E009A3533B7F57CF6085C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_B6329CB9EE860C1F9259B7F57CF62BDB" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_B6329CB9EE860C1F9259B7F57CF62BDB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_6219DB66DA6B28F6EA32B7F57CF6C7DC" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossTax_6219DB66DA6B28F6EA32B7F57CF6C7DC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_7FC2159F754D1870E704B7F57CF61A5E" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_CDA0FB3DD7E6DE2E04ABB7F57CF445D8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossNetOfTax_7FC2159F754D1870E704B7F57CF61A5E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodBeforeTax_56F69D16E1AC03D54C84B7F57CF7CCD6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodBeforeTax_56F69D16E1AC03D54C84B7F57CF7CCD6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodTax_A8658FFFD8FE7210CD33B7F57CF713CA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodTax_A8658FFFD8FE7210CD33B7F57CF713CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_BD7BE99FC1C64506C6D9B7F57CF778B3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_BD7BE99FC1C64506C6D9B7F57CF778B3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesBeforeTax_7FEFDE434AA92B7771F1B7F57CF7727B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesBeforeTax_7FEFDE434AA92B7771F1B7F57CF7727B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesTax_7714709DBB37FBAFE973B7F57CF7A18C" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesTax_7714709DBB37FBAFE973B7F57CF7A18C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_6945C139C99BACE18C80B7F57CF8E5B5" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPeriodIncreaseDecreaseAbstract_0D696C5D009AED336967B7F57CF642E0" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_6945C139C99BACE18C80B7F57CF8E5B5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_452BAA49953D2FFADB42B7F57CF88742" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_452BAA49953D2FFADB42B7F57CF88742" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_BBCC3607EE651A1C9B38B7F57CF81E9A" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossTax_BBCC3607EE651A1C9B38B7F57CF81E9A" 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_AC29ED834D88698B8D25B7F57CF87006" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_E1C06A41643C4123B286B7F57CF46AC2" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_AC29ED834D88698B8D25B7F57CF87006" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_39350C7762CB8D77D0DCB7F57CF8F0CD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest_39350C7762CB8D77D0DCB7F57CF8F0CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_893E716D1BF45F9C7353B7F57CF8A93C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest_893E716D1BF45F9C7353B7F57CF8A93C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_5D27028D9248AD2F2C72B7F57CF937E3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_F54A6826808B43EB87B3B7F57CF36257" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax_5D27028D9248AD2F2C72B7F57CF937E3" xlink:type="arc" />
  </link:definitionLink>
  <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_CA13D43883B60F874768B7F57D060D5B" 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_22D61588FA284DC84576B7F57D043237" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_StatementTable_22D61588FA284DC84576B7F57D043237" 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_9A4F1682333A6171DAF5B7F57D045511" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_22D61588FA284DC84576B7F57D043237" xlink:to="loc_us-gaap_StatementClassOfStockAxis_9A4F1682333A6171DAF5B7F57D045511" 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_6B1353DEDF65CD90E23FB7F57D05CB9A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9A4F1682333A6171DAF5B7F57D045511" xlink:to="loc_us-gaap_ClassOfStockDomain_6B1353DEDF65CD90E23FB7F57D05CB9A_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_6B1353DEDF65CD90E23FB7F57D05CB9A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9A4F1682333A6171DAF5B7F57D045511" xlink:to="loc_us-gaap_ClassOfStockDomain_6B1353DEDF65CD90E23FB7F57D05CB9A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_C882833791F35B04BD50B7F57D05E35A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_6B1353DEDF65CD90E23FB7F57D05CB9A" xlink:to="loc_hsy_HersheyCommonStockMember_C882833791F35B04BD50B7F57D05E35A" 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_F9C2ADE9E5EF63B03A8CB7F57D050005" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_6B1353DEDF65CD90E23FB7F57D05CB9A" xlink:to="loc_us-gaap_CommonClassBMember_F9C2ADE9E5EF63B03A8CB7F57D050005" 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_10792EA94245B3A86956B7F57D067D73" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_SalesRevenueNet_10792EA94245B3A86956B7F57D067D73" 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_7DDFDF30183F188535A6B7F57D0666BB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_CostOfGoodsSold_7DDFDF30183F188535A6B7F57D0666BB" 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_3CCC8541731C006072C6B7F57D0699FD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_GrossProfit_3CCC8541731C006072C6B7F57D0699FD" 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_AFE6FF0D2EBDBABE3F09B7F57D06DE62" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_AFE6FF0D2EBDBABE3F09B7F57D06DE62" 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_1B9E917549018C1C8072B7F57D07E99E" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_AssetImpairmentCharges_1B9E917549018C1C8072B7F57D07E99E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_RestructuringChargesBusinessRealignment" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_D7B50F0789B43A3F011BB7F57D07F1AA" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_D7B50F0789B43A3F011BB7F57D07F1AA" 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_03BB72F58D24AD3A24D7B7F57D07D92B" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_OperatingIncomeLoss_03BB72F58D24AD3A24D7B7F57D07D92B" 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_078E285679A2AC281CC0B7F57D075428" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_078E285679A2AC281CC0B7F57D075428" 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_415996C0A7B2390C0757B7F57D07F0E2" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_415996C0A7B2390C0757B7F57D07F0E2" 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_7B0AD54A61296F5EC2DBB7F57D0831EF" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_7B0AD54A61296F5EC2DBB7F57D0831EF" 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_12329C6B859FA7E49CBBB7F57D08A469" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_12329C6B859FA7E49CBBB7F57D08A469" 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_BD2736EFB61EF3C8F3DAB7F57D08A003" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_ProfitLoss_BD2736EFB61EF3C8F3DAB7F57D08A003" 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_EFEAF93D12AA0BACF04EB7F57D08499B" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_EFEAF93D12AA0BACF04EB7F57D08499B" 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_B688C5FFDD4B3D3ACA39B7F57D08C095" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_NetIncomeLoss_B688C5FFDD4B3D3ACA39B7F57D08C095" 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_083BC7E5906032789AD0B7F57D086A0A" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_083BC7E5906032789AD0B7F57D086A0A" 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_C1AD5171B96868C67F60B7F57D09C330" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_083BC7E5906032789AD0B7F57D086A0A" xlink:to="loc_us-gaap_EarningsPerShareBasic_C1AD5171B96868C67F60B7F57D09C330" 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_ED3AF0CD45605F2018EEB7F57D0959C2" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_ED3AF0CD45605F2018EEB7F57D0959C2" 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_79DA9BAE13E822AC48D4B7F57D0909C8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_ED3AF0CD45605F2018EEB7F57D0959C2" xlink:to="loc_us-gaap_EarningsPerShareDiluted_79DA9BAE13E822AC48D4B7F57D0909C8" 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_59881A5570DC5C7C2546B7F57D0945D7" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_CA13D43883B60F874768B7F57D060D5B" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_59881A5570DC5C7C2546B7F57D0945D7" 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_7E52718D877D7B2C6C71B7F57D091D2E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_59881A5570DC5C7C2546B7F57D0945D7" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_7E52718D877D7B2C6C71B7F57D091D2E" 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_79CF872737CC8AE49EE8B7F57CABFF5D" 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_A2DF747FCA9C410665CFB7F57CA86E21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_79CF872737CC8AE49EE8B7F57CABFF5D" xlink:to="loc_us-gaap_StatementTable_A2DF747FCA9C410665CFB7F57CA86E21" 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_8474059A66D6760B1E13B7F57CA88448" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_A2DF747FCA9C410665CFB7F57CA86E21" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_8474059A66D6760B1E13B7F57CA88448" 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_E5A9EA521C842E1E1502B7F57CA9061C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_8474059A66D6760B1E13B7F57CA88448" xlink:to="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C_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_E5A9EA521C842E1E1502B7F57CA9061C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_8474059A66D6760B1E13B7F57CA88448" xlink:to="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" 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_A4883C71C95E113CCA2FB7F57CA923F4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_PreferredStockMember_A4883C71C95E113CCA2FB7F57CA923F4" 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_0913C722F8D34909E2CBB7F57CA9109E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_CommonStockMember_0913C722F8D34909E2CBB7F57CA9109E" 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_D6440636EC46C72F34FFB7F57CA96A1F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_D6440636EC46C72F34FFB7F57CA96A1F" 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_BD2495A8AE6DE614193DB7F57CA9051D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_RetainedEarningsMember_BD2495A8AE6DE614193DB7F57CA9051D" 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_2184C17087EC75F8C7A8B7F57CAAC244" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_TreasuryStockMember_2184C17087EC75F8C7A8B7F57CAAC244" 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_C4890E52A96C9F343B92B7F57CAA8B7E" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_C4890E52A96C9F343B92B7F57CAA8B7E" 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_08D571D3388EDD70EBAAB7F57CAA7BBE" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_E5A9EA521C842E1E1502B7F57CA9061C" xlink:to="loc_us-gaap_NoncontrollingInterestMember_08D571D3388EDD70EBAAB7F57CAA7BBE" 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_25333EAE9A3F12F9491CB7F57CAAD1E6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_A2DF747FCA9C410665CFB7F57CA86E21" xlink:to="loc_us-gaap_StatementClassOfStockAxis_25333EAE9A3F12F9491CB7F57CAAD1E6" 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_D802F7F6927D12593210B7F57CAA5493_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_25333EAE9A3F12F9491CB7F57CAAD1E6" xlink:to="loc_us-gaap_ClassOfStockDomain_D802F7F6927D12593210B7F57CAA5493_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_D802F7F6927D12593210B7F57CAA5493" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_25333EAE9A3F12F9491CB7F57CAAD1E6" xlink:to="loc_us-gaap_ClassOfStockDomain_D802F7F6927D12593210B7F57CAA5493" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_F8F26D2ED33A5A1B2079B7F57CAA6475" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_D802F7F6927D12593210B7F57CAA5493" xlink:to="loc_hsy_HersheyCommonStockMember_F8F26D2ED33A5A1B2079B7F57CAA6475" 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_665CF509D7879812E048B7F57CAB05D1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_D802F7F6927D12593210B7F57CAA5493" xlink:to="loc_us-gaap_CommonClassBMember_665CF509D7879812E048B7F57CAB05D1" 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_F12842373468294CD2F2B7F57CAB7803" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_79CF872737CC8AE49EE8B7F57CABFF5D" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" 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_BAD7DB0914415B97EBACB7F57CAC64DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_BAD7DB0914415B97EBACB7F57CAC64DE" 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_7EFFD08BAC5029870387B7F57CACA23F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_NetIncomeLoss_7EFFD08BAC5029870387B7F57CACA23F" 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_C9B40FDF1ED0EDB3464EB7F57CAC49CE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_C9B40FDF1ED0EDB3464EB7F57CAC49CE" 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_C589B654ED7EE8D9F02CB7F57CACDB94" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_ProfitLoss_C589B654ED7EE8D9F02CB7F57CACDB94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_BEE1BA8DD7A6D50ED471B7F57CAC21C8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_BEE1BA8DD7A6D50ED471B7F57CAC21C8" 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_5D860545020BD51DC377B7F57CAC3D6B" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_5D860545020BD51DC377B7F57CAC3D6B" 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_48FFC886F9F5D0CFB7B4B7F57CADE2FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_5D860545020BD51DC377B7F57CAC3D6B" xlink:to="loc_us-gaap_DividendsCommonStockCash_48FFC886F9F5D0CFB7B4B7F57CADE2FC" 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_A2AF710F976D165F7C6DB7F57CADD93F" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_A2AF710F976D165F7C6DB7F57CADD93F" 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_EF1BA14B652735F4CA04B7F57CAD9E93" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_EF1BA14B652735F4CA04B7F57CAD9E93" 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_590EC620383F44F891CEB7F57CAD2501" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_590EC620383F44F891CEB7F57CAD2501" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect" xlink:label="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect_BF0349CA0B11858743A0B7F57CAE6ECC" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_F12842373468294CD2F2B7F57CAB7803" xlink:to="loc_hsy_TaxCutsandJobsActReclassificationFromAOCIToRetainedEarningsTaxEffect_BF0349CA0B11858743A0B7F57CAE6ECC" 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_996AAAA28354C389FC58B7F57CA11519" 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_1C509451BFD9D2A308C6B7F57CA0F147" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_996AAAA28354C389FC58B7F57CA11519" xlink:to="loc_us-gaap_StatementTable_1C509451BFD9D2A308C6B7F57CA0F147" 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_91A64D163D912E8885E3B7F57CA0C384" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_1C509451BFD9D2A308C6B7F57CA0F147" xlink:to="loc_us-gaap_StatementClassOfStockAxis_91A64D163D912E8885E3B7F57CA0C384" 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_51CDDFD150DF2A437FF9B7F57CA09CE7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_91A64D163D912E8885E3B7F57CA0C384" xlink:to="loc_us-gaap_ClassOfStockDomain_51CDDFD150DF2A437FF9B7F57CA09CE7_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_51CDDFD150DF2A437FF9B7F57CA09CE7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_91A64D163D912E8885E3B7F57CA0C384" xlink:to="loc_us-gaap_ClassOfStockDomain_51CDDFD150DF2A437FF9B7F57CA09CE7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_01424A951B3E7C2EF9E6B7F57CA00244" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_51CDDFD150DF2A437FF9B7F57CA09CE7" xlink:to="loc_hsy_HersheyCommonStockMember_01424A951B3E7C2EF9E6B7F57CA00244" 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_625515CA7E37AA13AE71B7F57CA169F7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_51CDDFD150DF2A437FF9B7F57CA09CE7" xlink:to="loc_us-gaap_CommonClassBMember_625515CA7E37AA13AE71B7F57CA169F7" 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_76AB0756B1DB151BFD6FB7F57CA1B786" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_996AAAA28354C389FC58B7F57CA11519" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_76AB0756B1DB151BFD6FB7F57CA1B786" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/Contingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ContingenciesContingenciesNarrativeDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/ContingenciesTables" xlink:type="extended" />
  <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_0E2D171B5F0DE8D869AFB7F57C2AD4BA" 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_208D4467EF2646B49137B7F57C255322" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" 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_F562E79036ACF1D7CD21B7F57C253DC7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_F562E79036ACF1D7CD21B7F57C253DC7" 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_723BA9DE96A9B9A50B19B7F57C2567B9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_F562E79036ACF1D7CD21B7F57C253DC7" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9_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_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_F562E79036ACF1D7CD21B7F57C253DC7" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" 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_ABD217ECE9176FBF6652B7F57C26CFE9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:to="loc_us-gaap_CommodityContractMember_ABD217ECE9176FBF6652B7F57C26CFE9" 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_978FBA0704661475E0C7B7F57C26FD1C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:to="loc_us-gaap_ForeignExchangeContractMember_978FBA0704661475E0C7B7F57C26FD1C" 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_2519AFBED90831D9E62AB7F57C26F052" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:to="loc_us-gaap_InterestRateContractMember_2519AFBED90831D9E62AB7F57C26F052" 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_FA40034BF92A3A9C7DCBB7F57C26AE83" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:to="loc_us-gaap_EquitySwapMember_FA40034BF92A3A9C7DCBB7F57C26AE83" 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_ACD79CA0A7E905BFB75CB7F57C279548" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_723BA9DE96A9B9A50B19B7F57C2567B9" xlink:to="loc_us-gaap_InterestRateSwapMember_ACD79CA0A7E905BFB75CB7F57C279548" 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_348820263D2DD9A14B11B7F57C272282" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" xlink:to="loc_us-gaap_HedgingDesignationAxis_348820263D2DD9A14B11B7F57C272282" 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_D4CC9C7BBC665AAD80B5B7F57C27D196_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_348820263D2DD9A14B11B7F57C272282" xlink:to="loc_us-gaap_HedgingDesignationDomain_D4CC9C7BBC665AAD80B5B7F57C27D196_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_D4CC9C7BBC665AAD80B5B7F57C27D196" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_348820263D2DD9A14B11B7F57C272282" xlink:to="loc_us-gaap_HedgingDesignationDomain_D4CC9C7BBC665AAD80B5B7F57C27D196" 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_E331E8668F6789CCE826B7F57C27E20C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_D4CC9C7BBC665AAD80B5B7F57C27D196" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_E331E8668F6789CCE826B7F57C27E20C" 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_2E2F0C4BE7F14CB55AFAB7F57C281893" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_D4CC9C7BBC665AAD80B5B7F57C27D196" xlink:to="loc_us-gaap_NondesignatedMember_2E2F0C4BE7F14CB55AFAB7F57C281893" 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_391CD3F64DBD71A9A71CB7F57C28905B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_391CD3F64DBD71A9A71CB7F57C28905B" 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_10E8240C4F735255F004B7F57C2821FE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_391CD3F64DBD71A9A71CB7F57C28905B" xlink:to="loc_us-gaap_HedgingRelationshipDomain_10E8240C4F735255F004B7F57C2821FE_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_10E8240C4F735255F004B7F57C2821FE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_391CD3F64DBD71A9A71CB7F57C28905B" xlink:to="loc_us-gaap_HedgingRelationshipDomain_10E8240C4F735255F004B7F57C2821FE" 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_4D041028BC522ADE4C17B7F57C282FF0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_10E8240C4F735255F004B7F57C2821FE" xlink:to="loc_us-gaap_CashFlowHedgingMember_4D041028BC522ADE4C17B7F57C282FF0" 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_80530FAF36243B3344F1B7F57C29C252" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_10E8240C4F735255F004B7F57C2821FE" xlink:to="loc_us-gaap_FairValueHedgingMember_80530FAF36243B3344F1B7F57C29C252" 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_0F8151A24F0B5C835DB3B7F57C29F765" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" xlink:to="loc_us-gaap_RangeAxis_0F8151A24F0B5C835DB3B7F57C29F765" 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_43B77453E73627974F89B7F57C293ACC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_0F8151A24F0B5C835DB3B7F57C29F765" xlink:to="loc_us-gaap_RangeMember_43B77453E73627974F89B7F57C293ACC_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_43B77453E73627974F89B7F57C293ACC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_0F8151A24F0B5C835DB3B7F57C29F765" xlink:to="loc_us-gaap_RangeMember_43B77453E73627974F89B7F57C293ACC" 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_99D83DE63D606063373CB7F57C29C9EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_43B77453E73627974F89B7F57C293ACC" xlink:to="loc_us-gaap_MinimumMember_99D83DE63D606063373CB7F57C29C9EB" 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_446611608EEAD77F7653B7F57C2A9AF4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_43B77453E73627974F89B7F57C293ACC" xlink:to="loc_us-gaap_MaximumMember_446611608EEAD77F7653B7F57C2A9AF4" 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_762D830A17CF7B4AAB5BB7F57C2A3AE1" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_208D4467EF2646B49137B7F57C255322" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_762D830A17CF7B4AAB5BB7F57C2A3AE1" 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_24F8DFC044D3FAEDC41CB7F57C2A0928_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_762D830A17CF7B4AAB5BB7F57C2A3AE1" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_24F8DFC044D3FAEDC41CB7F57C2A0928_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_24F8DFC044D3FAEDC41CB7F57C2A0928" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_762D830A17CF7B4AAB5BB7F57C2A3AE1" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_24F8DFC044D3FAEDC41CB7F57C2A0928" 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_A606BFBFADE989E62523B7F57C2A626D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_24F8DFC044D3FAEDC41CB7F57C2A0928" xlink:to="loc_us-gaap_InterestExpenseMember_A606BFBFADE989E62523B7F57C2A626D" 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_81FE892550BCE8582C93B7F57C2B13B0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_us-gaap_DerivativeTermOfContract_81FE892550BCE8582C93B7F57C2B13B0" 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_9EF3AB74DE1D97A659F5B7F57C2B11CE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_invest_DerivativeNotionalAmount_9EF3AB74DE1D97A659F5B7F57C2B11CE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_MinimumLengthofTimeHedgedinCashFlowHedge" xlink:label="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_F849A1B59822F2AEBA58B7F57C2BFF47" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_F849A1B59822F2AEBA58B7F57C2BFF47" 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_65FA7627E01952C56DA1B7F57C2B5E2E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_65FA7627E01952C56DA1B7F57C2B5E2E" 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_FD2A6D49C2B12EC05D52B7F57C2B8FBE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_FD2A6D49C2B12EC05D52B7F57C2B8FBE" 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_B3060D73706E6405703BB7F57C2C6462" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_0E2D171B5F0DE8D869AFB7F57C2AD4BA" xlink:to="loc_us-gaap_IncreaseDecreaseInFairValueOfHedgedItemInInterestRateFairValueHedge1_B3060D73706E6405703BB7F57C2C6462" 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_95A253FCFDC83C19A18FB7F57C1C02CA" 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_85F0762CAC3DB06403F6B7F57C18590A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_95A253FCFDC83C19A18FB7F57C1C02CA" xlink:to="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_85F0762CAC3DB06403F6B7F57C18590A" 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_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_49A69CD09D78D7812CECB7F57C194F86" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_85F0762CAC3DB06403F6B7F57C18590A" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_49A69CD09D78D7812CECB7F57C194F86" 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_A7071571079A64D1CD42B7F57C193512_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_49A69CD09D78D7812CECB7F57C194F86" xlink:to="loc_us-gaap_HedgingRelationshipDomain_A7071571079A64D1CD42B7F57C193512_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_A7071571079A64D1CD42B7F57C193512" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_49A69CD09D78D7812CECB7F57C194F86" xlink:to="loc_us-gaap_HedgingRelationshipDomain_A7071571079A64D1CD42B7F57C193512" 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_8C177E64A223C5F7F2F8B7F57C1937F5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_A7071571079A64D1CD42B7F57C193512" xlink:to="loc_us-gaap_CashFlowHedgingMember_8C177E64A223C5F7F2F8B7F57C1937F5" 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_19778A7036DF61E6AD2BB7F57C1995BE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_A7071571079A64D1CD42B7F57C193512" xlink:to="loc_us-gaap_FairValueHedgingMember_19778A7036DF61E6AD2BB7F57C1995BE" 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_288F105702A8FC4629F2B7F57C1A2F7D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_85F0762CAC3DB06403F6B7F57C18590A" xlink:to="loc_us-gaap_HedgingDesignationAxis_288F105702A8FC4629F2B7F57C1A2F7D" 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_17C07FF22E05EEEE6832B7F57C1A5392_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_288F105702A8FC4629F2B7F57C1A2F7D" xlink:to="loc_us-gaap_HedgingDesignationDomain_17C07FF22E05EEEE6832B7F57C1A5392_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_17C07FF22E05EEEE6832B7F57C1A5392" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_288F105702A8FC4629F2B7F57C1A2F7D" xlink:to="loc_us-gaap_HedgingDesignationDomain_17C07FF22E05EEEE6832B7F57C1A5392" 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_80D7584A293F3A64E301B7F57C1AC324" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_17C07FF22E05EEEE6832B7F57C1A5392" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_80D7584A293F3A64E301B7F57C1AC324" 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_1C2E8188591843584514B7F57C1A27FA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_17C07FF22E05EEEE6832B7F57C1A5392" xlink:to="loc_us-gaap_NondesignatedMember_1C2E8188591843584514B7F57C1A27FA" 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_4D8E1EDC37158F44D88AB7F57C1BC8CE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_85F0762CAC3DB06403F6B7F57C18590A" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_4D8E1EDC37158F44D88AB7F57C1BC8CE" 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_EFC6315372C10DA49FBBB7F57C1BF686_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4D8E1EDC37158F44D88AB7F57C1BC8CE" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686_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_EFC6315372C10DA49FBBB7F57C1BF686" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_4D8E1EDC37158F44D88AB7F57C1BC8CE" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686" 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_5111B563AB98F38F4E9BB7F57C1B2038" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686" xlink:to="loc_us-gaap_CommodityContractMember_5111B563AB98F38F4E9BB7F57C1B2038" 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_951CD517E27513DD417CB7F57C1B4718" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686" xlink:to="loc_us-gaap_ForeignExchangeContractMember_951CD517E27513DD417CB7F57C1B4718" 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_8E2FF502AEA7308621B2B7F57C1BE0EE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686" xlink:to="loc_us-gaap_InterestRateContractMember_8E2FF502AEA7308621B2B7F57C1BE0EE" 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_08837776A0B19815B47FB7F57C1CF739" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_EFC6315372C10DA49FBBB7F57C1BF686" xlink:to="loc_us-gaap_EquitySwapMember_08837776A0B19815B47FB7F57C1CF739" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading" xlink:label="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_0F453AC8FF7656CE4F2EB7F57C1CB92F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_95A253FCFDC83C19A18FB7F57C1C02CA" xlink:to="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_0F453AC8FF7656CE4F2EB7F57C1CB92F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading" xlink:label="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_38B49392E2672E81FF52B7F57C1C81BD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_95A253FCFDC83C19A18FB7F57C1C02CA" xlink:to="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_38B49392E2672E81FF52B7F57C1C81BD" 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_4F226F7ED2B108870404B7F57C1C3817" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_95A253FCFDC83C19A18FB7F57C1C02CA" xlink:to="loc_us-gaap_DerivativeAssets_4F226F7ED2B108870404B7F57C1C3817" 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_10BF08299EFCF8D83B27B7F57C1D5521" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_95A253FCFDC83C19A18FB7F57C1C02CA" xlink:to="loc_us-gaap_DerivativeLiabilities_10BF08299EFCF8D83B27B7F57C1D5521" 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_09441EE358F40B10BC52B7F57C120C4C" 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_C2188C58D22E2885C11DB7F57C0EAD21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_09441EE358F40B10BC52B7F57C120C4C" xlink:to="loc_us-gaap_DerivativeTable_C2188C58D22E2885C11DB7F57C0EAD21" 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_381CD988AA291038308AB7F57C0F9747" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_C2188C58D22E2885C11DB7F57C0EAD21" xlink:to="loc_us-gaap_HedgingDesignationAxis_381CD988AA291038308AB7F57C0F9747" 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_7F0B8568A13C319A021AB7F57C0FC37B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_381CD988AA291038308AB7F57C0F9747" xlink:to="loc_us-gaap_HedgingDesignationDomain_7F0B8568A13C319A021AB7F57C0FC37B_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_7F0B8568A13C319A021AB7F57C0FC37B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_381CD988AA291038308AB7F57C0F9747" xlink:to="loc_us-gaap_HedgingDesignationDomain_7F0B8568A13C319A021AB7F57C0FC37B" 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_2F0CB4D53D6B64B90B88B7F57C0F1BA2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_7F0B8568A13C319A021AB7F57C0FC37B" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_2F0CB4D53D6B64B90B88B7F57C0F1BA2" 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_67EE26735B3826CEA963B7F57C103FD8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_C2188C58D22E2885C11DB7F57C0EAD21" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_67EE26735B3826CEA963B7F57C103FD8" 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_1D7316BC4BF4035DBA8EB7F57C104B5B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_67EE26735B3826CEA963B7F57C103FD8" xlink:to="loc_us-gaap_HedgingRelationshipDomain_1D7316BC4BF4035DBA8EB7F57C104B5B_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_1D7316BC4BF4035DBA8EB7F57C104B5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_67EE26735B3826CEA963B7F57C103FD8" xlink:to="loc_us-gaap_HedgingRelationshipDomain_1D7316BC4BF4035DBA8EB7F57C104B5B" 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_CA773726F775F2C8200FB7F57C1067DB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_1D7316BC4BF4035DBA8EB7F57C104B5B" xlink:to="loc_us-gaap_CashFlowHedgingMember_CA773726F775F2C8200FB7F57C1067DB" 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_B24A26A6A82D02F0A902B7F57C106EE7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_C2188C58D22E2885C11DB7F57C0EAD21" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_B24A26A6A82D02F0A902B7F57C106EE7" 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_DA2A785199C06078FF23B7F57C105F8F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_B24A26A6A82D02F0A902B7F57C106EE7" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F_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_DA2A785199C06078FF23B7F57C105F8F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_B24A26A6A82D02F0A902B7F57C106EE7" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F" 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_1F5DB26D14291902EBE8B7F57C11304A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F" xlink:to="loc_us-gaap_CommodityContractMember_1F5DB26D14291902EBE8B7F57C11304A" 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_DC95CCA6CCB01CDDCC06B7F57C11E74D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F" xlink:to="loc_us-gaap_ForeignExchangeContractMember_DC95CCA6CCB01CDDCC06B7F57C11E74D" 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_DAC9487C49B404B7B9BBB7F57C116129" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F" xlink:to="loc_us-gaap_InterestRateContractMember_DAC9487C49B404B7B9BBB7F57C116129" 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_BCB6F3D90437A8EBD41BB7F57C12959B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_DA2A785199C06078FF23B7F57C105F8F" xlink:to="loc_us-gaap_EquitySwapMember_BCB6F3D90437A8EBD41BB7F57C12959B" 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_445B53AEA5822C180480B7F57C127431" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_09441EE358F40B10BC52B7F57C120C4C" xlink:to="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_445B53AEA5822C180480B7F57C127431" 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_C099D2F0A7CAA7A8D062B7F57C128D24" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_09441EE358F40B10BC52B7F57C120C4C" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossRecognizedInOtherComprehensiveIncomeEffectivePortionNet_C099D2F0A7CAA7A8D062B7F57C128D24" 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_B791B1F64818FC1AA9ABB7F57C1314A7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_09441EE358F40B10BC52B7F57C120C4C" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossReclassifiedFromAccumulatedOCIIntoIncomeEffectivePortionNet_B791B1F64818FC1AA9ABB7F57C1314A7" 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_56A16466C1505E13D27DB7F57D1386C1" 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_7266AF3E553FDC6BC1F3B7F57D11A8D4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_DocumentInformationTable_7266AF3E553FDC6BC1F3B7F57D11A8D4" 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_B4F550696563C2BAB49EB7F57D12DCFB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_DocumentInformationTable_7266AF3E553FDC6BC1F3B7F57D11A8D4" xlink:to="loc_us-gaap_StatementClassOfStockAxis_B4F550696563C2BAB49EB7F57D12DCFB" 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_69CF3A0182E9D0748A13B7F57D12686C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_B4F550696563C2BAB49EB7F57D12DCFB" xlink:to="loc_us-gaap_ClassOfStockDomain_69CF3A0182E9D0748A13B7F57D12686C_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_69CF3A0182E9D0748A13B7F57D12686C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_B4F550696563C2BAB49EB7F57D12DCFB" xlink:to="loc_us-gaap_ClassOfStockDomain_69CF3A0182E9D0748A13B7F57D12686C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_9C9EB79ED8CBD4755B71B7F57D12EF23" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_69CF3A0182E9D0748A13B7F57D12686C" xlink:to="loc_hsy_HersheyCommonStockMember_9C9EB79ED8CBD4755B71B7F57D12EF23" 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_4266BC3E434A17B4C86FB7F57D12B49A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_69CF3A0182E9D0748A13B7F57D12686C" xlink:to="loc_us-gaap_CommonClassBMember_4266BC3E434A17B4C86FB7F57D12B49A" 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_F90C4FFD98D4151FFD9FB7F57D135194" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityRegistrantName_F90C4FFD98D4151FFD9FB7F57D135194" 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_70479DE02270E273AEE3B7F57D139A8B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityCentralIndexKey_70479DE02270E273AEE3B7F57D139A8B" 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_756EE53FEEB078366F92B7F57D13082E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_CurrentFiscalYearEndDate_756EE53FEEB078366F92B7F57D13082E" 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_E1612CA46BDBB4372D94B7F57D135E59" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityFilerCategory_E1612CA46BDBB4372D94B7F57D135E59" 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_AF21B6CAEE96DF21639CB7F57D14D0A1" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_DocumentType_AF21B6CAEE96DF21639CB7F57D14D0A1" 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_1441A9416F17E3DC34FBB7F57D1493DE" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_DocumentPeriodEndDate_1441A9416F17E3DC34FBB7F57D1493DE" 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_66EA9B038E14D7CD0039B7F57D143A13" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_DocumentFiscalYearFocus_66EA9B038E14D7CD0039B7F57D143A13" 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_3A703079B09B98C0F105B7F57D140DBB" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_DocumentFiscalPeriodFocus_3A703079B09B98C0F105B7F57D140DBB" 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_C95E7C409DD1E0195041B7F57D141D19" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_AmendmentFlag_C95E7C409DD1E0195041B7F57D141D19" 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_86D1EFB1DE9EC6293217B7F57D14475C" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_86D1EFB1DE9EC6293217B7F57D14475C" 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_39A73DA25F9CFCCBEAB2B7F57D1581CA" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityWellKnownSeasonedIssuer_39A73DA25F9CFCCBEAB2B7F57D1581CA" 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_763CCB2A0F0BDC4503E2B7F57D156313" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityVoluntaryFilers_763CCB2A0F0BDC4503E2B7F57D156313" 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_204C77E6BC64D87ABAC8B7F57D15B279" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityCurrentReportingStatus_204C77E6BC64D87ABAC8B7F57D15B279" 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_E2322FCAD2462854CC30B7F57D15C8C6" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_DocumentInformationLineItems_56A16466C1505E13D27DB7F57D1386C1" xlink:to="loc_dei_EntityPublicFloat_E2322FCAD2462854CC30B7F57D15C8C6" 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_3664F6C472A1D5BBC9C9B7F57AB6F9EB" 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_C2A2975BDF5CA082C6EEB7F57AB5513F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_3664F6C472A1D5BBC9C9B7F57AB6F9EB" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_C2A2975BDF5CA082C6EEB7F57AB5513F" 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_0DCDAABFE1768BABA174B7F57AB58590" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_C2A2975BDF5CA082C6EEB7F57AB5513F" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_0DCDAABFE1768BABA174B7F57AB58590" 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_7251A368E2AA2D8E169FB7F57AB6D1BB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_0DCDAABFE1768BABA174B7F57AB58590" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7251A368E2AA2D8E169FB7F57AB6D1BB_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_7251A368E2AA2D8E169FB7F57AB6D1BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_0DCDAABFE1768BABA174B7F57AB58590" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7251A368E2AA2D8E169FB7F57AB6D1BB" 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_BD46E3372B81CCDF9E96B7F57AB6807A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7251A368E2AA2D8E169FB7F57AB6D1BB" xlink:to="loc_us-gaap_EmployeeStockOptionMember_BD46E3372B81CCDF9E96B7F57AB6807A" 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_B7C8C4F5D0D19D298750B7F57AB6B187" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_3664F6C472A1D5BBC9C9B7F57AB6F9EB" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_B7C8C4F5D0D19D298750B7F57AB6B187" 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/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_ED6DB59506C386A03162B7F57BF2A98B" 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_A157697B1D955079151CB7F57BF09ACB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_ED6DB59506C386A03162B7F57BF2A98B" xlink:to="loc_us-gaap_DerivativeTable_A157697B1D955079151CB7F57BF09ACB" 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_F284FCBBB094A2144719B7F57BF044E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_A157697B1D955079151CB7F57BF09ACB" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_F284FCBBB094A2144719B7F57BF044E2" 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_FEB972D5030AACD2EC82B7F57BF1C785_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_F284FCBBB094A2144719B7F57BF044E2" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_FEB972D5030AACD2EC82B7F57BF1C785_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_FEB972D5030AACD2EC82B7F57BF1C785" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_F284FCBBB094A2144719B7F57BF044E2" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_FEB972D5030AACD2EC82B7F57BF1C785" 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_83E33507882E747B65AEB7F57BF14F3A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_FEB972D5030AACD2EC82B7F57BF1C785" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_83E33507882E747B65AEB7F57BF14F3A" 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_5B2FDD9C00BCBEE49A49B7F57BF1AED6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_A157697B1D955079151CB7F57BF09ACB" xlink:to="loc_us-gaap_RestructuringPlanAxis_5B2FDD9C00BCBEE49A49B7F57BF1AED6" 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_4C6A91DA03BEF6F753B0B7F57BF16D15_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_5B2FDD9C00BCBEE49A49B7F57BF1AED6" xlink:to="loc_us-gaap_RestructuringPlanDomain_4C6A91DA03BEF6F753B0B7F57BF16D15_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_4C6A91DA03BEF6F753B0B7F57BF16D15" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_5B2FDD9C00BCBEE49A49B7F57BF1AED6" xlink:to="loc_us-gaap_RestructuringPlanDomain_4C6A91DA03BEF6F753B0B7F57BF16D15" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_MarginforGrowthProgramMember" xlink:label="loc_hsy_MarginforGrowthProgramMember_0DA26C2F0C258D6CBDE3B7F57BF2C453" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_4C6A91DA03BEF6F753B0B7F57BF16D15" xlink:to="loc_hsy_MarginforGrowthProgramMember_0DA26C2F0C258D6CBDE3B7F57BF2C453" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf" xlink:label="loc_us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf_67D9F041F9767A60EBE6B7F57BF25D93" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_ED6DB59506C386A03162B7F57BF2A98B" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf_67D9F041F9767A60EBE6B7F57BF25D93" 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_D6FB3E22597C3C71E511B7F57BF2F225" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_ED6DB59506C386A03162B7F57BF2A98B" xlink:to="loc_us-gaap_FairValueNetAssetLiability_D6FB3E22597C3C71E511B7F57BF2F225" 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_B0BB28D4D001FC6A1E15B7F57BF261A3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_ED6DB59506C386A03162B7F57BF2A98B" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsExcludingGoodwill_B0BB28D4D001FC6A1E15B7F57BF261A3" 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_BDEB16D69CBC69FB6D4FB7F57BF305CA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_ED6DB59506C386A03162B7F57BF2A98B" xlink:to="loc_us-gaap_ImpairmentOfLongLivedAssetsHeldForUse_BDEB16D69CBC69FB6D4FB7F57BF305CA" 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_13602C8FA1035DF899D5B7F57C028426" 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_8833BE238E23DA928C06B7F57BFE837C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_13602C8FA1035DF899D5B7F57C028426" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_8833BE238E23DA928C06B7F57BFE837C" 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_B05A874944F55F358F19B7F57BFFE79C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_8833BE238E23DA928C06B7F57BFE837C" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_B05A874944F55F358F19B7F57BFFE79C" 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_404AB901A811DDC1B663B7F57BFF8C14_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_B05A874944F55F358F19B7F57BFFE79C" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_404AB901A811DDC1B663B7F57BFF8C14_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_404AB901A811DDC1B663B7F57BFF8C14" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_B05A874944F55F358F19B7F57BFFE79C" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_404AB901A811DDC1B663B7F57BFF8C14" 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_22A92D9A987912EAC74AB7F57BFF2394" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_404AB901A811DDC1B663B7F57BFF8C14" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_22A92D9A987912EAC74AB7F57BFF2394" 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_58480A4AC729BE5568BFB7F57C00BF6F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_8833BE238E23DA928C06B7F57BFE837C" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_58480A4AC729BE5568BFB7F57C00BF6F" 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_0C19EC662759DB3FEBF9B7F57C00CC10_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_58480A4AC729BE5568BFB7F57C00BF6F" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10_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_0C19EC662759DB3FEBF9B7F57C00CC10" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_58480A4AC729BE5568BFB7F57C00BF6F" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10" 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_5EDB918B124709C52776B7F57C001EBA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10" xlink:to="loc_us-gaap_ForeignExchangeContractMember_5EDB918B124709C52776B7F57C001EBA" 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_25D392E96A769928E66DB7F57C00E49E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10" xlink:to="loc_us-gaap_InterestRateContractMember_25D392E96A769928E66DB7F57C00E49E" 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_5A62D74E1E41603A3CCEB7F57C01054D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10" xlink:to="loc_us-gaap_EquitySwapMember_5A62D74E1E41603A3CCEB7F57C01054D" 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_E91AC3553477281F8268B7F57C01BCD2" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_0C19EC662759DB3FEBF9B7F57C00CC10" xlink:to="loc_us-gaap_CommodityContractMember_E91AC3553477281F8268B7F57C01BCD2" 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_8E5A820CDCA37C36C4F7B7F57C01DA76" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_8833BE238E23DA928C06B7F57BFE837C" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_8E5A820CDCA37C36C4F7B7F57C01DA76" 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_BC2A0CEB8516343F5D47B7F57C019410_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_8E5A820CDCA37C36C4F7B7F57C01DA76" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC2A0CEB8516343F5D47B7F57C019410_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_BC2A0CEB8516343F5D47B7F57C019410" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_8E5A820CDCA37C36C4F7B7F57C01DA76" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC2A0CEB8516343F5D47B7F57C019410" 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_D4DF86B854A2C6CB6606B7F57C023969" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC2A0CEB8516343F5D47B7F57C019410" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_D4DF86B854A2C6CB6606B7F57C023969" 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_2E6F18389060B799089EB7F57C02C6F9" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC2A0CEB8516343F5D47B7F57C019410" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_2E6F18389060B799089EB7F57C02C6F9" 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_AB4FD227729E8D34C933B7F57C02D857" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_BC2A0CEB8516343F5D47B7F57C019410" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_AB4FD227729E8D34C933B7F57C02D857" 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_2D1A8F833AD1ECEFA695B7F57C02DFED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_13602C8FA1035DF899D5B7F57C028426" xlink:to="loc_us-gaap_DerivativeAssets_2D1A8F833AD1ECEFA695B7F57C02DFED" 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_5C7FB54C588C221FF365B7F57C030FFD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_13602C8FA1035DF899D5B7F57C028426" xlink:to="loc_us-gaap_DerivativeLiabilities_5C7FB54C588C221FF365B7F57C030FFD" 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_5766852D4261FD49D3C9B7F57BF8A7E5" 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_1F748AAD2F7AACE6382BB7F57BF7F22D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_1F748AAD2F7AACE6382BB7F57BF7F22D" 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_B95C733EBC83300132B7B7F57BF7828F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_1F748AAD2F7AACE6382BB7F57BF7F22D" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B95C733EBC83300132B7B7F57BF7828F" 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_114C3B4A74CF3D02DF41B7F57BF80EB6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B95C733EBC83300132B7B7F57BF7828F" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_114C3B4A74CF3D02DF41B7F57BF80EB6_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_114C3B4A74CF3D02DF41B7F57BF80EB6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B95C733EBC83300132B7B7F57BF7828F" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_114C3B4A74CF3D02DF41B7F57BF80EB6" 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_FB015A64CEA0C753EFA7B7F57BF85C54" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_114C3B4A74CF3D02DF41B7F57BF80EB6" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_FB015A64CEA0C753EFA7B7F57BF85C54" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_LongtermDebtCurrentMaturitiesFairValue" xlink:label="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_830A508E0A561D564BA3B7F57BF839F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_830A508E0A561D564BA3B7F57BF839F7" 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_8BB1642D815818A50902B7F57BF9ABA8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_us-gaap_LongTermDebtCurrent_8BB1642D815818A50902B7F57BF9ABA8" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_LongtermDebtExcludingCurrentMaturitiesFairValue" xlink:label="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_2BBD51E94A588FC30160B7F57BF9697F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_2BBD51E94A588FC30160B7F57BF9697F" 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_922B4302CFB89D64DC51B7F57BF9E8E8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_922B4302CFB89D64DC51B7F57BF9E8E8" 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_BB47D2E8F39B57570BA1B7F57BF98335" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_us-gaap_LongTermDebtFairValue_BB47D2E8F39B57570BA1B7F57BF98335" 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_B5A6EBC899784FF5BD0DB7F57BF95A64" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_5766852D4261FD49D3C9B7F57BF8A7E5" xlink:to="loc_us-gaap_LongTermDebt_B5A6EBC899784FF5BD0DB7F57BF95A64" 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_53D4B21E77ECFFB83C10B7F57C750462" 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_54AE694E8428D8E65859B7F57C72A20B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_53D4B21E77ECFFB83C10B7F57C750462" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_54AE694E8428D8E65859B7F57C72A20B" 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_6EA60DEC9B834A0A81E8B7F57C732769" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_54AE694E8428D8E65859B7F57C72A20B" xlink:to="loc_us-gaap_ConsolidationItemsAxis_6EA60DEC9B834A0A81E8B7F57C732769" 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_67ECBABD8D4163023C60B7F57C7350A5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_6EA60DEC9B834A0A81E8B7F57C732769" xlink:to="loc_us-gaap_ConsolidationItemsDomain_67ECBABD8D4163023C60B7F57C7350A5_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_67ECBABD8D4163023C60B7F57C7350A5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_6EA60DEC9B834A0A81E8B7F57C732769" xlink:to="loc_us-gaap_ConsolidationItemsDomain_67ECBABD8D4163023C60B7F57C7350A5" 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_07782E28D6212B2B0E9DB7F57C731134" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_54AE694E8428D8E65859B7F57C72A20B" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_07782E28D6212B2B0E9DB7F57C731134" 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_3D6003DDDD8BC34FFA27B7F57C74C559_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_07782E28D6212B2B0E9DB7F57C731134" xlink:to="loc_us-gaap_SegmentDomain_3D6003DDDD8BC34FFA27B7F57C74C559_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_3D6003DDDD8BC34FFA27B7F57C74C559" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_07782E28D6212B2B0E9DB7F57C731134" xlink:to="loc_us-gaap_SegmentDomain_3D6003DDDD8BC34FFA27B7F57C74C559" 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_D5599417815843D059E5B7F57C74EF99" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_54AE694E8428D8E65859B7F57C72A20B" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_D5599417815843D059E5B7F57C74EF99" 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_1F36BB347A821C593A4BB7F57C74243B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_D5599417815843D059E5B7F57C74EF99" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_1F36BB347A821C593A4BB7F57C74243B_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_1F36BB347A821C593A4BB7F57C74243B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_D5599417815843D059E5B7F57C74EF99" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_1F36BB347A821C593A4BB7F57C74243B" 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_6A2902D10198F2CA9AF7B7F57C740021" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_54AE694E8428D8E65859B7F57C72A20B" xlink:to="loc_us-gaap_RangeAxis_6A2902D10198F2CA9AF7B7F57C740021" 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_60CB585D20F2E4EF4DA9B7F57C74B596_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_6A2902D10198F2CA9AF7B7F57C740021" xlink:to="loc_us-gaap_RangeMember_60CB585D20F2E4EF4DA9B7F57C74B596_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_60CB585D20F2E4EF4DA9B7F57C74B596" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_6A2902D10198F2CA9AF7B7F57C740021" xlink:to="loc_us-gaap_RangeMember_60CB585D20F2E4EF4DA9B7F57C74B596" 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_2A4DC482BA80F4A2248BB7F57C75130C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_53D4B21E77ECFFB83C10B7F57C750462" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_2A4DC482BA80F4A2248BB7F57C75130C" xlink:type="arc" />
  </link:definitionLink>
  <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_4B8CC441E34A8C7D6C76B7F57C84CEB0" 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_B01015A00CC5F2621344B7F57C829427" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_4B8CC441E34A8C7D6C76B7F57C84CEB0" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_B01015A00CC5F2621344B7F57C829427" 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_F6836341C615174DC5DDB7F57C83B982" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_B01015A00CC5F2621344B7F57C829427" xlink:to="loc_us-gaap_ConsolidationItemsAxis_F6836341C615174DC5DDB7F57C83B982" 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_A3B793B3702EFE971CEBB7F57C83DCAB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_F6836341C615174DC5DDB7F57C83B982" xlink:to="loc_us-gaap_ConsolidationItemsDomain_A3B793B3702EFE971CEBB7F57C83DCAB_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_A3B793B3702EFE971CEBB7F57C83DCAB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_F6836341C615174DC5DDB7F57C83B982" xlink:to="loc_us-gaap_ConsolidationItemsDomain_A3B793B3702EFE971CEBB7F57C83DCAB" 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_FA6264C7B56737C8CE42B7F57C83BB40" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_A3B793B3702EFE971CEBB7F57C83DCAB" xlink:to="loc_us-gaap_OperatingSegmentsMember_FA6264C7B56737C8CE42B7F57C83BB40" 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_7B4040D56FA66F61D961B7F57C83AADF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_B01015A00CC5F2621344B7F57C829427" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_7B4040D56FA66F61D961B7F57C83AADF" 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_36F64905F2AF9784B10AB7F57C847784_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7B4040D56FA66F61D961B7F57C83AADF" xlink:to="loc_us-gaap_SegmentDomain_36F64905F2AF9784B10AB7F57C847784_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_36F64905F2AF9784B10AB7F57C847784" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7B4040D56FA66F61D961B7F57C83AADF" xlink:to="loc_us-gaap_SegmentDomain_36F64905F2AF9784B10AB7F57C847784" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_2DDFD70D34332F26D8E6B7F57C848AEF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_36F64905F2AF9784B10AB7F57C847784" xlink:to="loc_hsy_NorthAmericaSegmentMember_2DDFD70D34332F26D8E6B7F57C848AEF" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_9E941A75D52B702D781BB7F57C84F691" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_36F64905F2AF9784B10AB7F57C847784" xlink:to="loc_hsy_InternationalandOtherSegmentMember_9E941A75D52B702D781BB7F57C84F691" 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_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_4B8CC441E34A8C7D6C76B7F57C84CEB0" xlink:to="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" 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_219501815EAB68A8D182B7F57C8510D6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:to="loc_us-gaap_Goodwill_219501815EAB68A8D182B7F57C8510D6" 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_3AC71D912777389CB850B7F57C85434A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_3AC71D912777389CB850B7F57C85434A" 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_596C5278DA20D154B1D8B7F57C85B970" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_596C5278DA20D154B1D8B7F57C85B970" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_GoodwillReclassificationAmount" xlink:label="loc_hsy_GoodwillReclassificationAmount_9AA03137B706F93A8641B7F57C85CF79" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:to="loc_hsy_GoodwillReclassificationAmount_9AA03137B706F93A8641B7F57C85CF79" 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_1D3E3331C7B671B07FFDB7F57C867BBF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_CEE9EEBC74DA38235B3DB7F57C8486B6" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_1D3E3331C7B671B07FFDB7F57C867BBF" 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_B4CC0FB905DB617264ECB7F57C7C207C" 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_5E5E7122EA1CF06B1AC6B7F57C7AE256" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_B4CC0FB905DB617264ECB7F57C7C207C" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E5E7122EA1CF06B1AC6B7F57C7AE256" 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_823832E501D74A0D2D25B7F57C7AE254" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E5E7122EA1CF06B1AC6B7F57C7AE256" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_823832E501D74A0D2D25B7F57C7AE254" 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_35B041AE84B4FDE894A3B7F57C7A10BD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_823832E501D74A0D2D25B7F57C7AE254" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_35B041AE84B4FDE894A3B7F57C7A10BD_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_35B041AE84B4FDE894A3B7F57C7A10BD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_823832E501D74A0D2D25B7F57C7AE254" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_35B041AE84B4FDE894A3B7F57C7A10BD" 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_FC6AF197A0D982888037B7F57C7B2972" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_35B041AE84B4FDE894A3B7F57C7A10BD" xlink:to="loc_us-gaap_TrademarksMember_FC6AF197A0D982888037B7F57C7B2972" 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_46255EEB2A5A34C43EB8B7F57C7BDDAA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_35B041AE84B4FDE894A3B7F57C7A10BD" xlink:to="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_46255EEB2A5A34C43EB8B7F57C7BDDAA" 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_3FE347284CA40DE09684B7F57C7BA760" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_35B041AE84B4FDE894A3B7F57C7A10BD" xlink:to="loc_us-gaap_PatentsMember_3FE347284CA40DE09684B7F57C7BA760" 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_830574B5312C1F82B086B7F57C7B5C19" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_5E5E7122EA1CF06B1AC6B7F57C7AE256" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_830574B5312C1F82B086B7F57C7B5C19" 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_8D15CC21C1066C7F6FBEB7F57C7B9CD2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_830574B5312C1F82B086B7F57C7B5C19" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_8D15CC21C1066C7F6FBEB7F57C7B9CD2_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_8D15CC21C1066C7F6FBEB7F57C7B9CD2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_830574B5312C1F82B086B7F57C7B5C19" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_8D15CC21C1066C7F6FBEB7F57C7B9CD2" 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_8D821A01C596EFAB8ADDB7F57C7C4494" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_8D15CC21C1066C7F6FBEB7F57C7B9CD2" xlink:to="loc_us-gaap_TrademarksMember_8D821A01C596EFAB8ADDB7F57C7C4494" 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_C05B271C88DAF33F1023B7F57C7C9779" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_B4CC0FB905DB617264ECB7F57C7C207C" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_C05B271C88DAF33F1023B7F57C7C9779" 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_60954BE0896D5BDABBAEB7F57C7CF191" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_B4CC0FB905DB617264ECB7F57C7C207C" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_60954BE0896D5BDABBAEB7F57C7CF191" 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_07DCE334597C022AE1AEB7F57C7DA571" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_B4CC0FB905DB617264ECB7F57C7C207C" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_07DCE334597C022AE1AEB7F57C7DA571" 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_DC32E5286E5D5F0E9019B7F57C7D439A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_B4CC0FB905DB617264ECB7F57C7C207C" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_DC32E5286E5D5F0E9019B7F57C7D439A" 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/IncomeTaxesIncomeTaxesDetails" 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_EECCA3CC4890D1C26979B7F57BB0CC00" 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_98DA36638EFE815976ACB7F57BAF2F3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_EECCA3CC4890D1C26979B7F57BB0CC00" xlink:to="loc_us-gaap_IncomeTaxContingencyTable_98DA36638EFE815976ACB7F57BAF2F3D" 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_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_5C6A8E648372E267EB98B7F57BAFB3C2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_98DA36638EFE815976ACB7F57BAF2F3D" xlink:to="loc_us-gaap_StatementScenarioAxis_5C6A8E648372E267EB98B7F57BAFB3C2" 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_252B59D2CE1D537A7C99B7F57BB09D3F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_5C6A8E648372E267EB98B7F57BAFB3C2" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_252B59D2CE1D537A7C99B7F57BB09D3F_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_252B59D2CE1D537A7C99B7F57BB09D3F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_5C6A8E648372E267EB98B7F57BAFB3C2" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_252B59D2CE1D537A7C99B7F57BB09D3F" 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_6415FF8E0303297B26D2B7F57BB03988" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_252B59D2CE1D537A7C99B7F57BB09D3F" xlink:to="loc_us-gaap_ScenarioForecastMember_6415FF8E0303297B26D2B7F57BB03988" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_D02D38079F4C23A70C5BB7F57BB07DB8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_EECCA3CC4890D1C26979B7F57BB0CC00" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_D02D38079F4C23A70C5BB7F57BB07DB8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_0B421B12F7420474AAAEB7F57BB1F1E1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_EECCA3CC4890D1C26979B7F57BB0CC00" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_0B421B12F7420474AAAEB7F57BB1F1E1" 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_8925F2C3037961036DC9B7F57BB1224E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_EECCA3CC4890D1C26979B7F57BB0CC00" xlink:to="loc_us-gaap_SignificantChangeInUnrecognizedTaxBenefitsIsReasonablyPossibleAmountOfUnrecordedBenefit_8925F2C3037961036DC9B7F57BB1224E" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit" xlink:label="loc_hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit_1F6DF514CB5B03BDFBBFB7F57BB143AB" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_EECCA3CC4890D1C26979B7F57BB0CC00" xlink:to="loc_hsy_TaxCutsandJobsActof2017NetImpactChangeinTaxRateandMandatoryTaxonUnremittedForeignEarningsIncomeTaxExpenseBenefit_1F6DF514CB5B03BDFBBFB7F57BB143AB" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/NoncontrollingInterestNarrativeDetails" 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_F131535E364C35A38A01B7F57ADE076C" 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_592FCDEE35DD6B2B0BCCB7F57ADC5C39" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MinorityInterestLineItems_F131535E364C35A38A01B7F57ADE076C" xlink:to="loc_us-gaap_MinorityInterestTable_592FCDEE35DD6B2B0BCCB7F57ADC5C39" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_44A36E03A8A9C443F22DB7F57ADC7644" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_MinorityInterestTable_592FCDEE35DD6B2B0BCCB7F57ADC5C39" xlink:to="loc_dei_LegalEntityAxis_44A36E03A8A9C443F22DB7F57ADC7644" 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_5FA83E40C91FF9C18B69B7F57ADC51DC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_44A36E03A8A9C443F22DB7F57ADC7644" xlink:to="loc_dei_EntityDomain_5FA83E40C91FF9C18B69B7F57ADC51DC_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_5FA83E40C91FF9C18B69B7F57ADC51DC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_44A36E03A8A9C443F22DB7F57ADC7644" xlink:to="loc_dei_EntityDomain_5FA83E40C91FF9C18B69B7F57ADC51DC" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_LotteShanghaiFoodCompanyMember" xlink:label="loc_hsy_LotteShanghaiFoodCompanyMember_75C155321853BB0FE103B7F57ADD5A63" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_5FA83E40C91FF9C18B69B7F57ADC51DC" xlink:to="loc_hsy_LotteShanghaiFoodCompanyMember_75C155321853BB0FE103B7F57ADD5A63" 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_B63CA1339B6620F272FBB7F57ADDF325" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_MinorityInterestTable_592FCDEE35DD6B2B0BCCB7F57ADC5C39" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_B63CA1339B6620F272FBB7F57ADDF325" 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_BA489EEEB40B445AFF8AB7F57ADDB5FC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_B63CA1339B6620F272FBB7F57ADDF325" xlink:to="loc_us-gaap_EquityComponentDomain_BA489EEEB40B445AFF8AB7F57ADDB5FC_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_BA489EEEB40B445AFF8AB7F57ADDB5FC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_B63CA1339B6620F272FBB7F57ADDF325" xlink:to="loc_us-gaap_EquityComponentDomain_BA489EEEB40B445AFF8AB7F57ADDB5FC" 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_3A653D940B3DAADEF99AB7F57ADDEED7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_BA489EEEB40B445AFF8AB7F57ADDB5FC" xlink:to="loc_us-gaap_NoncontrollingInterestMember_3A653D940B3DAADEF99AB7F57ADDEED7" 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_43E8DD7E011FA89CB799B7F57ADE14F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MinorityInterestLineItems_F131535E364C35A38A01B7F57ADE076C" xlink:to="loc_us-gaap_MinorityInterestOwnershipPercentageByParent_43E8DD7E011FA89CB799B7F57ADE14F7" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/NoncontrollingInterestNoncontrollingInterestNotes" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/NoncontrollingInterestNoncontrollingInterestTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/NoncontrollingInterestScheduleOfActivityRelatingToNoncontrollingInterestDetails" 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_DC2894DCAC7DE363762EC7EA16D7F228" 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_EDAEA4FDFE9C86A69775C7EA16D5138C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_MinorityInterestLineItems_DC2894DCAC7DE363762EC7EA16D7F228" xlink:to="loc_us-gaap_MinorityInterestTable_EDAEA4FDFE9C86A69775C7EA16D5138C" 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_A8EC63E22779E3A31F37C7EA16D61DC3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_MinorityInterestTable_EDAEA4FDFE9C86A69775C7EA16D5138C" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_A8EC63E22779E3A31F37C7EA16D61DC3" 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_176C68328738706C4294C7EA16D60EC7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_A8EC63E22779E3A31F37C7EA16D61DC3" xlink:to="loc_us-gaap_EquityComponentDomain_176C68328738706C4294C7EA16D60EC7_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_176C68328738706C4294C7EA16D60EC7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_A8EC63E22779E3A31F37C7EA16D61DC3" xlink:to="loc_us-gaap_EquityComponentDomain_176C68328738706C4294C7EA16D60EC7" 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_C3D338D5A5145FCDEB98C7EA16D6255F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_176C68328738706C4294C7EA16D60EC7" xlink:to="loc_us-gaap_NoncontrollingInterestMember_C3D338D5A5145FCDEB98C7EA16D6255F" 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_76604370203786499484C7EA16D742E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MinorityInterestLineItems_DC2894DCAC7DE363762EC7EA16D7F228" xlink:to="loc_us-gaap_MinorityInterest_76604370203786499484C7EA16D742E8" 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_1315BFED45CE89D93CDEC7EA16D7341B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MinorityInterestLineItems_DC2894DCAC7DE363762EC7EA16D7F228" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_1315BFED45CE89D93CDEC7EA16D7341B" 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_56E00B9BCA5D23ABD931C7EA16D7795A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MinorityInterestLineItems_DC2894DCAC7DE363762EC7EA16D7F228" xlink:to="loc_us-gaap_OtherComprehensiveIncomeForeignCurrencyTransactionAndTranslationAdjustmentNetOfTaxPortionAttributableToNoncontrollingInterest_56E00B9BCA5D23ABD931C7EA16D7795A" xlink:type="arc" />
  </link:definitionLink>
  <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: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_B761F5F585CD59F167B5B7F57B9C16D9" 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_DE1918DF1D482B2E640EB7F57B9AD936" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_B761F5F585CD59F167B5B7F57B9C16D9" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_DE1918DF1D482B2E640EB7F57B9AD936" 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_DDE7522C390DE2E7A59AB7F57B9B296A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_DE1918DF1D482B2E640EB7F57B9AD936" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_DDE7522C390DE2E7A59AB7F57B9B296A" 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_BFCA6CD83F89A81EF1F5B7F57B9BF73B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_DDE7522C390DE2E7A59AB7F57B9B296A" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_BFCA6CD83F89A81EF1F5B7F57B9BF73B_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_BFCA6CD83F89A81EF1F5B7F57B9BF73B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_DDE7522C390DE2E7A59AB7F57B9B296A" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_BFCA6CD83F89A81EF1F5B7F57B9BF73B" 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_6BB92CD0EAC5F0BD1683B7F57B9B7C1B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_BFCA6CD83F89A81EF1F5B7F57B9BF73B" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_6BB92CD0EAC5F0BD1683B7F57B9B7C1B" 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_9BAA890BC0132A5B7F59B7F57B9C8509" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_BFCA6CD83F89A81EF1F5B7F57B9BF73B" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_9BAA890BC0132A5B7F59B7F57B9C8509" 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_7F4951123EFA33B54663B7F57B9C1BE2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_B761F5F585CD59F167B5B7F57B9C16D9" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_7F4951123EFA33B54663B7F57B9C1BE2" 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_751FF6B24F84F1F3D7B9B7F57BA318E7" 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_406C9D389DAECDB6C0E5B7F57BA2AB31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_751FF6B24F84F1F3D7B9B7F57BA318E7" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_406C9D389DAECDB6C0E5B7F57BA2AB31" 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_7E96B517578A61DE5521B7F57BA2F6AC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_406C9D389DAECDB6C0E5B7F57BA2AB31" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_7E96B517578A61DE5521B7F57BA2F6AC" 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_95E28542CCE460A74372B7F57BA28D5E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_7E96B517578A61DE5521B7F57BA2F6AC" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_95E28542CCE460A74372B7F57BA28D5E_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_95E28542CCE460A74372B7F57BA28D5E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_7E96B517578A61DE5521B7F57BA2F6AC" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_95E28542CCE460A74372B7F57BA28D5E" 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_98529C015FAAA78E55BDB7F57BA37765" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_95E28542CCE460A74372B7F57BA28D5E" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_98529C015FAAA78E55BDB7F57BA37765" 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_6E507C2989D989B33C48B7F57BA333CC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_95E28542CCE460A74372B7F57BA28D5E" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_6E507C2989D989B33C48B7F57BA333CC" 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_DFB94BB982BA3222C3EEB7F57BA38832" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_751FF6B24F84F1F3D7B9B7F57BA318E7" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" 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_2F390571A3C70D0799A9B7F57BA49DBE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_2F390571A3C70D0799A9B7F57BA49DBE" 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_F97100B1B21E605A9C79B7F57BA4D32C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_F97100B1B21E605A9C79B7F57BA4D32C" 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_02CE23FA29690EF31F75B7F57BA469E9" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_02CE23FA29690EF31F75B7F57BA469E9" 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_5C1FCA25F77B8D3A231CB7F57BA4725C" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_5C1FCA25F77B8D3A231CB7F57BA4725C" 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_9991AF99268901E1CFB2B7F57BA456FC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_9991AF99268901E1CFB2B7F57BA456FC" 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_2D27F1E1BC0BBCA78B5BB7F57BA4796B" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCostAbstract_DFB94BB982BA3222C3EEB7F57BA38832" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_2D27F1E1BC0BBCA78B5BB7F57BA4796B" 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/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_FDC5F8DDE100EAF6FCD5B7F57ABF61C9" 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_3EFE98B47BD16C810128B7F57ABD4DE9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_FDC5F8DDE100EAF6FCD5B7F57ABF61C9" xlink:to="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3EFE98B47BD16C810128B7F57ABD4DE9" 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_2095FB038FBC8B932F68B7F57ABD9CEE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3EFE98B47BD16C810128B7F57ABD4DE9" xlink:to="loc_us-gaap_StatementClassOfStockAxis_2095FB038FBC8B932F68B7F57ABD9CEE" 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_DE92A87AF7DA5D9EC91BB7F57ABE78FF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2095FB038FBC8B932F68B7F57ABD9CEE" xlink:to="loc_us-gaap_ClassOfStockDomain_DE92A87AF7DA5D9EC91BB7F57ABE78FF_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_DE92A87AF7DA5D9EC91BB7F57ABE78FF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2095FB038FBC8B932F68B7F57ABD9CEE" xlink:to="loc_us-gaap_ClassOfStockDomain_DE92A87AF7DA5D9EC91BB7F57ABE78FF" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_A24C3420AD5490EC19EAB7F57ABE587E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_DE92A87AF7DA5D9EC91BB7F57ABE78FF" xlink:to="loc_hsy_HersheyCommonStockMember_A24C3420AD5490EC19EAB7F57ABE587E" 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_D768BBADE1F5F18B532BB7F57ABED06E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_DE92A87AF7DA5D9EC91BB7F57ABE78FF" xlink:to="loc_us-gaap_CommonClassBMember_D768BBADE1F5F18B532BB7F57ABED06E" 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_A579B38529F441CEFBEAB7F57ABEAC7A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3EFE98B47BD16C810128B7F57ABD4DE9" xlink:to="loc_us-gaap_AwardTypeAxis_A579B38529F441CEFBEAB7F57ABEAC7A" 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_44A0D0ED0915F048CC1EB7F57ABE2210_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_A579B38529F441CEFBEAB7F57ABEAC7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_44A0D0ED0915F048CC1EB7F57ABE2210_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_44A0D0ED0915F048CC1EB7F57ABE2210" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_A579B38529F441CEFBEAB7F57ABEAC7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_44A0D0ED0915F048CC1EB7F57ABE2210" 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_4B8348B8E47BA799CE46B7F57ABF9109" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_44A0D0ED0915F048CC1EB7F57ABE2210" xlink:to="loc_us-gaap_EmployeeStockOptionMember_4B8348B8E47BA799CE46B7F57ABF9109" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_BD03BB5145E8507813F8B7F57ABF7DC4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_44A0D0ED0915F048CC1EB7F57ABE2210" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_BD03BB5145E8507813F8B7F57ABF7DC4" 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_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_FDC5F8DDE100EAF6FCD5B7F57ABF61C9" xlink:to="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" 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_EC6B0DDCACC75A693279B7F57AC0C6F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:to="loc_us-gaap_Dividends_EC6B0DDCACC75A693279B7F57AC0C6F0" 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_0CCB1F2F004F59DD6DDFB7F57AC06A41" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_0CCB1F2F004F59DD6DDFB7F57AC06A41" 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_70B81C4A7F7861E8C206B7F57AC089ED" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_70B81C4A7F7861E8C206B7F57AC089ED" 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_6DE1B574791CCB23854CB7F57AC0F1D3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_6DE1B574791CCB23854CB7F57AC0F1D3" 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_C6DA73FBDF677B62253EB7F57AC1CBF7" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_76F24A301E14F9A743AEB7F57AC0E1DA" xlink:to="loc_us-gaap_EarningsPerShareBasic_C6DA73FBDF677B62253EB7F57AC1CBF7" 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_FC734592086F869BF5E3B7F57AC111A7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_FDC5F8DDE100EAF6FCD5B7F57ABF61C9" xlink:to="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" 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_6FD5E726ED5D71885A63B7F57AC18DBB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_DistributedEarnings_6FD5E726ED5D71885A63B7F57AC18DBB" 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_D053E7C7FDF8B9D9C28FB7F57AC23257" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_D053E7C7FDF8B9D9C28FB7F57AC23257" 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_52E094AD6584479EDFD1B7F57AC224B0" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_52E094AD6584479EDFD1B7F57AC224B0" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock" xlink:label="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_D049259D4D45B07F77E6B7F57AC27E73" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_D049259D4D45B07F77E6B7F57AC27E73" 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_5D301638780D82120422B7F57AC2CAEE" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_5D301638780D82120422B7F57AC2CAEE" 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_378FE623B637A432D688B7F57AC22CBF" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_378FE623B637A432D688B7F57AC22CBF" 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_B0D76BE32865EE8CF7AFB7F57AC256EF" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_FC734592086F869BF5E3B7F57AC111A7" xlink:to="loc_us-gaap_EarningsPerShareDiluted_B0D76BE32865EE8CF7AFB7F57AC256EF" 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_0721587280FEE80ADD4BB7F57B340A28" 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_B01DA61D721DE2F98411B7F57B31D9EE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_0721587280FEE80ADD4BB7F57B340A28" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_B01DA61D721DE2F98411B7F57B31D9EE" 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_7E203BBA6B829A808858B7F57B31A90D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_B01DA61D721DE2F98411B7F57B31D9EE" xlink:to="loc_us-gaap_ConsolidationItemsAxis_7E203BBA6B829A808858B7F57B31A90D" 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_66EEDB94E5B5DC559F9FB7F57B324F46_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_7E203BBA6B829A808858B7F57B31A90D" xlink:to="loc_us-gaap_ConsolidationItemsDomain_66EEDB94E5B5DC559F9FB7F57B324F46_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_66EEDB94E5B5DC559F9FB7F57B324F46" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_7E203BBA6B829A808858B7F57B31A90D" xlink:to="loc_us-gaap_ConsolidationItemsDomain_66EEDB94E5B5DC559F9FB7F57B324F46" 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_14787D34BBD233A38F22B7F57B323F7B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_66EEDB94E5B5DC559F9FB7F57B324F46" xlink:to="loc_us-gaap_OperatingSegmentsMember_14787D34BBD233A38F22B7F57B323F7B" 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_011EF89FDC01763971FEB7F57B32903E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_66EEDB94E5B5DC559F9FB7F57B324F46" xlink:to="loc_us-gaap_CorporateNonSegmentMember_011EF89FDC01763971FEB7F57B32903E" 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_8E4BC28D2002D7470FBAB7F57B322755" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_B01DA61D721DE2F98411B7F57B31D9EE" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_8E4BC28D2002D7470FBAB7F57B322755" 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_4D1068DADC634F47A70FB7F57B32E26F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8E4BC28D2002D7470FBAB7F57B322755" xlink:to="loc_us-gaap_SegmentDomain_4D1068DADC634F47A70FB7F57B32E26F_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_4D1068DADC634F47A70FB7F57B32E26F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8E4BC28D2002D7470FBAB7F57B322755" xlink:to="loc_us-gaap_SegmentDomain_4D1068DADC634F47A70FB7F57B32E26F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_2C46C3DC02E10B513C02B7F57B336C55" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4D1068DADC634F47A70FB7F57B32E26F" xlink:to="loc_hsy_NorthAmericaSegmentMember_2C46C3DC02E10B513C02B7F57B336C55" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_210932E6ABC0F5195846B7F57B33716F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4D1068DADC634F47A70FB7F57B32E26F" xlink:to="loc_hsy_InternationalandOtherSegmentMember_210932E6ABC0F5195846B7F57B33716F" 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_F9E2D5CF983F2D66F19EB7F57B339B6C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4D1068DADC634F47A70FB7F57B32E26F" xlink:to="loc_us-gaap_CorporateMember_F9E2D5CF983F2D66F19EB7F57B339B6C" 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_CEEE0C0C04A61B555DEAB7F57B3439CF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_0721587280FEE80ADD4BB7F57B340A28" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_CEEE0C0C04A61B555DEAB7F57B3439CF" 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_205E11A4511395084A38B7F57B46BAB0" 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_4F9873EC476A1F42A838B7F57B43FF8F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4F9873EC476A1F42A838B7F57B43FF8F" 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_BF561D1C2273F428E412B7F57B434144" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4F9873EC476A1F42A838B7F57B43FF8F" xlink:to="loc_us-gaap_ConsolidationItemsAxis_BF561D1C2273F428E412B7F57B434144" 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_BEC0E8E8CD4650940181B7F57B44E28E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_BF561D1C2273F428E412B7F57B434144" xlink:to="loc_us-gaap_ConsolidationItemsDomain_BEC0E8E8CD4650940181B7F57B44E28E_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_BEC0E8E8CD4650940181B7F57B44E28E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_BF561D1C2273F428E412B7F57B434144" xlink:to="loc_us-gaap_ConsolidationItemsDomain_BEC0E8E8CD4650940181B7F57B44E28E" 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_141BF8EE387BEC3B316FB7F57B44DC5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_BEC0E8E8CD4650940181B7F57B44E28E" xlink:to="loc_us-gaap_OperatingSegmentsMember_141BF8EE387BEC3B316FB7F57B44DC5B" 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_CB0634ECCCFCA7E9B71CB7F57B44F745" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_BEC0E8E8CD4650940181B7F57B44E28E" xlink:to="loc_us-gaap_CorporateNonSegmentMember_CB0634ECCCFCA7E9B71CB7F57B44F745" 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_55F8544D6BCAE4CDED70B7F57B456501" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_BEC0E8E8CD4650940181B7F57B44E28E" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_55F8544D6BCAE4CDED70B7F57B456501" 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_E7A8C06AACC70EB7A817B7F57B45F7ED" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_4F9873EC476A1F42A838B7F57B43FF8F" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_E7A8C06AACC70EB7A817B7F57B45F7ED" 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_D140941C24E1BBA0D8E5B7F57B4561D6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_E7A8C06AACC70EB7A817B7F57B45F7ED" xlink:to="loc_us-gaap_SegmentDomain_D140941C24E1BBA0D8E5B7F57B4561D6_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_D140941C24E1BBA0D8E5B7F57B4561D6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_E7A8C06AACC70EB7A817B7F57B45F7ED" xlink:to="loc_us-gaap_SegmentDomain_D140941C24E1BBA0D8E5B7F57B4561D6" 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_9144143C1B235CA4C46FB7F57B450315" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D140941C24E1BBA0D8E5B7F57B4561D6" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_9144143C1B235CA4C46FB7F57B450315" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_4EC97D2EB7206D66AE30B7F57B45DDBD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D140941C24E1BBA0D8E5B7F57B4561D6" xlink:to="loc_hsy_NorthAmericaSegmentMember_4EC97D2EB7206D66AE30B7F57B45DDBD" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_InternationalandOtherSegmentMember" xlink:label="loc_hsy_InternationalandOtherSegmentMember_23C4028FD8DBB3145E90B7F57B467D67" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D140941C24E1BBA0D8E5B7F57B4561D6" xlink:to="loc_hsy_InternationalandOtherSegmentMember_23C4028FD8DBB3145E90B7F57B467D67" 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_714FFAF2AF8A3F0E852DB7F57B465890" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_SalesRevenueNet_714FFAF2AF8A3F0E852DB7F57B465890" 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_88C6C09CE6CAB1DB4B7FB7F57B47577B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_OperatingIncomeLoss_88C6C09CE6CAB1DB4B7FB7F57B47577B" 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_203F6A277947A85CBB26B7F57B47B4EB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_203F6A277947A85CBB26B7F57B47B4EB" 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_C3C24F3145F647BAA643B7F57B4711D3" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_GoodwillAndIntangibleAssetImpairment_C3C24F3145F647BAA643B7F57B4711D3" 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_C350083B7F365DCDA4BBB7F57B4700FC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_RestructuringCharges_C350083B7F365DCDA4BBB7F57B4700FC" 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_33C8FA1B46F3DCB76035B7F57B48B617" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_BusinessCombinationIntegrationRelatedCosts_33C8FA1B46F3DCB76035B7F57B48B617" 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_2823610C4F831B9F8353B7F57B48BD69" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_2823610C4F831B9F8353B7F57B48BD69" 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_CE8753053CDF0F410674B7F57B48E9A4" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_CE8753053CDF0F410674B7F57B48E9A4" 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_278706C6BCD449C1D340B7F57B48D0A1" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_278706C6BCD449C1D340B7F57B48D0A1" 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_E9B51D24242F34C4EDA6B7F57B49B0F2" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_205E11A4511395084A38B7F57B46BAB0" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_E9B51D24242F34C4EDA6B7F57B49B0F2" 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_1876ECEC01DF1CF00ECCC7EA17D9AAC0" 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_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_1876ECEC01DF1CF00ECCC7EA17D9AAC0" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" 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_5286B5CF18008C328E7BC7EA17CECCF6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_5286B5CF18008C328E7BC7EA17CECCF6" 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_8478DF85F21AB2FF7E67C7EA17CFBCC6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5286B5CF18008C328E7BC7EA17CECCF6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_8478DF85F21AB2FF7E67C7EA17CFBCC6_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_8478DF85F21AB2FF7E67C7EA17CFBCC6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5286B5CF18008C328E7BC7EA17CECCF6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_8478DF85F21AB2FF7E67C7EA17CFBCC6" 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_772C6CB91AF7A8597F7AC7EA17CF37EA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_8478DF85F21AB2FF7E67C7EA17CFBCC6" xlink:to="loc_us-gaap_CostOfSalesMember_772C6CB91AF7A8597F7AC7EA17CF37EA" 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_9A877C94B09EA5853541C7EA17CF072D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_StatementScenarioAxis_9A877C94B09EA5853541C7EA17CF072D" 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_F565BF56B2BD806A060FC7EA17CF7CED_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_9A877C94B09EA5853541C7EA17CF072D" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_F565BF56B2BD806A060FC7EA17CF7CED_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_F565BF56B2BD806A060FC7EA17CF7CED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_9A877C94B09EA5853541C7EA17CF072D" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_F565BF56B2BD806A060FC7EA17CF7CED" 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_1F5D7A1EDE7CDF8A6A12C7EA17D0B854" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScenarioUnspecifiedDomain_F565BF56B2BD806A060FC7EA17CF7CED" xlink:to="loc_us-gaap_ScenarioForecastMember_1F5D7A1EDE7CDF8A6A12C7EA17D0B854" 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_1BBF373CE1F214997FE4C7EA17D057CF" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_ConsolidationItemsAxis_1BBF373CE1F214997FE4C7EA17D057CF" 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_8EB9AEDB08456D88943EC7EA17D09495_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_1BBF373CE1F214997FE4C7EA17D057CF" xlink:to="loc_us-gaap_ConsolidationItemsDomain_8EB9AEDB08456D88943EC7EA17D09495_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_8EB9AEDB08456D88943EC7EA17D09495" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_1BBF373CE1F214997FE4C7EA17D057CF" xlink:to="loc_us-gaap_ConsolidationItemsDomain_8EB9AEDB08456D88943EC7EA17D09495" 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_8B58CEB976CAC1DE80A2C7EA17D0D19D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_8EB9AEDB08456D88943EC7EA17D09495" xlink:to="loc_us-gaap_OperatingSegmentsMember_8B58CEB976CAC1DE80A2C7EA17D0D19D" 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_C1900F18EE7C9B34C12AC7EA17D153F0" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_C1900F18EE7C9B34C12AC7EA17D153F0" 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_06908C33A4AE1A3794C5C7EA17D173F6_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_C1900F18EE7C9B34C12AC7EA17D153F0" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_06908C33A4AE1A3794C5C7EA17D173F6_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_06908C33A4AE1A3794C5C7EA17D173F6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_C1900F18EE7C9B34C12AC7EA17D153F0" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_06908C33A4AE1A3794C5C7EA17D173F6" 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_2D8ED60B3E8A5A5AE5B4C7EA17D11408" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_06908C33A4AE1A3794C5C7EA17D173F6" xlink:to="loc_us-gaap_CommodityContractMember_2D8ED60B3E8A5A5AE5B4C7EA17D11408" 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_F6208E56CC4BD1859727C7EA17D140A3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_F6208E56CC4BD1859727C7EA17D140A3" 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_D653C327CC335B7C0E63C7EA17D752CA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_F6208E56CC4BD1859727C7EA17D140A3" xlink:to="loc_us-gaap_SegmentDomain_D653C327CC335B7C0E63C7EA17D752CA_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_D653C327CC335B7C0E63C7EA17D752CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_F6208E56CC4BD1859727C7EA17D140A3" xlink:to="loc_us-gaap_SegmentDomain_D653C327CC335B7C0E63C7EA17D752CA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NorthAmericaSegmentMember" xlink:label="loc_hsy_NorthAmericaSegmentMember_A0BE10E5F3083A4BB3CBC7EA17D7AA43" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_D653C327CC335B7C0E63C7EA17D752CA" xlink:to="loc_hsy_NorthAmericaSegmentMember_A0BE10E5F3083A4BB3CBC7EA17D7AA43" 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_358E9C956C2A94B61475C7EA17D7895C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_358E9C956C2A94B61475C7EA17D7895C" 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_FCF6C1A0C776B0BBEC01C7EA17D89332_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_358E9C956C2A94B61475C7EA17D7895C" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_FCF6C1A0C776B0BBEC01C7EA17D89332_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_FCF6C1A0C776B0BBEC01C7EA17D89332" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_358E9C956C2A94B61475C7EA17D7895C" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_FCF6C1A0C776B0BBEC01C7EA17D89332" 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_70C2B9EF0BAD2E963AA8C7EA17D8C076" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_FCF6C1A0C776B0BBEC01C7EA17D89332" xlink:to="loc_us-gaap_GeographicConcentrationRiskMember_70C2B9EF0BAD2E963AA8C7EA17D8C076" 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_0E425E264132EF906FAAC7EA17D8F467" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_8AC3A124623A5899BA73C7EA17CEC8F2" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_0E425E264132EF906FAAC7EA17D8F467" 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_3D097A80128563CC9A63C7EA17D85437_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_0E425E264132EF906FAAC7EA17D8F467" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_3D097A80128563CC9A63C7EA17D85437_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_3D097A80128563CC9A63C7EA17D85437" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_0E425E264132EF906FAAC7EA17D8F467" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_3D097A80128563CC9A63C7EA17D85437" 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_29774C3C63F539E42058C7EA17D93EA8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_3D097A80128563CC9A63C7EA17D85437" xlink:to="loc_us-gaap_SalesRevenueGoodsNetMember_29774C3C63F539E42058C7EA17D93EA8" 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_0BFE854172FFB10C55D8C7EA17D9DD89" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_1876ECEC01DF1CF00ECCC7EA17D9AAC0" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_0BFE854172FFB10C55D8C7EA17D9DD89" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_CumulativeAmountofMarktoMarketLossesonCommodityDerivatives" xlink:label="loc_hsy_CumulativeAmountofMarktoMarketLossesonCommodityDerivatives_4C0EDBF716612EC61A82C7EA17D90EFE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_1876ECEC01DF1CF00ECCC7EA17D9AAC0" xlink:to="loc_hsy_CumulativeAmountofMarktoMarketLossesonCommodityDerivatives_4C0EDBF716612EC61A82C7EA17D90EFE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2C8321B35533A7A13FF2C7EA17DA0092" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_1876ECEC01DF1CF00ECCC7EA17D9AAC0" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2C8321B35533A7A13FF2C7EA17DA0092" 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_3890E4903F81AC37CB22B7F57B3D8844" 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_D0B259C6C213895ACD0CB7F57B39F03E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3890E4903F81AC37CB22B7F57B3D8844" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_D0B259C6C213895ACD0CB7F57B39F03E" 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_F7B0A242BA566082ABA6B7F57B3A5574" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_D0B259C6C213895ACD0CB7F57B39F03E" xlink:to="loc_us-gaap_HedgingDesignationAxis_F7B0A242BA566082ABA6B7F57B3A5574" 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_2956E0DB9A29C9F72FACB7F57B3A57AC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_F7B0A242BA566082ABA6B7F57B3A5574" xlink:to="loc_us-gaap_HedgingDesignationDomain_2956E0DB9A29C9F72FACB7F57B3A57AC_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_2956E0DB9A29C9F72FACB7F57B3A57AC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_F7B0A242BA566082ABA6B7F57B3A5574" xlink:to="loc_us-gaap_HedgingDesignationDomain_2956E0DB9A29C9F72FACB7F57B3A57AC" 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_D2764510E2A5AC9236A0B7F57B3A846C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_2956E0DB9A29C9F72FACB7F57B3A57AC" xlink:to="loc_us-gaap_NondesignatedMember_D2764510E2A5AC9236A0B7F57B3A846C" 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_15821598B6A3E4BCE61AB7F57B3A9AFD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_D0B259C6C213895ACD0CB7F57B39F03E" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_15821598B6A3E4BCE61AB7F57B3A9AFD" 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_F835FE25A1A521CC14C3B7F57B3B5C9B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_15821598B6A3E4BCE61AB7F57B3A9AFD" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_F835FE25A1A521CC14C3B7F57B3B5C9B_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_F835FE25A1A521CC14C3B7F57B3B5C9B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_15821598B6A3E4BCE61AB7F57B3A9AFD" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_F835FE25A1A521CC14C3B7F57B3B5C9B" 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_7461BCBC3552F1B2D8F4B7F57B3B56BB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_F835FE25A1A521CC14C3B7F57B3B5C9B" xlink:to="loc_us-gaap_CommodityContractMember_7461BCBC3552F1B2D8F4B7F57B3B56BB" 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_D19E54FE26B0506320D7B7F57B3BBBB3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_D0B259C6C213895ACD0CB7F57B39F03E" xlink:to="loc_us-gaap_ConsolidationItemsAxis_D19E54FE26B0506320D7B7F57B3BBBB3" 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_661C0A55282BA2E47EE0B7F57B3B6BDD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_D19E54FE26B0506320D7B7F57B3BBBB3" xlink:to="loc_us-gaap_ConsolidationItemsDomain_661C0A55282BA2E47EE0B7F57B3B6BDD_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_661C0A55282BA2E47EE0B7F57B3B6BDD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_D19E54FE26B0506320D7B7F57B3BBBB3" xlink:to="loc_us-gaap_ConsolidationItemsDomain_661C0A55282BA2E47EE0B7F57B3B6BDD" 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_230E548CDC32563C42AAB7F57B3CD5CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_661C0A55282BA2E47EE0B7F57B3B6BDD" xlink:to="loc_us-gaap_OperatingSegmentsMember_230E548CDC32563C42AAB7F57B3CD5CA" 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_A38C0E82D4E49540E124B7F57B3C93A7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_D0B259C6C213895ACD0CB7F57B39F03E" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_A38C0E82D4E49540E124B7F57B3C93A7" 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_BBF3B9C3C1F130AE9FFAB7F57B3C89BE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_A38C0E82D4E49540E124B7F57B3C93A7" xlink:to="loc_us-gaap_SegmentDomain_BBF3B9C3C1F130AE9FFAB7F57B3C89BE_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_BBF3B9C3C1F130AE9FFAB7F57B3C89BE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_A38C0E82D4E49540E124B7F57B3C93A7" xlink:to="loc_us-gaap_SegmentDomain_BBF3B9C3C1F130AE9FFAB7F57B3C89BE" 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_C994D96A29F46A0B20DAB7F57B3C8E93" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_BBF3B9C3C1F130AE9FFAB7F57B3C89BE" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_C994D96A29F46A0B20DAB7F57B3C8E93" 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_6B3F1B1E58C2A8E0CA55B7F57B3D6B22" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3890E4903F81AC37CB22B7F57B3D8844" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_6B3F1B1E58C2A8E0CA55B7F57B3D6B22" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2C0F7688343CBC7ECEC8B7F57B3D9FB7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3890E4903F81AC37CB22B7F57B3D8844" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_2C0F7688343CBC7ECEC8B7F57B3D9FB7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses" xlink:label="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_9D007DD9741CABC44119B7F57B3DC735" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3890E4903F81AC37CB22B7F57B3D8844" xlink:to="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_9D007DD9741CABC44119B7F57B3DC735" 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_8B614F87C74218627A9CB7F57C4A28D3" 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_1BA43CDF6F4CE6E621AFB7F57C46E29B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8B614F87C74218627A9CB7F57C4A28D3" xlink:to="loc_us-gaap_DebtInstrumentTable_1BA43CDF6F4CE6E621AFB7F57C46E29B" 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_6718298850B5ED91EBC4B7F57C4705D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_1BA43CDF6F4CE6E621AFB7F57C46E29B" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_6718298850B5ED91EBC4B7F57C4705D0" 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_2A3CF67B046EE67B12ABB7F57C47DF1E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_6718298850B5ED91EBC4B7F57C4705D0" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_2A3CF67B046EE67B12ABB7F57C47DF1E_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_2A3CF67B046EE67B12ABB7F57C47DF1E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_6718298850B5ED91EBC4B7F57C4705D0" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_2A3CF67B046EE67B12ABB7F57C47DF1E" 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_E86DE6CE6FC58CF86502B7F57C483DB7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_2A3CF67B046EE67B12ABB7F57C47DF1E" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_E86DE6CE6FC58CF86502B7F57C483DB7" 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_CE99A518A0885271559AB7F57C488F3B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_1BA43CDF6F4CE6E621AFB7F57C46E29B" xlink:to="loc_us-gaap_DebtInstrumentAxis_CE99A518A0885271559AB7F57C488F3B" 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_2CDD8787DDE90AB9A7ABB7F57C4855F8_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_CE99A518A0885271559AB7F57C488F3B" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8_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_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_CE99A518A0885271559AB7F57C488F3B" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes1.60Due2018Member" xlink:label="loc_hsy_Notes1.60Due2018Member_CA0254F57A8E2B533E9FB7F57C485D83" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes1.60Due2018Member_CA0254F57A8E2B533E9FB7F57C485D83" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.90Due2020Domain" xlink:label="loc_hsy_Notes2.90Due2020Domain_41CD6B75F71456A5E5E9B7F57C483581" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes2.90Due2020Domain_41CD6B75F71456A5E5E9B7F57C483581" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes4.125Due2020Member" xlink:label="loc_hsy_Notes4.125Due2020Member_72822000E9D5F072F9D3B7F57C49BC58" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes4.125Due2020Member_72822000E9D5F072F9D3B7F57C49BC58" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.10Due2021Domain" xlink:label="loc_hsy_Notes3.10Due2021Domain_7F93DE971986090A1C8BB7F57C496434" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes3.10Due2021Domain_7F93DE971986090A1C8BB7F57C496434" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Debentures8.8Due2021Member" xlink:label="loc_hsy_Debentures8.8Due2021Member_783E4B2F87EBB79904F7B7F57C492558" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Debentures8.8Due2021Member_783E4B2F87EBB79904F7B7F57C492558" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.375Due2023Domain" xlink:label="loc_hsy_Notes3.375Due2023Domain_3FD88BFEA4B6599F118FB7F57C49A850" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes3.375Due2023Domain_3FD88BFEA4B6599F118FB7F57C49A850" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.625Due2023Member" xlink:label="loc_hsy_Notes2.625Due2023Member_5A26CE9CB6D9C34A6037B7F57C490EEE" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes2.625Due2023Member_5A26CE9CB6D9C34A6037B7F57C490EEE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.20Due2025Member" xlink:label="loc_hsy_Notes3.20Due2025Member_56ECE618487CF514CFBAB7F57C49806D" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes3.20Due2025Member_56ECE618487CF514CFBAB7F57C49806D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.30Due2026Member" xlink:label="loc_hsy_Notes2.30Due2026Member_7B027E5314D1904639AAB7F57C4A2E46" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes2.30Due2026Member_7B027E5314D1904639AAB7F57C4A2E46" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Debentures7.2Due2027Member" xlink:label="loc_hsy_Debentures7.2Due2027Member_FE76074B4518920B5949B7F57C4A0979" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Debentures7.2Due2027Member_FE76074B4518920B5949B7F57C4A0979" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.375Due2046Member" xlink:label="loc_hsy_Notes3.375Due2046Member_86B2A89DB3F356F254C0B7F57C4A14D3" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2CDD8787DDE90AB9A7ABB7F57C4855F8" xlink:to="loc_hsy_Notes3.375Due2046Member_86B2A89DB3F356F254C0B7F57C4A14D3" 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_1E7C7410BF8D1F50958CB7F57C4A94EC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_8B614F87C74218627A9CB7F57C4A28D3" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_1E7C7410BF8D1F50958CB7F57C4A94EC" 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_C6365CA3BB625CA5E6D4B7F57C403CB3" 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_E76E9040C6A983753774B7F57C3DF5EC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C6365CA3BB625CA5E6D4B7F57C403CB3" xlink:to="loc_us-gaap_DebtInstrumentTable_E76E9040C6A983753774B7F57C3DF5EC" 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_1EFD578686819726F047B7F57C3E2C96" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_E76E9040C6A983753774B7F57C3DF5EC" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_1EFD578686819726F047B7F57C3E2C96" 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_8D39F1E2AFF7CB7B32CFB7F57C3E78AB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_1EFD578686819726F047B7F57C3E2C96" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_8D39F1E2AFF7CB7B32CFB7F57C3E78AB_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_8D39F1E2AFF7CB7B32CFB7F57C3E78AB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_1EFD578686819726F047B7F57C3E2C96" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_8D39F1E2AFF7CB7B32CFB7F57C3E78AB" 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_64AE7DB6A2470AE2B092B7F57C3E7142" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_8D39F1E2AFF7CB7B32CFB7F57C3E78AB" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_64AE7DB6A2470AE2B092B7F57C3E7142" 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_E56FE5439AB4D6E3AD62B7F57C3FD4E6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_E76E9040C6A983753774B7F57C3DF5EC" xlink:to="loc_us-gaap_DebtInstrumentAxis_E56FE5439AB4D6E3AD62B7F57C3FD4E6" 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_F7A0C8054C97B24073F9B7F57C3F41BA_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_E56FE5439AB4D6E3AD62B7F57C3FD4E6" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_F7A0C8054C97B24073F9B7F57C3F41BA_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_F7A0C8054C97B24073F9B7F57C3F41BA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_E56FE5439AB4D6E3AD62B7F57C3FD4E6" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_F7A0C8054C97B24073F9B7F57C3F41BA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.90Due2020Domain" xlink:label="loc_hsy_Notes2.90Due2020Domain_EFEBB3BD27748B882728B7F57C3FA64F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_F7A0C8054C97B24073F9B7F57C3F41BA" xlink:to="loc_hsy_Notes2.90Due2020Domain_EFEBB3BD27748B882728B7F57C3FA64F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.10Due2021Domain" xlink:label="loc_hsy_Notes3.10Due2021Domain_1C7AD5D7114E3B3CCF84B7F57C3F7854" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_F7A0C8054C97B24073F9B7F57C3F41BA" xlink:to="loc_hsy_Notes3.10Due2021Domain_1C7AD5D7114E3B3CCF84B7F57C3F7854" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.375Due2023Domain" xlink:label="loc_hsy_Notes3.375Due2023Domain_E325F1B5C4DC4C05BD68B7F57C404B26" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_F7A0C8054C97B24073F9B7F57C3F41BA" xlink:to="loc_hsy_Notes3.375Due2023Domain_E325F1B5C4DC4C05BD68B7F57C404B26" 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_CD792DAD9265608C6ECAB7F57C40DA1B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C6365CA3BB625CA5E6D4B7F57C403CB3" xlink:to="loc_us-gaap_LongTermDebt_CD792DAD9265608C6ECAB7F57C40DA1B" 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_E62B20E2843AC64E851AB7F57C40A3BF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C6365CA3BB625CA5E6D4B7F57C403CB3" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_E62B20E2843AC64E851AB7F57C40A3BF" 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_DEABB62A5EA140D7A035B7F57C40A116" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C6365CA3BB625CA5E6D4B7F57C403CB3" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfOtherLongTermDebt_DEABB62A5EA140D7A035B7F57C40A116" 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_C461A97014B19AB3E853B7F57C5867C8" 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_D049DEA699555C79FCB3B7F57C545E29" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C461A97014B19AB3E853B7F57C5867C8" xlink:to="loc_us-gaap_DebtInstrumentTable_D049DEA699555C79FCB3B7F57C545E29" 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_36B28895B37139725CD0B7F57C551150" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_D049DEA699555C79FCB3B7F57C545E29" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_36B28895B37139725CD0B7F57C551150" 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_FACEA0894F321E671FD7B7F57C556860_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_36B28895B37139725CD0B7F57C551150" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_FACEA0894F321E671FD7B7F57C556860_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_FACEA0894F321E671FD7B7F57C556860" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_36B28895B37139725CD0B7F57C551150" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_FACEA0894F321E671FD7B7F57C556860" 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_EB2909F99F36ADDAE955B7F57C55F11C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_FACEA0894F321E671FD7B7F57C556860" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_EB2909F99F36ADDAE955B7F57C55F11C" 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_AEECB31CA60A93AC7EBDB7F57C5606FC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_FACEA0894F321E671FD7B7F57C556860" xlink:to="loc_us-gaap_CapitalLeaseObligationsMember_AEECB31CA60A93AC7EBDB7F57C5606FC" 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_C2AAD027D9BDBC27D930B7F57C56B073" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_D049DEA699555C79FCB3B7F57C545E29" xlink:to="loc_us-gaap_DebtInstrumentAxis_C2AAD027D9BDBC27D930B7F57C56B073" 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_56BFAD40849EBD925A94B7F57C56DC80_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_C2AAD027D9BDBC27D930B7F57C56B073" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80_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_56BFAD40849EBD925A94B7F57C56DC80" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_C2AAD027D9BDBC27D930B7F57C56B073" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes1.60Due2018Member" xlink:label="loc_hsy_Notes1.60Due2018Member_145B3A47B30963A335E1B7F57C562ECB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes1.60Due2018Member_145B3A47B30963A335E1B7F57C562ECB" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.90Due2020Domain" xlink:label="loc_hsy_Notes2.90Due2020Domain_28AFAD7C6E6C25FFE683B7F57C56A5D4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes2.90Due2020Domain_28AFAD7C6E6C25FFE683B7F57C56A5D4" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes4.125Due2020Member" xlink:label="loc_hsy_Notes4.125Due2020Member_7CB8AD617D4C44979428B7F57C576683" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes4.125Due2020Member_7CB8AD617D4C44979428B7F57C576683" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.10Due2021Domain" xlink:label="loc_hsy_Notes3.10Due2021Domain_8D9286041508497D9AE0B7F57C57556F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes3.10Due2021Domain_8D9286041508497D9AE0B7F57C57556F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Debentures8.8Due2021Member" xlink:label="loc_hsy_Debentures8.8Due2021Member_C8A80C547FC1A1D6305DB7F57C577CBF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Debentures8.8Due2021Member_C8A80C547FC1A1D6305DB7F57C577CBF" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.375Due2023Domain" xlink:label="loc_hsy_Notes3.375Due2023Domain_4CBD9686E32B1287E2C6B7F57C5767AA" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes3.375Due2023Domain_4CBD9686E32B1287E2C6B7F57C5767AA" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.625Due2023Member" xlink:label="loc_hsy_Notes2.625Due2023Member_CBA617B636AB79806951B7F57C578BFE" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes2.625Due2023Member_CBA617B636AB79806951B7F57C578BFE" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.20Due2025Member" xlink:label="loc_hsy_Notes3.20Due2025Member_89B3DD127F8561925B7FB7F57C5703A6" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes3.20Due2025Member_89B3DD127F8561925B7FB7F57C5703A6" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes2.30Due2026Member" xlink:label="loc_hsy_Notes2.30Due2026Member_28C25A6858F309D6EA2EB7F57C580F4A" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes2.30Due2026Member_28C25A6858F309D6EA2EB7F57C580F4A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Debentures7.2Due2027Member" xlink:label="loc_hsy_Debentures7.2Due2027Member_7606E56545CFE7B6DA75B7F57C58A745" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Debentures7.2Due2027Member_7606E56545CFE7B6DA75B7F57C58A745" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_Notes3.375Due2046Member" xlink:label="loc_hsy_Notes3.375Due2046Member_E9C1FB0D1A1B53FEE1F5B7F57C58163B" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_56BFAD40849EBD925A94B7F57C56DC80" xlink:to="loc_hsy_Notes3.375Due2046Member_E9C1FB0D1A1B53FEE1F5B7F57C58163B" 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_C44CE21298BFAA17FAEFB7F57C58BB14" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C461A97014B19AB3E853B7F57C5867C8" xlink:to="loc_us-gaap_LongTermDebt_C44CE21298BFAA17FAEFB7F57C58BB14" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_FE3E2E3604BA24F40079B7F57C5963E7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C461A97014B19AB3E853B7F57C5867C8" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_FE3E2E3604BA24F40079B7F57C5963E7" 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_F6D04185C7E1A1DB0E14B7F57C59BFD0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C461A97014B19AB3E853B7F57C5867C8" xlink:to="loc_us-gaap_LongTermDebtCurrent_F6D04185C7E1A1DB0E14B7F57C59BFD0" 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_E4CE7B9824D5B1BC807DB7F57C598313" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_C461A97014B19AB3E853B7F57C5867C8" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_E4CE7B9824D5B1BC807DB7F57C598313" xlink:type="arc" />
  </link:definitionLink>
  <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_8F60F522E8FCD9AF9A45B7F57C6558B3" 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_334A11C3AD781E1031D5B7F57C60E29E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_334A11C3AD781E1031D5B7F57C60E29E" 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_5A01BB5574BEDB4F9BA6B7F57C60DE32" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_334A11C3AD781E1031D5B7F57C60E29E" xlink:to="loc_us-gaap_DebtInstrumentAxis_5A01BB5574BEDB4F9BA6B7F57C60DE32" 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_186D13D9F39B5C897292B7F57C61BD6A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_5A01BB5574BEDB4F9BA6B7F57C60DE32" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_186D13D9F39B5C897292B7F57C61BD6A_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_186D13D9F39B5C897292B7F57C61BD6A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_5A01BB5574BEDB4F9BA6B7F57C60DE32" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_186D13D9F39B5C897292B7F57C61BD6A" 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_948980CB86508EEDD980B7F57C6148EF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_186D13D9F39B5C897292B7F57C61BD6A" xlink:to="loc_us-gaap_LineOfCreditMember_948980CB86508EEDD980B7F57C6148EF" 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_03264AB50CF7D9596A1FB7F57C62F95E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_334A11C3AD781E1031D5B7F57C60E29E" xlink:to="loc_us-gaap_CreditFacilityAxis_03264AB50CF7D9596A1FB7F57C62F95E" 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_F219CB409E181D5CDEC5B7F57C620E42_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_03264AB50CF7D9596A1FB7F57C62F95E" xlink:to="loc_us-gaap_CreditFacilityDomain_F219CB409E181D5CDEC5B7F57C620E42_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_F219CB409E181D5CDEC5B7F57C620E42" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_03264AB50CF7D9596A1FB7F57C62F95E" xlink:to="loc_us-gaap_CreditFacilityDomain_F219CB409E181D5CDEC5B7F57C620E42" 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_09345E8BBB45D646ECE6B7F57C62BCC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_F219CB409E181D5CDEC5B7F57C620E42" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_09345E8BBB45D646ECE6B7F57C62BCC9" 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_66E1957D1EA6671F9D1BB7F57C6379D7" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_334A11C3AD781E1031D5B7F57C60E29E" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_66E1957D1EA6671F9D1BB7F57C6379D7" 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_1DE89D41F719EE3B4974B7F57C63C8A4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_66E1957D1EA6671F9D1BB7F57C6379D7" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_1DE89D41F719EE3B4974B7F57C63C8A4_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_1DE89D41F719EE3B4974B7F57C63C8A4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_66E1957D1EA6671F9D1BB7F57C6379D7" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_1DE89D41F719EE3B4974B7F57C63C8A4" 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_4B9D11AE037022EE936BB7F57C6467F9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_1DE89D41F719EE3B4974B7F57C63C8A4" xlink:to="loc_us-gaap_LineOfCreditMember_4B9D11AE037022EE936BB7F57C6467F9" 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_A48C683C78417A6323C9B7F57C64555B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_1DE89D41F719EE3B4974B7F57C63C8A4" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_A48C683C78417A6323C9B7F57C64555B" 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_A5BC4F2C54546DC26FA3B7F57C655001" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_334A11C3AD781E1031D5B7F57C60E29E" xlink:to="loc_us-gaap_ShortTermDebtTypeAxis_A5BC4F2C54546DC26FA3B7F57C655001" 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_1E8A35BDFBCBD74A58DCB7F57C65FB99_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_A5BC4F2C54546DC26FA3B7F57C655001" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_1E8A35BDFBCBD74A58DCB7F57C65FB99_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_1E8A35BDFBCBD74A58DCB7F57C65FB99" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_A5BC4F2C54546DC26FA3B7F57C655001" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_1E8A35BDFBCBD74A58DCB7F57C65FB99" 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_6DB8DDC1A8A1A0CBECBAB7F57C6534FB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermDebtTypeDomain_1E8A35BDFBCBD74A58DCB7F57C65FB99" xlink:to="loc_us-gaap_CommercialPaperMember_6DB8DDC1A8A1A0CBECBAB7F57C6534FB" 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_84403C90642655E9B9FCB7F57C66FA0F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_84403C90642655E9B9FCB7F57C66FA0F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit" xlink:label="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_AEEB1F5BAB20FAD84B02B7F57C662352" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_AEEB1F5BAB20FAD84B02B7F57C662352" 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_D02F1ED80F3079704BD6B7F57C66AC41" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_us-gaap_LinesOfCreditCurrent_D02F1ED80F3079704BD6B7F57C66AC41" 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_66CFD8968C1ECD0B8C4EB7F57C669A20" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_us-gaap_ShortTermBorrowings_66CFD8968C1ECD0B8C4EB7F57C669A20" 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_26986A64D2316E9FFB66B7F57C67C00D" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_8F60F522E8FCD9AF9A45B7F57C6558B3" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_26986A64D2316E9FFB66B7F57C67C00D" 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_80C48586E184B550313AC7EA181F2710" 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_F2EBD73EA8538A31153AC7EA1819A279" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_80C48586E184B550313AC7EA181F2710" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F2EBD73EA8538A31153AC7EA1819A279" 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_695DAFC619D6FAD745A2C7EA181A480F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F2EBD73EA8538A31153AC7EA1819A279" xlink:to="loc_us-gaap_AwardTypeAxis_695DAFC619D6FAD745A2C7EA181A480F" 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_AB9510782D72F5BD5447C7EA181F57C7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_695DAFC619D6FAD745A2C7EA181A480F" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_AB9510782D72F5BD5447C7EA181F57C7_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_AB9510782D72F5BD5447C7EA181F57C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_695DAFC619D6FAD745A2C7EA181A480F" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_AB9510782D72F5BD5447C7EA181F57C7" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_EF7DD4F68FFF27E3438DC7EA181FCD21" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_AB9510782D72F5BD5447C7EA181F57C7" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_EF7DD4F68FFF27E3438DC7EA181FCD21" 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_176615AD2B3C397697C2C7EA1820DD36" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_80C48586E184B550313AC7EA181F2710" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" 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_C5EC95DB31E00641800DC7EA1820B4CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_C5EC95DB31E00641800DC7EA1820B4CA" 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_6954A2EB78DADAA41E79C7EA1820201F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_6954A2EB78DADAA41E79C7EA1820201F" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_27FF5CC5435199996966C7EA1821569A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_27FF5CC5435199996966C7EA1821569A" 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_28EFA3969EA58847D821C7EA18217BAA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_28EFA3969EA58847D821C7EA18217BAA" 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_ED039278C0F9213C57D9C7EA1821FAA6" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_176615AD2B3C397697C2C7EA1820DD36" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_ED039278C0F9213C57D9C7EA1821FAA6" 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_F79A247F0432126328C2C7EA1821ABF4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_80C48586E184B550313AC7EA181F2710" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" 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_2DFFCA72E0A6564F1623C7EA1821FA04" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_2DFFCA72E0A6564F1623C7EA1821FA04" 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_CB6FAF195E43A601E4F5C7EA18225EE2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_CB6FAF195E43A601E4F5C7EA18225EE2" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_71C2E91DBB9A344EE2C1C7EA18228073" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_71C2E91DBB9A344EE2C1C7EA18228073" 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_7C8491D672A320298804C7EA18224E42" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_7C8491D672A320298804C7EA18224E42" 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_A815E3050D4BE96C566CC7EA18223B38" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_F79A247F0432126328C2C7EA1821ABF4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_A815E3050D4BE96C566CC7EA18223B38" 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_9FF0829490A3DF8B518DB7F57B6521D8" 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_A553AB999CCA8273D9BBB7F57B64E913" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A553AB999CCA8273D9BBB7F57B64E913" 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_006ED5203F356C73F3F1B7F57B644BD4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_A553AB999CCA8273D9BBB7F57B64E913" xlink:to="loc_us-gaap_AwardTypeAxis_006ED5203F356C73F3F1B7F57B644BD4" 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_4848F124CF4A36CA5992B7F57B64E93C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_006ED5203F356C73F3F1B7F57B644BD4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4848F124CF4A36CA5992B7F57B64E93C_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_4848F124CF4A36CA5992B7F57B64E93C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_006ED5203F356C73F3F1B7F57B644BD4" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4848F124CF4A36CA5992B7F57B64E93C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_42BE309C03E8F6017213B7F57B650C50" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4848F124CF4A36CA5992B7F57B64E93C" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_42BE309C03E8F6017213B7F57B650C50" 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_60C24AC529CF58AB994DB7F57B659AED" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_60C24AC529CF58AB994DB7F57B659AED" 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_6B80F55E4E805E60CAFDB7F57B657AA8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_6B80F55E4E805E60CAFDB7F57B657AA8" 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_78F81C680B2828A758F1B7F57B667BD6" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_SharePrice_78F81C680B2828A758F1B7F57B667BD6" 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_80BB951422CF79EA5090B7F57B668CB0" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_80BB951422CF79EA5090B7F57B668CB0" 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_77CB00161990CFCB07E0B7F57B66EBB4" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_9FF0829490A3DF8B518DB7F57B6521D8" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_77CB00161990CFCB07E0B7F57B66EBB4" 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/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_E3C68450D57C825F395DB7F57B8A58AD" 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_665A185D20E768DFC5BEB7F57B8850B3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_665A185D20E768DFC5BEB7F57B8850B3" 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_94FF869B48CFEB6A1908B7F57B88DF23" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_665A185D20E768DFC5BEB7F57B8850B3" xlink:to="loc_us-gaap_AwardTypeAxis_94FF869B48CFEB6A1908B7F57B88DF23" 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_FE7C5EE5A909C336F2C0B7F57B89BD64_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_94FF869B48CFEB6A1908B7F57B88DF23" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_FE7C5EE5A909C336F2C0B7F57B89BD64_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_FE7C5EE5A909C336F2C0B7F57B89BD64" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_94FF869B48CFEB6A1908B7F57B88DF23" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_FE7C5EE5A909C336F2C0B7F57B89BD64" 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_165DF52DCB498D4F154EB7F57B89BB0A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_FE7C5EE5A909C336F2C0B7F57B89BD64" xlink:to="loc_us-gaap_EmployeeStockOptionMember_165DF52DCB498D4F154EB7F57B89BB0A" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_PerformanceStockUnitsandRestrictedStockUnitsMember" xlink:label="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_D32BB1F0B47EC3D99362B7F57B8A38BA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_FE7C5EE5A909C336F2C0B7F57B89BD64" xlink:to="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_D32BB1F0B47EC3D99362B7F57B8A38BA" 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_73743DD72FB8FAA0EBB7B7F57B8A5AA6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_73743DD72FB8FAA0EBB7B7F57B8A5AA6" 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_92E144B24F60824E0417B7F57B8A82EE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_92E144B24F60824E0417B7F57B8A82EE" 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_DC6706F1220E95C32801B7F57B8A4091" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_DC6706F1220E95C32801B7F57B8A4091" 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_D3ADB7C54B3CC090D7D8B7F57B8A443D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_D3ADB7C54B3CC090D7D8B7F57B8A443D" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_08DC12B2F989CEE5E9EEB7F57B8BC022" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_08DC12B2F989CEE5E9EEB7F57B8BC022" 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_2AFB579831918738EBD2B7F57B8BF71C" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_2AFB579831918738EBD2B7F57B8BF71C" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_DeferredCompensationArrangementwithIndividualConversionBasis" xlink:label="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_1693C732E93BCF03BDF9B7F57B8BBEE4" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_E3C68450D57C825F395DB7F57B8A58AD" xlink:to="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_1693C732E93BCF03BDF9B7F57B8BBEE4" 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/SummaryOfSignificantAccountingPolicies" 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/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_2C33AAA7CC2E5A443E84B7F57C9297C8" 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_5F702D015756749EA2DDB7F57C91F3B7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_2C33AAA7CC2E5A443E84B7F57C9297C8" xlink:to="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_5F702D015756749EA2DDB7F57C91F3B7" 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_D0C6B53DCE2CFACC0864B7F57C91D186" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable_5F702D015756749EA2DDB7F57C91F3B7" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_D0C6B53DCE2CFACC0864B7F57C91D186" 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_6D91F85D1BA1900A1C72B7F57C91C91B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_D0C6B53DCE2CFACC0864B7F57C91D186" xlink:to="loc_us-gaap_TypeOfAdoptionMember_6D91F85D1BA1900A1C72B7F57C91C91B_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_6D91F85D1BA1900A1C72B7F57C91C91B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_D0C6B53DCE2CFACC0864B7F57C91D186" xlink:to="loc_us-gaap_TypeOfAdoptionMember_6D91F85D1BA1900A1C72B7F57C91C91B" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_AccountingStandardsUpdate201707Member" xlink:label="loc_hsy_AccountingStandardsUpdate201707Member_B097EB72D510B2F3D3A6B7F57C92B9A4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_6D91F85D1BA1900A1C72B7F57C91C91B" xlink:to="loc_hsy_AccountingStandardsUpdate201707Member_B097EB72D510B2F3D3A6B7F57C92B9A4" 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_3537DF80358512F87D85B7F57C9236E8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_2C33AAA7CC2E5A443E84B7F57C9297C8" xlink:to="loc_us-gaap_CostOfGoodsSold_3537DF80358512F87D85B7F57C9236E8" 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_514D0DBDB502A40DB286B7F57C93EEA0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_2C33AAA7CC2E5A443E84B7F57C9297C8" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_514D0DBDB502A40DB286B7F57C93EEA0" 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_F6B312791A29CE5E7569B7F57C938E79" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_2C33AAA7CC2E5A443E84B7F57C9297C8" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_F6B312791A29CE5E7569B7F57C938E79" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TaxCutsandJobsActof2017ReclassificationfromAOCItoRetainedEarnings" xlink:label="loc_hsy_TaxCutsandJobsActof2017ReclassificationfromAOCItoRetainedEarnings_3FA6CBBA420D42152829B7F57C93F243" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems_2C33AAA7CC2E5A443E84B7F57C9297C8" xlink:to="loc_hsy_TaxCutsandJobsActof2017ReclassificationfromAOCItoRetainedEarnings_3FA6CBBA420D42152829B7F57C93F243" xlink:type="arc" />
  </link:definitionLink>
  <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:definitionLink xlink:role="http://www.hersheys.com/role/TreasuryStockActivityNarrativeDetails" 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_3D5D945B19DFDAC38F3DB7F57AE95FBD" 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_E278D7FF49A8DE3D847DB7F57AE7DEFA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_3D5D945B19DFDAC38F3DB7F57AE95FBD" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_E278D7FF49A8DE3D847DB7F57AE7DEFA" 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_31C2D0D5903FC720363DB81FE8B4F17E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_E278D7FF49A8DE3D847DB7F57AE7DEFA" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_31C2D0D5903FC720363DB81FE8B4F17E" 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_1705DDE3326DDDC709B6B81FE8B6B480_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_31C2D0D5903FC720363DB81FE8B4F17E" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_1705DDE3326DDDC709B6B81FE8B6B480_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_1705DDE3326DDDC709B6B81FE8B6B480" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_31C2D0D5903FC720363DB81FE8B4F17E" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_1705DDE3326DDDC709B6B81FE8B6B480" 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_E5AB59B54C00FDB2C978B8200A8759DC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_1705DDE3326DDDC709B6B81FE8B6B480" xlink:to="loc_us-gaap_SubsequentEventMember_E5AB59B54C00FDB2C978B8200A8759DC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareRepurchaseProgramAxis" xlink:label="loc_us-gaap_ShareRepurchaseProgramAxis_C6C94FA35BFB1734B2EBB7F57AE88945" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_E278D7FF49A8DE3D847DB7F57AE7DEFA" xlink:to="loc_us-gaap_ShareRepurchaseProgramAxis_C6C94FA35BFB1734B2EBB7F57AE88945" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_C6C94FA35BFB1734B2EBB7F57AE88945" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_C6C94FA35BFB1734B2EBB7F57AE88945" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_A2016ShareRepurchaseProgramMember" xlink:label="loc_hsy_A2016ShareRepurchaseProgramMember_E1EDC3636312BCE45B87B7F57AE8DF23" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5" xlink:to="loc_hsy_A2016ShareRepurchaseProgramMember_E1EDC3636312BCE45B87B7F57AE8DF23" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_A2017ShareRepurchaseProgramMember" xlink:label="loc_hsy_A2017ShareRepurchaseProgramMember_E1AD3BAEE247AC1CED77B7F57AE8C5B1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5" xlink:to="loc_hsy_A2017ShareRepurchaseProgramMember_E1AD3BAEE247AC1CED77B7F57AE8C5B1" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_A2018ShareRepurchaseProgramMemberDomain" xlink:label="loc_hsy_A2018ShareRepurchaseProgramMemberDomain_08A2C58807B8159B9B0FB7F57AE90325" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareRepurchaseProgramDomain_8F0C1608A1C1970CD069B7F57AE82BE5" xlink:to="loc_hsy_A2018ShareRepurchaseProgramMemberDomain_08A2C58807B8159B9B0FB7F57AE90325" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockRepurchaseProgramAuthorizedAmount1" xlink:label="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_D139F80FFAF1EC178BD7B7F57AE96197" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_3D5D945B19DFDAC38F3DB7F57AE95FBD" xlink:to="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_D139F80FFAF1EC178BD7B7F57AE96197" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1" xlink:label="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_CFADBDC5F5BBB90211E6B7F57AE9B661" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_3D5D945B19DFDAC38F3DB7F57AE95FBD" xlink:to="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_CFADBDC5F5BBB90211E6B7F57AE9B661" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TreasuryStockActivityScheduleOfTreasuryStockActivityDetails" 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_93CA071F833D18D429A4B7F57B26A612" 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_9503FA4039729586D55FB7F57B2428AB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_9503FA4039729586D55FB7F57B2428AB" 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_11B5D38D42FDACD2E977B7F57B24570C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_9503FA4039729586D55FB7F57B2428AB" xlink:to="loc_us-gaap_StatementClassOfStockAxis_11B5D38D42FDACD2E977B7F57B24570C" 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_08FB789064089A525027B7F57B25EEA5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_11B5D38D42FDACD2E977B7F57B24570C" xlink:to="loc_us-gaap_ClassOfStockDomain_08FB789064089A525027B7F57B25EEA5_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_08FB789064089A525027B7F57B25EEA5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_11B5D38D42FDACD2E977B7F57B24570C" xlink:to="loc_us-gaap_ClassOfStockDomain_08FB789064089A525027B7F57B25EEA5" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_HersheyCommonStockMember" xlink:label="loc_hsy_HersheyCommonStockMember_E0482B6A63B1BA9605EEB7F57B25F95C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_08FB789064089A525027B7F57B25EEA5" xlink:to="loc_hsy_HersheyCommonStockMember_E0482B6A63B1BA9605EEB7F57B25F95C" 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_96B64F4EB12A94755E0AB7F57B25E172" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_9503FA4039729586D55FB7F57B2428AB" xlink:to="loc_us-gaap_AwardTypeAxis_96B64F4EB12A94755E0AB7F57B25E172" 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_317E77DF9D6488407FAFB7F57B26C78A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_96B64F4EB12A94755E0AB7F57B25E172" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_317E77DF9D6488407FAFB7F57B26C78A_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_317E77DF9D6488407FAFB7F57B26C78A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_96B64F4EB12A94755E0AB7F57B25E172" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_317E77DF9D6488407FAFB7F57B26C78A" 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_B34645E3A623619B98E9B7F57B26615B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_317E77DF9D6488407FAFB7F57B26C78A" xlink:to="loc_us-gaap_EmployeeStockOptionMember_B34645E3A623619B98E9B7F57B26615B" 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_A7B55111C32775ADCE17B7F57B2673B1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_A7B55111C32775ADCE17B7F57B2673B1" 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_0FC4C29A6880F9095DD0B7F57B278065" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_0FC4C29A6880F9095DD0B7F57B278065" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TreasuryStockChangeinShares" xlink:label="loc_hsy_TreasuryStockChangeinShares_F99805BADD01023494EFB7F57B27DF0F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_hsy_TreasuryStockChangeinShares_F99805BADD01023494EFB7F57B27DF0F" 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_AF6068F454186124880BB7F57B27E012" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_AF6068F454186124880BB7F57B27E012" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_A11BBBC842FE80EA2488B7F57B274E50" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_A11BBBC842FE80EA2488B7F57B274E50" xlink:type="arc" />
    <link:loc xlink:href="hsy-20180701.xsd#hsy_TreasuryStockChangeinValue" xlink:label="loc_hsy_TreasuryStockChangeinValue_D263B213A95FB3038EBDB7F57B27260A" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_93CA071F833D18D429A4B7F57B26A612" xlink:to="loc_hsy_TreasuryStockChangeinValue_D263B213A95FB3038EBDB7F57B27260A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TreasuryStockActivityTreasuryStockActivity" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TreasuryStockActivityTreasuryStockActivityTables" xlink:type="extended" />
</link:linkbase>
