<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2022 Workiva-->
<!--r:48f14c7b-e246-4384-bc39-5085be0ed0bb,g:a54e090b-fbf6-476a-9a22-de9b3cc3e103-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.hersheys.com/role/DOCUMENTANDENTITYINFORMATION" xlink:type="simple" xlink:href="hsy-20220403.xsd#DOCUMENTANDENTITYINFORMATION"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DOCUMENTANDENTITYINFORMATION" xlink:type="extended" id="id3591b98b70147f993f9c4d5f39f9aa6_DOCUMENTANDENTITYINFORMATION">
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentType_738e5418-c838-4502-9814-2a38d7ea042f" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentType"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentType_738e5418-c838-4502-9814-2a38d7ea042f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentQuarterlyReport_d48715fe-a94b-4f17-ab4c-43f416a69009" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentQuarterlyReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentQuarterlyReport_d48715fe-a94b-4f17-ab4c-43f416a69009" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentPeriodEndDate_5f430634-2146-4b2b-88d3-6ec23c80d077" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentPeriodEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentPeriodEndDate_5f430634-2146-4b2b-88d3-6ec23c80d077" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentTransitionReport_400b64a4-b832-43b2-a7ce-d64a55016581" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentTransitionReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentTransitionReport_400b64a4-b832-43b2-a7ce-d64a55016581" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFileNumber_894a2a52-fa06-42ca-9008-5ac7f15296c1" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityFileNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityFileNumber_894a2a52-fa06-42ca-9008-5ac7f15296c1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityRegistrantName_cb974ec4-4175-4e22-861c-e51fec90b184" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityRegistrantName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityRegistrantName_cb974ec4-4175-4e22-861c-e51fec90b184" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityIncorporationStateCountryCode_512e03fd-f6ee-41d6-9412-d3e6cc57d882" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityIncorporationStateCountryCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityIncorporationStateCountryCode_512e03fd-f6ee-41d6-9412-d3e6cc57d882" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityTaxIdentificationNumber_576ec36c-6e2e-47bd-88ac-2b2f3c8b7f85" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityTaxIdentificationNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityTaxIdentificationNumber_576ec36c-6e2e-47bd-88ac-2b2f3c8b7f85" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressAddressLine1_104ffce0-2b5f-4ca5-93b9-cd4e9eeebfed" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityAddressAddressLine1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityAddressAddressLine1_104ffce0-2b5f-4ca5-93b9-cd4e9eeebfed" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressCityOrTown_b1c3b904-9e89-48d1-9a1e-0d9580edeb74" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityAddressCityOrTown"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityAddressCityOrTown_b1c3b904-9e89-48d1-9a1e-0d9580edeb74" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressStateOrProvince_3e469c71-c33f-48f6-a00a-a3896baa06f8" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityAddressStateOrProvince"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityAddressStateOrProvince_3e469c71-c33f-48f6-a00a-a3896baa06f8" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressPostalZipCode_dddc652f-d0f7-46b9-92e0-14ec6d367780" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityAddressPostalZipCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityAddressPostalZipCode_dddc652f-d0f7-46b9-92e0-14ec6d367780" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CityAreaCode_985b1d86-f222-4d5d-a1a6-2456d1108596" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_CityAreaCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_CityAreaCode_985b1d86-f222-4d5d-a1a6-2456d1108596" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LocalPhoneNumber_1690d4c6-d173-4762-b730-b716763ae3d4" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_LocalPhoneNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_LocalPhoneNumber_1690d4c6-d173-4762-b730-b716763ae3d4" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_Security12bTitle_92391b30-0c1f-4be2-83ee-0a477a09538a" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_Security12bTitle"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_Security12bTitle_92391b30-0c1f-4be2-83ee-0a477a09538a" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_TradingSymbol_a761426d-5826-4e40-ab53-477f6e42e73c" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_TradingSymbol"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_TradingSymbol_a761426d-5826-4e40-ab53-477f6e42e73c" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_SecurityExchangeName_8b3e50d9-4aeb-4aff-9fa7-2cbdc93657b3" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_SecurityExchangeName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_SecurityExchangeName_8b3e50d9-4aeb-4aff-9fa7-2cbdc93657b3" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCurrentReportingStatus_316d2a41-f73e-4c1a-b575-db399b52bcf1" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityCurrentReportingStatus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityCurrentReportingStatus_316d2a41-f73e-4c1a-b575-db399b52bcf1" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInteractiveDataCurrent_f1a51765-58a4-4753-8761-01b1111f72f7" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityInteractiveDataCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityInteractiveDataCurrent_f1a51765-58a4-4753-8761-01b1111f72f7" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFilerCategory_9ad503dd-602c-4944-b929-fd25e70d30df" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityFilerCategory"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityFilerCategory_9ad503dd-602c-4944-b929-fd25e70d30df" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitySmallBusiness_bbe99bdc-6016-49de-a7a7-1cafb4ad1fbd" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntitySmallBusiness"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntitySmallBusiness_bbe99bdc-6016-49de-a7a7-1cafb4ad1fbd" xlink:type="arc" order="20"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityEmergingGrowthCompany_6200d30f-45f0-4bf4-861c-b0653f1c3287" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityEmergingGrowthCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityEmergingGrowthCompany_6200d30f-45f0-4bf4-861c-b0653f1c3287" xlink:type="arc" order="21"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityShellCompany_f6c0186f-1276-472e-9970-9ed37902ee92" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityShellCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityShellCompany_f6c0186f-1276-472e-9970-9ed37902ee92" xlink:type="arc" order="22"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_66911b9d-c8cf-4949-beaf-5a2f270074b5" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityCommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_66911b9d-c8cf-4949-beaf-5a2f270074b5" xlink:type="arc" order="23"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCentralIndexKey_2db5092f-52bd-4d32-a442-ce95ec8096a3" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntityCentralIndexKey"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntityCentralIndexKey_2db5092f-52bd-4d32-a442-ce95ec8096a3" xlink:type="arc" order="24"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalYearFocus_376ad845-0e5a-4eb4-88ca-40272d603fa7" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentFiscalYearFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentFiscalYearFocus_376ad845-0e5a-4eb4-88ca-40272d603fa7" xlink:type="arc" order="25"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CurrentFiscalYearEndDate_043cb461-1afd-4d98-8af1-e6fdee4a5b8c" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_CurrentFiscalYearEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_CurrentFiscalYearEndDate_043cb461-1afd-4d98-8af1-e6fdee4a5b8c" xlink:type="arc" order="26"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalPeriodFocus_3690553b-13f9-4b8d-a59f-0fc5820f02d0" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_DocumentFiscalPeriodFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_DocumentFiscalPeriodFocus_3690553b-13f9-4b8d-a59f-0fc5820f02d0" xlink:type="arc" order="27"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_AmendmentFlag_fe8c9b15-33e5-44f2-a41e-dae8baec8635" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_AmendmentFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_AmendmentFlag_fe8c9b15-33e5-44f2-a41e-dae8baec8635" xlink:type="arc" order="28"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitiesTable_e293d0e2-abcc-4d06-8a6b-927f81ea4d71" xlink:href="https://xbrl.sec.gov/dei/2021q4/dei-2021q4.xsd#dei_EntitiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_e8bfb112-cd0d-4b9e-bc8d-1a627c571aed" xlink:to="loc_dei_EntitiesTable_e293d0e2-abcc-4d06-8a6b-927f81ea4d71" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_e90d40d7-bbff-44f9-91b6-e55ea82b2568" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_e293d0e2-abcc-4d06-8a6b-927f81ea4d71" xlink:to="loc_us-gaap_StatementClassOfStockAxis_e90d40d7-bbff-44f9-91b6-e55ea82b2568" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_e90d40d7-bbff-44f9-91b6-e55ea82b2568_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_e90d40d7-bbff-44f9-91b6-e55ea82b2568" xlink:to="loc_us-gaap_ClassOfStockDomain_e90d40d7-bbff-44f9-91b6-e55ea82b2568_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_d91a6813-ee4e-42bb-8465-536a1682c6ab" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_e90d40d7-bbff-44f9-91b6-e55ea82b2568" xlink:to="loc_us-gaap_ClassOfStockDomain_d91a6813-ee4e-42bb-8465-536a1682c6ab" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_a3fe858d-aeec-4554-b6fd-2680e6ea37eb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_d91a6813-ee4e-42bb-8465-536a1682c6ab" xlink:to="loc_us-gaap_CommonStockMember_a3fe858d-aeec-4554-b6fd-2680e6ea37eb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_cf7a1efd-cd8a-4bc2-9c54-5f7d4f29af74" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_d91a6813-ee4e-42bb-8465-536a1682c6ab" xlink:to="loc_us-gaap_CommonClassBMember_cf7a1efd-cd8a-4bc2-9c54-5f7d4f29af74" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="simple" xlink:href="hsy-20220403.xsd#CONSOLIDATEDSTATEMENTSOFINCOME"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="extended" id="ie1083269f4da4244bcb8d92faa981b75_CONSOLIDATEDSTATEMENTSOFINCOME">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_485f1e74-98d5-40d8-b3d1-bbb60ad29338" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_485f1e74-98d5-40d8-b3d1-bbb60ad29338" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_4f0d05ba-5f28-4c2f-94f7-e7d4491bceca" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_4f0d05ba-5f28-4c2f-94f7-e7d4491bceca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_82a90092-ef34-4f22-866f-e0acbf9828d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GrossProfit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_GrossProfit_82a90092-ef34-4f22-866f-e0acbf9828d9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_6bd64636-84d3-4d02-94ca-df9610df87ce" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_6bd64636-84d3-4d02-94ca-df9610df87ce" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_85c9b59c-c92c-4b6b-943a-4b8c2f7400ea" xlink:href="hsy-20220403.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_85c9b59c-c92c-4b6b-943a-4b8c2f7400ea" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_3d30bb5b-6d64-4ec5-aa75-26600fd560af" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_OperatingIncomeLoss_3d30bb5b-6d64-4ec5-aa75-26600fd560af" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_570a75c9-a74c-4aff-8617-245a01c7db1b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_570a75c9-a74c-4aff-8617-245a01c7db1b" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_87581235-7c75-4a90-87c0-e9ce81dad20b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_87581235-7c75-4a90-87c0-e9ce81dad20b" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bb2ebe51-a339-49cb-bac3-eb81b93304a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_bb2ebe51-a339-49cb-bac3-eb81b93304a6" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_cead943c-bca7-4496-902e-2b19e2e7819d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_cead943c-bca7-4496-902e-2b19e2e7819d" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_27f22c77-67cb-49e6-bb3b-6dae67424861" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_ProfitLoss_27f22c77-67cb-49e6-bb3b-6dae67424861" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_d9a4e6d6-3394-4e63-8af6-948c6155d241" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_NetIncomeLossAttributableToNoncontrollingInterest_d9a4e6d6-3394-4e63-8af6-948c6155d241" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_b23b793a-fafe-420a-a8ee-b2a7ca57a004" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_NetIncomeLoss_b23b793a-fafe-420a-a8ee-b2a7ca57a004" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicAbstract_de2b2493-b0f0-44a5-8316-6fc3f0f44cd6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareBasicAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_de2b2493-b0f0-44a5-8316-6fc3f0f44cd6" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_e295d3e6-6cbd-410a-ac17-7b50c6fb6a17" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_de2b2493-b0f0-44a5-8316-6fc3f0f44cd6" xlink:to="loc_us-gaap_EarningsPerShareBasic_e295d3e6-6cbd-410a-ac17-7b50c6fb6a17" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedAbstract_f3678b82-10f4-4991-8510-ea8c0d513902" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareDilutedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_f3678b82-10f4-4991-8510-ea8c0d513902" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_e96737fb-7c67-44c6-9d01-7a5bde95ec25" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_f3678b82-10f4-4991-8510-ea8c0d513902" xlink:to="loc_us-gaap_EarningsPerShareDiluted_e96737fb-7c67-44c6-9d01-7a5bde95ec25" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_55103aee-900b-4ded-8aba-a6cbfb1648a2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DividendsCommonStockAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_55103aee-900b-4ded-8aba-a6cbfb1648a2" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_f603fc69-764b-43f6-bc34-6d0f5af02e18" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_55103aee-900b-4ded-8aba-a6cbfb1648a2" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_f603fc69-764b-43f6-bc34-6d0f5af02e18" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_84f349a7-d7aa-411d-8487-ede25b249e03" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_f57fb565-d591-4408-97db-b8ca7b1e6574" xlink:to="loc_us-gaap_StatementTable_84f349a7-d7aa-411d-8487-ede25b249e03" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_2bff6b50-1717-45be-9b79-407109c3c624" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_84f349a7-d7aa-411d-8487-ede25b249e03" xlink:to="loc_us-gaap_StatementClassOfStockAxis_2bff6b50-1717-45be-9b79-407109c3c624" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_2bff6b50-1717-45be-9b79-407109c3c624_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2bff6b50-1717-45be-9b79-407109c3c624" xlink:to="loc_us-gaap_ClassOfStockDomain_2bff6b50-1717-45be-9b79-407109c3c624_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_1fbfda90-f56a-43c0-93a0-ed55e37cf866" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_2bff6b50-1717-45be-9b79-407109c3c624" xlink:to="loc_us-gaap_ClassOfStockDomain_1fbfda90-f56a-43c0-93a0-ed55e37cf866" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_33fd3153-4f3f-4520-a855-ecc831020bad" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_1fbfda90-f56a-43c0-93a0-ed55e37cf866" xlink:to="loc_us-gaap_CommonStockMember_33fd3153-4f3f-4520-a855-ecc831020bad" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_207e1466-9ceb-41a1-bbfc-3a8450c0d9c3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_1fbfda90-f56a-43c0-93a0-ed55e37cf866" xlink:to="loc_us-gaap_CommonClassBMember_207e1466-9ceb-41a1-bbfc-3a8450c0d9c3" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20220403.xsd#CONSOLIDATEDBALANCESHEETS"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="extended" id="ice6974fcddaf43849c1cd0aa79ea4a55_CONSOLIDATEDBALANCESHEETS">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_413561e5-5ee3-48be-bc20-c657cf68e22f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_413561e5-5ee3-48be-bc20-c657cf68e22f" xlink:to="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsCurrentAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_7ea802d2-dccb-4851-b8ff-e51af625e459" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_7ea802d2-dccb-4851-b8ff-e51af625e459" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_cb0fe811-8188-419e-a5bb-3dbe7f605bb8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_cb0fe811-8188-419e-a5bb-3dbe7f605bb8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_735a8802-7a2d-4bd7-9028-67a45cc05cfb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InventoryNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:to="loc_us-gaap_InventoryNet_735a8802-7a2d-4bd7-9028-67a45cc05cfb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_bf7700e6-dbc7-449a-8e11-e3fd723bce54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_bf7700e6-dbc7-449a-8e11-e3fd723bce54" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_d39fdd0d-fa2e-4d3c-82f1-bd962bdbdcc2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetsCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_0eadd456-8cf7-4717-8626-1914ae085379" xlink:to="loc_us-gaap_AssetsCurrent_d39fdd0d-fa2e-4d3c-82f1-bd962bdbdcc2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_1fe57e7b-c16a-4e36-953a-176e83c7b05b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_1fe57e7b-c16a-4e36-953a-176e83c7b05b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_5f007359-7601-43e1-9030-9b9b759c0c2a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_Goodwill_5f007359-7601-43e1-9030-9b9b759c0c2a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_a94eee28-fd35-44f7-88b1-3dbea86132ba" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_a94eee28-fd35-44f7-88b1-3dbea86132ba" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_9af2c7be-79a4-4a34-8f44-b353f009a814" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_9af2c7be-79a4-4a34-8f44-b353f009a814" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_20c03215-ab2c-4504-abca-f303a9d7e924" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_20c03215-ab2c-4504-abca-f303a9d7e924" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_3f17bb98-8584-4fda-ba61-5dd24f792d4a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_83934d2f-8b11-47c9-92ea-f44d48f79dde" xlink:to="loc_us-gaap_Assets_3f17bb98-8584-4fda-ba61-5dd24f792d4a" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_413561e5-5ee3-48be-bc20-c657cf68e22f" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_f67fe030-928a-4dd4-8597-9d178bd9e85c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_AccountsPayableCurrent_f67fe030-928a-4dd4-8597-9d178bd9e85c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_4c1aabf9-9e08-4231-ab45-b01cb23d99ec" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_4c1aabf9-9e08-4231-ab45-b01cb23d99ec" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_17e4fed4-f705-4a5a-802a-8360dcd14d06" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_17e4fed4-f705-4a5a-802a-8360dcd14d06" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_0108b3ce-d5d6-4ce2-8552-355812ab520e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermBorrowings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_ShortTermBorrowings_0108b3ce-d5d6-4ce2-8552-355812ab520e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_bf27dd49-cefd-4822-b1b6-676620f725a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_LongTermDebtCurrent_bf27dd49-cefd-4822-b1b6-676620f725a4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_1872d611-7205-49f9-bfdd-3214b5abd179" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_1746e28c-16a0-44a4-a20b-0a300daa61ef" xlink:to="loc_us-gaap_LiabilitiesCurrent_1872d611-7205-49f9-bfdd-3214b5abd179" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_3c905124-f214-4f7d-8d13-9cf173cb2603" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_3c905124-f214-4f7d-8d13-9cf173cb2603" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_8c99000b-1951-4d74-800f-1b9a71364683" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_8c99000b-1951-4d74-800f-1b9a71364683" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f95b620c-9938-4580-a930-e1f820cbf41b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_f95b620c-9938-4580-a930-e1f820cbf41b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_e337de13-2960-4863-89a4-b164f3a6dd97" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Liabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_Liabilities_e337de13-2960-4863-89a4-b164f3a6dd97" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_ccbdf25e-0eef-433a-8e9b-7e3fb5505821" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_PreferredStockValue_ccbdf25e-0eef-433a-8e9b-7e3fb5505821" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_e6c23735-dcfd-4e56-af49-014cc735f884" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_CommonStockValue_e6c23735-dcfd-4e56-af49-014cc735f884" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_8f131d90-d4ee-4484-b339-a85445cadac5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_AdditionalPaidInCapital_8f131d90-d4ee-4484-b339-a85445cadac5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0b375eca-64e0-4990-b3af-eb3ef156e614" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0b375eca-64e0-4990-b3af-eb3ef156e614" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_ca660d68-ef46-4700-9dbc-eb0d3de4cf45" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_TreasuryStockValue_ca660d68-ef46-4700-9dbc-eb0d3de4cf45" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f966850f-f1aa-4d0c-97c4-0326fc1e6edf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_f966850f-f1aa-4d0c-97c4-0326fc1e6edf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_1157b5a7-f284-415f-8b90-5b47b931293d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_7c46f9d3-6d86-4568-aa48-cfe40419ac62" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_1157b5a7-f284-415f-8b90-5b47b931293d" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_e1bab293-71e6-441f-9ea6-9d1b55e25eea" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_f93120e8-58e8-4ce8-b193-16f872785125" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_e1bab293-71e6-441f-9ea6-9d1b55e25eea" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_07e6bde2-1e28-4d50-812c-49b8461ea7f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_413561e5-5ee3-48be-bc20-c657cf68e22f" xlink:to="loc_us-gaap_StatementTable_07e6bde2-1e28-4d50-812c-49b8461ea7f4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_42cc41cd-f945-48ac-b775-14e3a5195663" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_07e6bde2-1e28-4d50-812c-49b8461ea7f4" xlink:to="loc_us-gaap_StatementClassOfStockAxis_42cc41cd-f945-48ac-b775-14e3a5195663" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_42cc41cd-f945-48ac-b775-14e3a5195663_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_42cc41cd-f945-48ac-b775-14e3a5195663" xlink:to="loc_us-gaap_ClassOfStockDomain_42cc41cd-f945-48ac-b775-14e3a5195663_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_932af99d-3983-4887-b3bc-aa6ff92f69ed" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_42cc41cd-f945-48ac-b775-14e3a5195663" xlink:to="loc_us-gaap_ClassOfStockDomain_932af99d-3983-4887-b3bc-aa6ff92f69ed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_7ac8eb83-39f7-4fce-89eb-3b5416d8f3a1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_932af99d-3983-4887-b3bc-aa6ff92f69ed" xlink:to="loc_us-gaap_CommonStockMember_7ac8eb83-39f7-4fce-89eb-3b5416d8f3a1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_c8a9ce3b-9b20-4c17-bd39-8acf6d9e522f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_932af99d-3983-4887-b3bc-aa6ff92f69ed" xlink:to="loc_us-gaap_CommonClassBMember_c8a9ce3b-9b20-4c17-bd39-8acf6d9e522f" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="simple" xlink:href="hsy-20220403.xsd#CONSOLIDATEDBALANCESHEETSParenthetical"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="extended" id="i50e0c100fc974c72adfde5e8e88b9ced_CONSOLIDATEDBALANCESHEETSParenthetical">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_2e5f9b7a-72b3-473c-b0aa-b0b920f6f51b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesIssued_6d5c16b3-4b3f-45db-a9ad-342e942eaa5b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_2e5f9b7a-72b3-473c-b0aa-b0b920f6f51b" xlink:to="loc_us-gaap_PreferredStockSharesIssued_6d5c16b3-4b3f-45db-a9ad-342e942eaa5b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_849c7e69-c7ad-43eb-b118-62e76e080cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_2e5f9b7a-72b3-473c-b0aa-b0b920f6f51b" xlink:to="loc_us-gaap_CommonStockSharesIssued_849c7e69-c7ad-43eb-b118-62e76e080cb4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockShares_fa3cf919-fa3b-489c-8dd4-5abf7f8c85c3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_2e5f9b7a-72b3-473c-b0aa-b0b920f6f51b" xlink:to="loc_us-gaap_TreasuryStockShares_fa3cf919-fa3b-489c-8dd4-5abf7f8c85c3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_93550d14-0584-4772-b984-55c006b6c5fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_2e5f9b7a-72b3-473c-b0aa-b0b920f6f51b" xlink:to="loc_us-gaap_StatementTable_93550d14-0584-4772-b984-55c006b6c5fe" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_32b0f786-08a3-408a-96c0-2380bebad212" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_93550d14-0584-4772-b984-55c006b6c5fe" xlink:to="loc_us-gaap_StatementClassOfStockAxis_32b0f786-08a3-408a-96c0-2380bebad212" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_32b0f786-08a3-408a-96c0-2380bebad212_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_32b0f786-08a3-408a-96c0-2380bebad212" xlink:to="loc_us-gaap_ClassOfStockDomain_32b0f786-08a3-408a-96c0-2380bebad212_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_91c8c24e-6cd5-488e-84c1-6efb8be2e92d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_32b0f786-08a3-408a-96c0-2380bebad212" xlink:to="loc_us-gaap_ClassOfStockDomain_91c8c24e-6cd5-488e-84c1-6efb8be2e92d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_7c76c94f-00bc-4143-85e7-54fd0719118a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_91c8c24e-6cd5-488e-84c1-6efb8be2e92d" xlink:to="loc_us-gaap_CommonStockMember_7c76c94f-00bc-4143-85e7-54fd0719118a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_e569e88f-8e79-45d8-a542-438dcd43b2dd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_91c8c24e-6cd5-488e-84c1-6efb8be2e92d" xlink:to="loc_us-gaap_CommonClassBMember_e569e88f-8e79-45d8-a542-438dcd43b2dd" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" xlink:type="simple" xlink:href="hsy-20220403.xsd#CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" xlink:type="extended" id="id8eaa6e0095245d0b7ae0eea7b937907_CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_bec6d9c0-1c6a-4fed-8e89-a5ea76410ccf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_bec6d9c0-1c6a-4fed-8e89-a5ea76410ccf" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_fde898d9-2dd2-4880-aa9f-704f8a22790c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_fde898d9-2dd2-4880-aa9f-704f8a22790c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_02fa3491-5f4b-46cb-8b0b-abdc459c746f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_ProfitLoss_02fa3491-5f4b-46cb-8b0b-abdc459c746f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_366eed78-4fbf-454a-aa70-ab7b5e1d164a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_366eed78-4fbf-454a-aa70-ab7b5e1d164a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_f991592c-d198-4327-b357-5b2e93639a3d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DividendsCommonStockAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_f991592c-d198-4327-b357-5b2e93639a3d" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockCash_5715c394-baeb-4e42-93cf-4b4c44fcba17" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DividendsCommonStockCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_f991592c-d198-4327-b357-5b2e93639a3d" xlink:to="loc_us-gaap_DividendsCommonStockCash_5715c394-baeb-4e42-93cf-4b4c44fcba17" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities_10b7cd76-ed46-4dd0-ba58-f69986d420af" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities_10b7cd76-ed46-4dd0-ba58-f69986d420af" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_e51a58ee-ff74-4b12-bb69-2c2f07d1a31f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_e51a58ee-ff74-4b12-bb69-2c2f07d1a31f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_f9d199e5-6899-486f-b5a6-77b08d2ad515" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_f9d199e5-6899-486f-b5a6-77b08d2ad515" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_16f8fd86-4d48-4271-814f-2d16d15843f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_16f8fd86-4d48-4271-814f-2d16d15843f6" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncontrollingInterestDecreaseFromDeconsolidation_347a41a1-0aa5-46b9-bd71-fda49e660d25" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoncontrollingInterestDecreaseFromDeconsolidation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_bcf92216-9e58-42a1-adc3-3ec8ce038a45" xlink:to="loc_us-gaap_NoncontrollingInterestDecreaseFromDeconsolidation_347a41a1-0aa5-46b9-bd71-fda49e660d25" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_282e2256-2809-46c7-bf19-b22a1b7f2a80" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_93531987-9f50-46e0-81a5-4430b5f2f4f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_bec6d9c0-1c6a-4fed-8e89-a5ea76410ccf" xlink:to="loc_us-gaap_StatementTable_93531987-9f50-46e0-81a5-4430b5f2f4f4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_ccd90005-eca7-4b31-adf4-400ab1fa4494" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_93531987-9f50-46e0-81a5-4430b5f2f4f4" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_ccd90005-eca7-4b31-adf4-400ab1fa4494" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_ccd90005-eca7-4b31-adf4-400ab1fa4494_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_ccd90005-eca7-4b31-adf4-400ab1fa4494" xlink:to="loc_us-gaap_EquityComponentDomain_ccd90005-eca7-4b31-adf4-400ab1fa4494_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_ccd90005-eca7-4b31-adf4-400ab1fa4494" xlink:to="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockMember_2344f902-ee35-461e-a73d-8294f555af94" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_PreferredStockMember_2344f902-ee35-461e-a73d-8294f555af94" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_e4dfa0c1-67fa-4494-b1ed-22895f1ad60c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_CommonStockMember_e4dfa0c1-67fa-4494-b1ed-22895f1ad60c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_57680787-104b-432c-beb9-9e0f564a8370" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_57680787-104b-432c-beb9-9e0f564a8370" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_59f984ef-7400-4a2f-8aad-01986cc6809d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_RetainedEarningsMember_59f984ef-7400-4a2f-8aad-01986cc6809d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockMember_919682ff-8c5d-4f8e-8654-825527b75a84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_TreasuryStockMember_919682ff-8c5d-4f8e-8654-825527b75a84" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_55a697ab-e31a-4f06-9f5b-953167cf2322" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_55a697ab-e31a-4f06-9f5b-953167cf2322" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncontrollingInterestMember_fcf5ed45-9b32-4f6f-a923-520a8e7defd7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NoncontrollingInterestMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_aaf3cda4-76f0-436d-b14f-2c2be141ed3d" xlink:to="loc_us-gaap_NoncontrollingInterestMember_fcf5ed45-9b32-4f6f-a923-520a8e7defd7" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_848c88a2-decb-470e-8821-15e31070c8ac" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_93531987-9f50-46e0-81a5-4430b5f2f4f4" xlink:to="loc_us-gaap_StatementClassOfStockAxis_848c88a2-decb-470e-8821-15e31070c8ac" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_848c88a2-decb-470e-8821-15e31070c8ac_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_848c88a2-decb-470e-8821-15e31070c8ac" xlink:to="loc_us-gaap_ClassOfStockDomain_848c88a2-decb-470e-8821-15e31070c8ac_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_17c5ace5-2520-47d5-92fa-013c19b4c963" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_848c88a2-decb-470e-8821-15e31070c8ac" xlink:to="loc_us-gaap_ClassOfStockDomain_17c5ace5-2520-47d5-92fa-013c19b4c963" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_5817701a-7037-40ed-a13b-d79066497d5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_17c5ace5-2520-47d5-92fa-013c19b4c963" xlink:to="loc_us-gaap_CommonStockMember_5817701a-7037-40ed-a13b-d79066497d5a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_c94993ee-c17d-4bf4-9058-507b794f96cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_17c5ace5-2520-47d5-92fa-013c19b4c963" xlink:to="loc_us-gaap_CommonClassBMember_c94993ee-c17d-4bf4-9058-507b794f96cf" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical" xlink:type="simple" xlink:href="hsy-20220403.xsd#CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical" xlink:type="extended" id="i1e65ff9f43d2460da6a05bd1759a2a10_CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_9548bc63-da28-4312-8b2e-076b97bb97ae" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_ce03baa8-a29e-4621-9730-eb55f968d8bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9548bc63-da28-4312-8b2e-076b97bb97ae" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_ce03baa8-a29e-4621-9730-eb55f968d8bd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_7f1c8a6a-d02a-48d3-9e69-35443738d72d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_9548bc63-da28-4312-8b2e-076b97bb97ae" xlink:to="loc_us-gaap_StatementTable_7f1c8a6a-d02a-48d3-9e69-35443738d72d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_954eb3c5-115a-46d8-be34-640d79d240b2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_7f1c8a6a-d02a-48d3-9e69-35443738d72d" xlink:to="loc_us-gaap_StatementClassOfStockAxis_954eb3c5-115a-46d8-be34-640d79d240b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_954eb3c5-115a-46d8-be34-640d79d240b2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_954eb3c5-115a-46d8-be34-640d79d240b2" xlink:to="loc_us-gaap_ClassOfStockDomain_954eb3c5-115a-46d8-be34-640d79d240b2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_c6f78069-fdd5-4246-9c4e-3c6485052d98" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_954eb3c5-115a-46d8-be34-640d79d240b2" xlink:to="loc_us-gaap_ClassOfStockDomain_c6f78069-fdd5-4246-9c4e-3c6485052d98" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_d74043b2-6ae6-42d0-859d-0fbe4eb5ac0f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_c6f78069-fdd5-4246-9c4e-3c6485052d98" xlink:to="loc_us-gaap_CommonStockMember_d74043b2-6ae6-42d0-859d-0fbe4eb5ac0f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_d407f495-990c-49b8-a359-3ee6d54b4393" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_c6f78069-fdd5-4246-9c4e-3c6485052d98" xlink:to="loc_us-gaap_CommonClassBMember_d407f495-990c-49b8-a359-3ee6d54b4393" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESPRETZELSINCNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONANDDIVESTITURESPRETZELSINCNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESPRETZELSINCNARRATIVEDetails" xlink:type="extended" id="i49f2365ff6b94700b88fb89798e6d9ea_BUSINESSACQUISITIONANDDIVESTITURESPRETZELSINCNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_49aaf5d1-fe62-4448-b6e9-58da9b68a9f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_49aaf5d1-fe62-4448-b6e9-58da9b68a9f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedTrademarksGross_f481fc54-624e-44b3-a0c8-a576881f2a80" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedTrademarksGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:to="loc_us-gaap_FiniteLivedTrademarksGross_f481fc54-624e-44b3-a0c8-a576881f2a80" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_1b355938-de94-4012-a00f-a2bbce74370f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedCustomerRelationshipsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:to="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_1b355938-de94-4012-a00f-a2bbce74370f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_bdfca911-8959-4da1-bca9-767205fbba1a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_bdfca911-8959-4da1-bca9-767205fbba1a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_96242f19-cbc8-432b-9b6a-d65da111ed3b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_e66e377a-c70b-4b2a-a457-b24c5bcdd810" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_96242f19-cbc8-432b-9b6a-d65da111ed3b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_04675c80-b4b0-4112-89d1-b30e5f00e5a9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_96242f19-cbc8-432b-9b6a-d65da111ed3b" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_04675c80-b4b0-4112-89d1-b30e5f00e5a9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_04675c80-b4b0-4112-89d1-b30e5f00e5a9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_04675c80-b4b0-4112-89d1-b30e5f00e5a9" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_04675c80-b4b0-4112-89d1-b30e5f00e5a9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0ba95924-bbc6-4546-bcf9-58c4e71caa24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_04675c80-b4b0-4112-89d1-b30e5f00e5a9" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0ba95924-bbc6-4546-bcf9-58c4e71caa24" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PretzelsIncMember_12ba31f2-f96f-47ee-a728-630f20b55870" xlink:href="hsy-20220403.xsd#hsy_PretzelsIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_0ba95924-bbc6-4546-bcf9-58c4e71caa24" xlink:to="loc_hsy_PretzelsIncMember_12ba31f2-f96f-47ee-a728-630f20b55870" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a18a83f0-0b5e-4070-95bc-e9836113cb42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_96242f19-cbc8-432b-9b6a-d65da111ed3b" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a18a83f0-0b5e-4070-95bc-e9836113cb42" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_a18a83f0-0b5e-4070-95bc-e9836113cb42_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a18a83f0-0b5e-4070-95bc-e9836113cb42" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_a18a83f0-0b5e-4070-95bc-e9836113cb42_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_b42dfdcc-f27d-497a-a1a3-a4a7e3a15bed" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a18a83f0-0b5e-4070-95bc-e9836113cb42" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_b42dfdcc-f27d-497a-a1a3-a4a7e3a15bed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_40afd194-ab42-46d5-93af-7a2ee3c4682c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_b42dfdcc-f27d-497a-a1a3-a4a7e3a15bed" xlink:to="loc_us-gaap_TrademarksMember_40afd194-ab42-46d5-93af-7a2ee3c4682c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_8200fcfc-8bb5-445e-8f54-fe4c0ea3c967" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_b42dfdcc-f27d-497a-a1a3-a4a7e3a15bed" xlink:to="loc_us-gaap_CustomerRelationshipsMember_8200fcfc-8bb5-445e-8f54-fe4c0ea3c967" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITUREPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONSANDDIVESTITUREPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITUREPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended" id="i5c25ae1a3e4a499fac35b52bb1464b22_BUSINESSACQUISITIONSANDDIVESTITUREPRETZELSINCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_1a8e4537-2410-4ed3-9dfe-aae52a3c123f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_Goodwill_1a8e4537-2410-4ed3-9dfe-aae52a3c123f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_a24c8d9b-7eac-4651-bf57-3e98e6dbe113" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_a24c8d9b-7eac-4651-bf57-3e98e6dbe113" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_1614a403-1762-4652-b329-c2064efded4c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_1614a403-1762-4652-b329-c2064efded4c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles_0feb1c36-73fe-40e6-bf9c-c50f9a8bd886" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles_0feb1c36-73fe-40e6-bf9c-c50f9a8bd886" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_cffa03f9-caa6-4764-a8c7-bcbec8711b61" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_cffa03f9-caa6-4764-a8c7-bcbec8711b61" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentAssets_36dc2e41-b6b8-48db-a1fc-5ebbfb660687" xlink:href="hsy-20220403.xsd#hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentAssets_36dc2e41-b6b8-48db-a1fc-5ebbfb660687" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_85fac0cd-1f8b-4aa7-a0d2-a09b67134a36" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_85fac0cd-1f8b-4aa7-a0d2-a09b67134a36" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_b4e2efb2-0204-42fa-bc12-2d6c59df0900" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_b4e2efb2-0204-42fa-bc12-2d6c59df0900" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_4d0aefe5-0a86-411a-a1d0-98bfccdf6608" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_4d0aefe5-0a86-411a-a1d0-98bfccdf6608" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_e76172c4-aac6-4e27-b1db-2d048f36c3b5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxAssets_e76172c4-aac6-4e27-b1db-2d048f36c3b5" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteDeferredIncomeTaxes_231d662e-2d7f-40a8-b768-b5ef9a653e96" xlink:href="hsy-20220403.xsd#hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteDeferredIncomeTaxes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteDeferredIncomeTaxes_231d662e-2d7f-40a8-b768-b5ef9a653e96" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_5a6990f9-5b4f-48f1-9071-b541b4a1c05a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_5a6990f9-5b4f-48f1-9071-b541b4a1c05a" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_bd4b85ea-23de-4a28-bc22-ef9f8315f2b0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilitiesOther_bd4b85ea-23de-4a28-bc22-ef9f8315f2b0" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_2d79ae47-9a0b-4427-8ac8-eebb3a66d60b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_2d79ae47-9a0b-4427-8ac8-eebb3a66d60b" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_b5587611-f821-44f8-a891-d4c212171944" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_b5587611-f821-44f8-a891-d4c212171944" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_d2b3bb2a-7b39-4306-a3ab-16a7a888c993" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_30a5dd93-ee75-453a-b8c5-45f7167f7428" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_d2b3bb2a-7b39-4306-a3ab-16a7a888c993" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_305b8681-04ec-4653-b1a1-4e7e344030ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_d2b3bb2a-7b39-4306-a3ab-16a7a888c993" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_305b8681-04ec-4653-b1a1-4e7e344030ff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_305b8681-04ec-4653-b1a1-4e7e344030ff_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_305b8681-04ec-4653-b1a1-4e7e344030ff" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_305b8681-04ec-4653-b1a1-4e7e344030ff_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_d54a6c28-6f97-42c7-a07d-23bcc7daae1c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_305b8681-04ec-4653-b1a1-4e7e344030ff" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_d54a6c28-6f97-42c7-a07d-23bcc7daae1c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PretzelsIncMember_1f671156-9657-4d40-80b3-99f52f3c2a6a" xlink:href="hsy-20220403.xsd#hsy_PretzelsIncMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_d54a6c28-6f97-42c7-a07d-23bcc7daae1c" xlink:to="loc_hsy_PretzelsIncMember_1f671156-9657-4d40-80b3-99f52f3c2a6a" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESDOTSPRETZELSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONANDDIVESTITURESDOTSPRETZELSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESDOTSPRETZELSNARRATIVEDetails" xlink:type="extended" id="i44d2f30390914e98ae93c837ae7b0c0d_BUSINESSACQUISITIONANDDIVESTITURESDOTSPRETZELSNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_0747db69-ac29-47f3-b61f-b86e2a71c277" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_0747db69-ac29-47f3-b61f-b86e2a71c277" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedTrademarksGross_be66c86b-1062-4ff0-93fd-b136555f6f87" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedTrademarksGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:to="loc_us-gaap_FiniteLivedTrademarksGross_be66c86b-1062-4ff0-93fd-b136555f6f87" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_4e64cf9b-7696-4909-9636-af8d124dfbee" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedCustomerRelationshipsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:to="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_4e64cf9b-7696-4909-9636-af8d124dfbee" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_6d289b29-82b0-4d79-9220-547280b6cad7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_6d289b29-82b0-4d79-9220-547280b6cad7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69539c35-d161-4015-9e68-27d44853c204" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_6d192915-74b2-4198-945e-e68816bb8be8" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69539c35-d161-4015-9e68-27d44853c204" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_8832536a-fb72-42e5-a0ef-1bcaa3581d01" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69539c35-d161-4015-9e68-27d44853c204" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_8832536a-fb72-42e5-a0ef-1bcaa3581d01" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8832536a-fb72-42e5-a0ef-1bcaa3581d01_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8832536a-fb72-42e5-a0ef-1bcaa3581d01" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8832536a-fb72-42e5-a0ef-1bcaa3581d01_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_832b847a-92da-4850-ae04-c1ee0e4b3dd5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8832536a-fb72-42e5-a0ef-1bcaa3581d01" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_832b847a-92da-4850-ae04-c1ee0e4b3dd5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DotsPretzelsLLCMember_c3063887-e897-4d5c-b938-6b47fe9aaa44" xlink:href="hsy-20220403.xsd#hsy_DotsPretzelsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_832b847a-92da-4850-ae04-c1ee0e4b3dd5" xlink:to="loc_hsy_DotsPretzelsLLCMember_c3063887-e897-4d5c-b938-6b47fe9aaa44" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_69539c35-d161-4015-9e68-27d44853c204" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_d89c46b0-b503-43cc-96ff-62986117bd67" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_29f75005-5b97-4ead-b8ce-3f8b93ca1ca1" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_d89c46b0-b503-43cc-96ff-62986117bd67" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_badfdab4-8d2b-4cfe-982c-709f0c284e9c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_d89c46b0-b503-43cc-96ff-62986117bd67" xlink:to="loc_us-gaap_TrademarksMember_badfdab4-8d2b-4cfe-982c-709f0c284e9c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_04e2420c-34ea-4823-a193-595118e73da9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_d89c46b0-b503-43cc-96ff-62986117bd67" xlink:to="loc_us-gaap_CustomerRelationshipsMember_04e2420c-34ea-4823-a193-595118e73da9" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITUREDOTSPRETZELSASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONSANDDIVESTITUREDOTSPRETZELSASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITUREDOTSPRETZELSASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended" id="id7b717b336af49b5a7f977e45d3261c3_BUSINESSACQUISITIONSANDDIVESTITUREDOTSPRETZELSASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_072bd401-f093-404b-8afd-f00647d17751" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_Goodwill_072bd401-f093-404b-8afd-f00647d17751" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_23ae3e7b-e5e2-4d70-9245-9e190e778ea3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_23ae3e7b-e5e2-4d70-9245-9e190e778ea3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_f86caa86-e1fd-47cc-adf5-9190ca6197d1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_f86caa86-e1fd-47cc-adf5-9190ca6197d1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles_f82c113a-ee97-4efb-be5f-490ab4caa75c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentIntangibles_f82c113a-ee97-4efb-be5f-490ab4caa75c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_568b65a6-2cc4-4d9d-9fab-b694152892b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_568b65a6-2cc4-4d9d-9fab-b694152892b6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_d3c9b2de-824d-4a33-8374-2150212bad10" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_d3c9b2de-824d-4a33-8374-2150212bad10" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_fd6f6c83-56f2-4934-9dc1-c0fbedfe6e63" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_fd6f6c83-56f2-4934-9dc1-c0fbedfe6e63" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_1e4dac43-95f3-4c44-bd52-301a8b2f8c47" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_1e4dac43-95f3-4c44-bd52-301a8b2f8c47" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_23197c7d-322b-412c-b36b-b092a9be2b13" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_23197c7d-322b-412c-b36b-b092a9be2b13" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentLiabilitiesOther_7426ff79-f027-4beb-9e01-a7f830f9a0bc" xlink:href="hsy-20220403.xsd#hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentLiabilitiesOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_hsy_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentCurrentLiabilitiesOther_7426ff79-f027-4beb-9e01-a7f830f9a0bc" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4874e085-a3a4-46c7-b6bd-1f3a5cf900a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_4874e085-a3a4-46c7-b6bd-1f3a5cf900a6" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_2b33d2fc-2d4e-4dc7-93e1-d6ad669780dd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_2b33d2fc-2d4e-4dc7-93e1-d6ad669780dd" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_dd7b5603-1952-404e-87bc-b566ef6d7dd3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_56d68e86-6fd1-4404-8693-6bfa35fef001" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_dd7b5603-1952-404e-87bc-b566ef6d7dd3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_a8504f20-1366-4425-9a50-954d82b2ba6a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_dd7b5603-1952-404e-87bc-b566ef6d7dd3" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_a8504f20-1366-4425-9a50-954d82b2ba6a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_a8504f20-1366-4425-9a50-954d82b2ba6a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_a8504f20-1366-4425-9a50-954d82b2ba6a" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_a8504f20-1366-4425-9a50-954d82b2ba6a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8193adc7-d25f-4446-b94f-2e60c0c0ea82" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_a8504f20-1366-4425-9a50-954d82b2ba6a" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8193adc7-d25f-4446-b94f-2e60c0c0ea82" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DotsPretzelsLLCMember_4d306e07-8606-4cc8-aef6-1dafe24d8dec" xlink:href="hsy-20220403.xsd#hsy_DotsPretzelsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8193adc7-d25f-4446-b94f-2e60c0c0ea82" xlink:to="loc_hsy_DotsPretzelsLLCMember_4d306e07-8606-4cc8-aef6-1dafe24d8dec" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITURELILYSSWEETSLLCNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONSANDDIVESTITURELILYSSWEETSLLCNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSANDDIVESTITURELILYSSWEETSLLCNARRATIVEDetails" xlink:type="extended" id="ie803f0fe5762432cb5246059d05c99a6_BUSINESSACQUISITIONSANDDIVESTITURELILYSSWEETSLLCNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_41af34a5-3a5b-4022-8818-de7500ae5198" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_41af34a5-3a5b-4022-8818-de7500ae5198" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_c2deca73-09cd-4e39-93c1-72c1c729a29a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_c2deca73-09cd-4e39-93c1-72c1c729a29a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedTrademarksGross_e36d5f33-d340-4fbe-b9ed-b8d117246166" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedTrademarksGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_FiniteLivedTrademarksGross_e36d5f33-d340-4fbe-b9ed-b8d117246166" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_0714f61c-df13-4b18-8a58-fc5f6768c935" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedCustomerRelationshipsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_0714f61c-df13-4b18-8a58-fc5f6768c935" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_d5909ea6-390e-43b0-b64d-47efe7a25de4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_d5909ea6-390e-43b0-b64d-47efe7a25de4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a6515e1c-ee65-4af6-8de8-33d7e2871fa2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_b0c6e39e-1413-421e-ad18-05e16ef23d06" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a6515e1c-ee65-4af6-8de8-33d7e2871fa2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_ea501ecc-1128-416d-88e1-dc84d877d6fc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a6515e1c-ee65-4af6-8de8-33d7e2871fa2" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_ea501ecc-1128-416d-88e1-dc84d877d6fc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_ea501ecc-1128-416d-88e1-dc84d877d6fc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_ea501ecc-1128-416d-88e1-dc84d877d6fc" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_ea501ecc-1128-416d-88e1-dc84d877d6fc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_65f8af08-4405-472a-86cd-ce5b3560f7e8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_ea501ecc-1128-416d-88e1-dc84d877d6fc" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_65f8af08-4405-472a-86cd-ce5b3560f7e8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LilysSweetsLLCMember_41f5fd25-bb20-4a25-9ce9-3aad301d44e1" xlink:href="hsy-20220403.xsd#hsy_LilysSweetsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_65f8af08-4405-472a-86cd-ce5b3560f7e8" xlink:to="loc_hsy_LilysSweetsLLCMember_41f5fd25-bb20-4a25-9ce9-3aad301d44e1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_bace086b-e52f-4d86-b6cd-1cfff884becc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a6515e1c-ee65-4af6-8de8-33d7e2871fa2" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_bace086b-e52f-4d86-b6cd-1cfff884becc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_bace086b-e52f-4d86-b6cd-1cfff884becc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_bace086b-e52f-4d86-b6cd-1cfff884becc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_bace086b-e52f-4d86-b6cd-1cfff884becc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_aab58061-704e-4029-9c62-ad69c972e604" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_bace086b-e52f-4d86-b6cd-1cfff884becc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_aab58061-704e-4029-9c62-ad69c972e604" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_bd962520-f44b-4474-9e6e-6923a98b50f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_aab58061-704e-4029-9c62-ad69c972e604" xlink:to="loc_us-gaap_TrademarksMember_bd962520-f44b-4474-9e6e-6923a98b50f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_55cdbfed-cc50-46f1-baf8-54bd6b884c42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_aab58061-704e-4029-9c62-ad69c972e604" xlink:to="loc_us-gaap_CustomerRelationshipsMember_55cdbfed-cc50-46f1-baf8-54bd6b884c42" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_5bc428e8-b804-4fa6-9f90-ff296b55c893" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a6515e1c-ee65-4af6-8de8-33d7e2871fa2" xlink:to="loc_srt_RangeAxis_5bc428e8-b804-4fa6-9f90-ff296b55c893" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_5bc428e8-b804-4fa6-9f90-ff296b55c893_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_5bc428e8-b804-4fa6-9f90-ff296b55c893" xlink:to="loc_srt_RangeMember_5bc428e8-b804-4fa6-9f90-ff296b55c893_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_0278860e-5d73-41bf-843b-4c2b514cc47c" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_5bc428e8-b804-4fa6-9f90-ff296b55c893" xlink:to="loc_srt_RangeMember_0278860e-5d73-41bf-843b-4c2b514cc47c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_1a550adb-b604-4d41-b4fc-026d93450767" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_0278860e-5d73-41bf-843b-4c2b514cc47c" xlink:to="loc_srt_MinimumMember_1a550adb-b604-4d41-b4fc-026d93450767" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_691c4065-e328-4dad-8b5c-4609a2b0b87a" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_0278860e-5d73-41bf-843b-4c2b514cc47c" xlink:to="loc_srt_MaximumMember_691c4065-e328-4dad-8b5c-4609a2b0b87a" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended" id="i98c72644f83d4d629495e56237a92638_BUSINESSACQUISITIONANDDIVESTITURESLILYSSWEETSLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_907a679c-967f-4d14-a34e-67cd9b75e4ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_Goodwill_907a679c-967f-4d14-a34e-67cd9b75e4ff" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_074d53eb-bdb3-4c1e-9979-e7eba43462ce" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibles_074d53eb-bdb3-4c1e-9979-e7eba43462ce" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_fd55a701-143c-44e5-8bf4-8665bc27a5ae" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsOther_fd55a701-143c-44e5-8bf4-8665bc27a5ae" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_cb2d83bd-9310-4c50-8ee9-523d36206a4f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesOther_cb2d83bd-9310-4c50-8ee9-523d36206a4f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_1a89875e-28f3-44c3-a0ac-16203ba1ec9c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_1a89875e-28f3-44c3-a0ac-16203ba1ec9c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_199eed95-51c3-4bc3-8169-4705f4707ba1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNet_199eed95-51c3-4bc3-8169-4705f4707ba1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a4793db8-869a-444d-a453-3efa7de3aa94" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_caeaf827-052c-4d78-85b2-eb93fb6229eb" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a4793db8-869a-444d-a453-3efa7de3aa94" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_6c1bcc2d-08cb-4b55-9313-c00572a334f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_a4793db8-869a-444d-a453-3efa7de3aa94" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_6c1bcc2d-08cb-4b55-9313-c00572a334f4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_6c1bcc2d-08cb-4b55-9313-c00572a334f4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6c1bcc2d-08cb-4b55-9313-c00572a334f4" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_6c1bcc2d-08cb-4b55-9313-c00572a334f4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_b44238a8-47bd-4f29-99b3-6601c7eaf634" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_6c1bcc2d-08cb-4b55-9313-c00572a334f4" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_b44238a8-47bd-4f29-99b3-6601c7eaf634" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LilysSweetsLLCMember_65df9a1c-d03f-47d1-a9ac-d779eacc7d25" xlink:href="hsy-20220403.xsd#hsy_LilysSweetsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_b44238a8-47bd-4f29-99b3-6601c7eaf634" xlink:to="loc_hsy_LilysSweetsLLCMember_65df9a1c-d03f-47d1-a9ac-d779eacc7d25" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="extended" id="i27df2c245f44418e897ce802eb463c64_GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillLineItems_dd13ef2d-c535-4972-9a88-6320eb35b2fc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillRollForward_573f9971-82c2-4463-a670-57ba1ac5d1fa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_dd13ef2d-c535-4972-9a88-6320eb35b2fc" xlink:to="loc_us-gaap_GoodwillRollForward_573f9971-82c2-4463-a670-57ba1ac5d1fa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_8e885074-5852-46fb-96a0-3abec4e5b98b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_573f9971-82c2-4463-a670-57ba1ac5d1fa" xlink:to="loc_us-gaap_Goodwill_8e885074-5852-46fb-96a0-3abec4e5b98b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_ed10ad9f-eb39-484a-8c85-a54810242d11" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_573f9971-82c2-4463-a670-57ba1ac5d1fa" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_ed10ad9f-eb39-484a-8c85-a54810242d11" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_63617776-d44c-4354-af39-041baf2231bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_GoodwillForeignCurrencyTranslationGainLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_573f9971-82c2-4463-a670-57ba1ac5d1fa" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_63617776-d44c-4354-af39-041baf2231bc" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_4737c194-fda9-4217-abf8-66aae5450d86" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_5e0aefd6-eec3-4a1a-8662-46ad7ce04857" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfGoodwillTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_dd13ef2d-c535-4972-9a88-6320eb35b2fc" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_5e0aefd6-eec3-4a1a-8662-46ad7ce04857" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_7442403c-7bd2-4a1d-98ae-b76948986782" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_5e0aefd6-eec3-4a1a-8662-46ad7ce04857" xlink:to="loc_srt_ConsolidationItemsAxis_7442403c-7bd2-4a1d-98ae-b76948986782" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_7442403c-7bd2-4a1d-98ae-b76948986782_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_7442403c-7bd2-4a1d-98ae-b76948986782" xlink:to="loc_srt_ConsolidationItemsDomain_7442403c-7bd2-4a1d-98ae-b76948986782_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_b51fa41a-835a-4756-aca1-c311a65a1ecb" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_7442403c-7bd2-4a1d-98ae-b76948986782" xlink:to="loc_srt_ConsolidationItemsDomain_b51fa41a-835a-4756-aca1-c311a65a1ecb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_f72fa443-76fc-4651-86eb-bbeb95cf41d1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_b51fa41a-835a-4756-aca1-c311a65a1ecb" xlink:to="loc_us-gaap_OperatingSegmentsMember_f72fa443-76fc-4651-86eb-bbeb95cf41d1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_21a2a2ca-b20f-46b5-b355-3f1648bbd659" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_5e0aefd6-eec3-4a1a-8662-46ad7ce04857" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_21a2a2ca-b20f-46b5-b355-3f1648bbd659" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_21a2a2ca-b20f-46b5-b355-3f1648bbd659_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_21a2a2ca-b20f-46b5-b355-3f1648bbd659" xlink:to="loc_us-gaap_SegmentDomain_21a2a2ca-b20f-46b5-b355-3f1648bbd659_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_1f09a5ef-b423-48b3-af72-234792620938" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_21a2a2ca-b20f-46b5-b355-3f1648bbd659" xlink:to="loc_us-gaap_SegmentDomain_1f09a5ef-b423-48b3-af72-234792620938" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_52aac325-7101-4983-9c74-8eb679a8849e" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1f09a5ef-b423-48b3-af72-234792620938" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_52aac325-7101-4983-9c74-8eb679a8849e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_dcf283ae-e2e2-4084-9caa-fd92b29f044e" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1f09a5ef-b423-48b3-af72-234792620938" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_dcf283ae-e2e2-4084-9caa-fd92b29f044e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_ee384c16-afd5-432b-8b72-c30cd90d64a7" xlink:href="hsy-20220403.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1f09a5ef-b423-48b3-af72-234792620938" xlink:to="loc_hsy_InternationalSegmentMember_ee384c16-afd5-432b-8b72-c30cd90d64a7" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="extended" id="i4f66b74ef4c946d691c349ae2138df30_GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_2e8e370b-481c-4c43-b6a1-14c97b09bed3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_2e8e370b-481c-4c43-b6a1-14c97b09bed3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_822e208b-7687-4b9c-9c62-45ea84a2751e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_822e208b-7687-4b9c-9c62-45ea84a2751e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_15505a51-1b68-470e-9da9-ec410fc416a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_15505a51-1b68-470e-9da9-ec410fc416a6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_d9dc7209-c0ea-46e8-8fcb-a4d9e760c4b5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_d9dc7209-c0ea-46e8-8fcb-a4d9e760c4b5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_7eb3bb30-b94f-4228-a94f-66c56e4e3c54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_77f6a423-21de-4039-a8b4-536efb5b693b" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_7eb3bb30-b94f-4228-a94f-66c56e4e3c54" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2fc854ef-7e4b-4241-ae63-bd94479237ed" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_7eb3bb30-b94f-4228-a94f-66c56e4e3c54" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2fc854ef-7e4b-4241-ae63-bd94479237ed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_2fc854ef-7e4b-4241-ae63-bd94479237ed_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2fc854ef-7e4b-4241-ae63-bd94479237ed" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_2fc854ef-7e4b-4241-ae63-bd94479237ed_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_79e8fab0-d531-4054-a834-7a00639f83b0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_2fc854ef-7e4b-4241-ae63-bd94479237ed" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_79e8fab0-d531-4054-a834-7a00639f83b0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_f976308c-f9d6-4f02-b742-f95cb82db533" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_79e8fab0-d531-4054-a834-7a00639f83b0" xlink:to="loc_us-gaap_TrademarksMember_f976308c-f9d6-4f02-b742-f95cb82db533" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_82fce0dc-abdd-48af-a92c-c7e24a3a30b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CustomerRelatedIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_79e8fab0-d531-4054-a834-7a00639f83b0" xlink:to="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_82fce0dc-abdd-48af-a92c-c7e24a3a30b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PatentsMember_969e4680-ff61-460f-94e0-3a46e2c0a7a7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PatentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_79e8fab0-d531-4054-a834-7a00639f83b0" xlink:to="loc_us-gaap_PatentsMember_969e4680-ff61-460f-94e0-3a46e2c0a7a7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_74f33c2b-272b-45ed-8887-3c032426d070" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_7eb3bb30-b94f-4228-a94f-66c56e4e3c54" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_74f33c2b-272b-45ed-8887-3c032426d070" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_74f33c2b-272b-45ed-8887-3c032426d070_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_74f33c2b-272b-45ed-8887-3c032426d070" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_74f33c2b-272b-45ed-8887-3c032426d070_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_b447665e-5212-410c-970e-d4af4a73fa0c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_74f33c2b-272b-45ed-8887-3c032426d070" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_b447665e-5212-410c-970e-d4af4a73fa0c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_6e4b7e7f-bad0-4142-8dd1-319b03dd3cc8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_b447665e-5212-410c-970e-d4af4a73fa0c" xlink:to="loc_us-gaap_TrademarksMember_6e4b7e7f-bad0-4142-8dd1-319b03dd3cc8" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails" xlink:type="extended" id="ibd40dd79a84e4dc6a182cdc26fe32b9b_SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_006586da-4c1a-4ada-b804-1791c7793cbf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_006586da-4c1a-4ada-b804-1791c7793cbf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_18f4979b-792e-4660-8f6a-a24b57154ac5" xlink:href="hsy-20220403.xsd#hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_18f4979b-792e-4660-8f6a-a24b57154ac5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LinesOfCreditCurrent_0ce1860b-b6bc-43ba-9893-4385d0fd4417" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LinesOfCreditCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_us-gaap_LinesOfCreditCurrent_0ce1860b-b6bc-43ba-9893-4385d0fd4417" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_88de8f47-9f1a-4c19-b146-e2a09e1422bb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermBorrowings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_us-gaap_ShortTermBorrowings_88de8f47-9f1a-4c19-b146-e2a09e1422bb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_59ebbff9-74de-4c00-9789-10747060dfa2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_59ebbff9-74de-4c00-9789-10747060dfa2" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LineOfCreditFacilityTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_3e146ed5-e370-464b-9fbf-0ce70fae9308" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:to="loc_us-gaap_DebtInstrumentAxis_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_aec003a4-8a8e-4707-83ba-5116949b6987" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_e43a9bd0-4ebd-4942-a0b0-9c14c5810a3f" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_aec003a4-8a8e-4707-83ba-5116949b6987" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_d4c1f584-ffbe-49d7-a75a-75c5745025da" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_aec003a4-8a8e-4707-83ba-5116949b6987" xlink:to="loc_us-gaap_LineOfCreditMember_d4c1f584-ffbe-49d7-a75a-75c5745025da" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_5949da08-5caf-4a97-9b75-360ad9fad743" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:to="loc_us-gaap_CreditFacilityAxis_5949da08-5caf-4a97-9b75-360ad9fad743" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_5949da08-5caf-4a97-9b75-360ad9fad743_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_5949da08-5caf-4a97-9b75-360ad9fad743" xlink:to="loc_us-gaap_CreditFacilityDomain_5949da08-5caf-4a97-9b75-360ad9fad743_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_d96109eb-e043-46ff-aa09-07d47bd45a3a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_5949da08-5caf-4a97-9b75-360ad9fad743" xlink:to="loc_us-gaap_CreditFacilityDomain_d96109eb-e043-46ff-aa09-07d47bd45a3a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_53497297-f25f-43df-8f9f-329ce49d61c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevolvingCreditFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_d96109eb-e043-46ff-aa09-07d47bd45a3a" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_53497297-f25f-43df-8f9f-329ce49d61c0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_7133163c-9abc-4b5d-8977-eff397f430bb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_7133163c-9abc-4b5d-8977-eff397f430bb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_7133163c-9abc-4b5d-8977-eff397f430bb_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_7133163c-9abc-4b5d-8977-eff397f430bb" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_7133163c-9abc-4b5d-8977-eff397f430bb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_17b851f8-7f09-46c8-9e1b-6cb597a47677" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_7133163c-9abc-4b5d-8977-eff397f430bb" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_17b851f8-7f09-46c8-9e1b-6cb597a47677" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_b9ed55e8-f599-4aa4-8967-265504129e24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_17b851f8-7f09-46c8-9e1b-6cb597a47677" xlink:to="loc_us-gaap_LineOfCreditMember_b9ed55e8-f599-4aa4-8967-265504129e24" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignLineOfCreditMember_ac986f23-9245-4fe1-923f-904301ac3fc5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeignLineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_17b851f8-7f09-46c8-9e1b-6cb597a47677" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_ac986f23-9245-4fe1-923f-904301ac3fc5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeAxis_f5286b77-9da2-4d21-b86f-6d90db0926d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_e6dd0d82-89ba-4cbe-a1e0-2cd4cab0af26" xlink:to="loc_us-gaap_ShortTermDebtTypeAxis_f5286b77-9da2-4d21-b86f-6d90db0926d6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_f5286b77-9da2-4d21-b86f-6d90db0926d6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_f5286b77-9da2-4d21-b86f-6d90db0926d6" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_f5286b77-9da2-4d21-b86f-6d90db0926d6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_0c89f7e7-76a5-4391-be05-6278fdcfcb13" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShortTermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_f5286b77-9da2-4d21-b86f-6d90db0926d6" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_0c89f7e7-76a5-4391-be05-6278fdcfcb13" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_8f3c8c9a-3432-4b87-ab18-fb41a811f06b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermDebtTypeDomain_0c89f7e7-76a5-4391-be05-6278fdcfcb13" xlink:to="loc_us-gaap_CommercialPaperMember_8f3c8c9a-3432-4b87-ab18-fb41a811f06b" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="extended" id="i4c809207a953499f93e94533b15ebb35_SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiability_6ea3dc80-5e94-4597-adef-49ee6949bb24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_us-gaap_FinanceLeaseLiability_6ea3dc80-5e94-4597-adef-49ee6949bb24" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_c6941738-22d3-4e6b-a9f0-f981952af43a" xlink:href="hsy-20220403.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_c6941738-22d3-4e6b-a9f0-f981952af43a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_5dd2e143-1cac-470d-9af9-70d9952a9e99" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_us-gaap_LongTermDebt_5dd2e143-1cac-470d-9af9-70d9952a9e99" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_18b8b393-b2d3-4fdc-9cb2-87ac680e695d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_us-gaap_LongTermDebtCurrent_18b8b393-b2d3-4fdc-9cb2-87ac680e695d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_db99f8c1-2e8b-41d8-82a6-32a4c83a3f1e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_db99f8c1-2e8b-41d8-82a6-32a4c83a3f1e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_d672eaac-da05-41ca-a08d-1d604f4e6126" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_c537a1df-8ec5-441b-907d-1f0ac8ee2b6b" xlink:to="loc_us-gaap_DebtInstrumentTable_d672eaac-da05-41ca-a08d-1d604f4e6126" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_733676fb-f9dd-4cd9-bfb9-0920bf94e739" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_d672eaac-da05-41ca-a08d-1d604f4e6126" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_733676fb-f9dd-4cd9-bfb9-0920bf94e739" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_733676fb-f9dd-4cd9-bfb9-0920bf94e739_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_733676fb-f9dd-4cd9-bfb9-0920bf94e739" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_733676fb-f9dd-4cd9-bfb9-0920bf94e739_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_23b9fff4-9628-4ca6-ad2e-994d3f2c6819" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_733676fb-f9dd-4cd9-bfb9-0920bf94e739" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_23b9fff4-9628-4ca6-ad2e-994d3f2c6819" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_064435c1-1ccb-47dd-9d30-2f8ab21dc7c9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_23b9fff4-9628-4ca6-ad2e-994d3f2c6819" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_064435c1-1ccb-47dd-9d30-2f8ab21dc7c9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_611b6dd8-d48b-430a-8790-639b58da22bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_d672eaac-da05-41ca-a08d-1d604f4e6126" xlink:to="loc_us-gaap_DebtInstrumentAxis_611b6dd8-d48b-430a-8790-639b58da22bd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_611b6dd8-d48b-430a-8790-639b58da22bd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_611b6dd8-d48b-430a-8790-639b58da22bd" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_611b6dd8-d48b-430a-8790-639b58da22bd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_611b6dd8-d48b-430a-8790-639b58da22bd" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.625Due2023Member_86bbaad7-0212-4adc-bf46-3438040e5854" xlink:href="hsy-20220403.xsd#hsy_Notes2.625Due2023Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes2.625Due2023Member_86bbaad7-0212-4adc-bf46-3438040e5854" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3375Due2023Member_b169ca0c-c89d-4037-a49b-dd282d57543d" xlink:href="hsy-20220403.xsd#hsy_Notes3375Due2023Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes3375Due2023Member_b169ca0c-c89d-4037-a49b-dd282d57543d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.050Due2024Member_29fea716-4468-4db1-bb7e-5d4c40a34ef8" xlink:href="hsy-20220403.xsd#hsy_Notes2.050Due2024Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes2.050Due2024Member_29fea716-4468-4db1-bb7e-5d4c40a34ef8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes0900NotesDue2025Member_08f3c238-404c-4411-a87a-ea8595975263" xlink:href="hsy-20220403.xsd#hsy_Notes0900NotesDue2025Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes0900NotesDue2025Member_08f3c238-404c-4411-a87a-ea8595975263" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.20Due2025Member_229e4ebb-13cf-4223-9a17-45b129bf3d92" xlink:href="hsy-20220403.xsd#hsy_Notes3.20Due2025Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes3.20Due2025Member_229e4ebb-13cf-4223-9a17-45b129bf3d92" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.30Due2026Member_69a26f49-a997-4259-9bd2-d824357df5a1" xlink:href="hsy-20220403.xsd#hsy_Notes2.30Due2026Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes2.30Due2026Member_69a26f49-a997-4259-9bd2-d824357df5a1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Debentures7.2Due2027Member_82b04524-4db9-4b8f-b324-19e3ef2d9c50" xlink:href="hsy-20220403.xsd#hsy_Debentures7.2Due2027Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Debentures7.2Due2027Member_82b04524-4db9-4b8f-b324-19e3ef2d9c50" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.450Due2029Member_0b0fa188-ad46-45db-b58f-2f8813a34b16" xlink:href="hsy-20220403.xsd#hsy_Notes2.450Due2029Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes2.450Due2029Member_0b0fa188-ad46-45db-b58f-2f8813a34b16" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes1700Due2030Member_65b0eaf1-a060-458b-8c63-9fd15d2730b8" xlink:href="hsy-20220403.xsd#hsy_Notes1700Due2030Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes1700Due2030Member_65b0eaf1-a060-458b-8c63-9fd15d2730b8" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.375Due2046Member_47395884-4214-4e11-b6bb-7e821fc282b8" xlink:href="hsy-20220403.xsd#hsy_Notes3.375Due2046Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes3.375Due2046Member_47395884-4214-4e11-b6bb-7e821fc282b8" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.125Due2049Member_0e57c4c9-fcda-4e89-aef2-e6b456dedad5" xlink:href="hsy-20220403.xsd#hsy_Notes3.125Due2049Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes3.125Due2049Member_0e57c4c9-fcda-4e89-aef2-e6b456dedad5" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2650NotesDue2050Member_0cca373c-a930-4945-933b-15eb77110b7f" xlink:href="hsy-20220403.xsd#hsy_Notes2650NotesDue2050Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_4ebfd26f-cf6b-4bbd-b527-76678cf478d6" xlink:to="loc_hsy_Notes2650NotesDue2050Member_0cca373c-a930-4945-933b-15eb77110b7f" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTLONGTERMDEBTINTERESTRATESDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SHORTANDLONGTERMDEBTLONGTERMDEBTINTERESTRATESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTLONGTERMDEBTINTERESTRATESDetails" xlink:type="extended" id="i862fa45d367340b3a498d7070c90b6e9_SHORTANDLONGTERMDEBTLONGTERMDEBTINTERESTRATESDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_a1fc94ec-a4e0-44ae-84e1-c9e78ce8d641" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_bcd4f57a-1538-4420-ba8a-a691fc5ac326" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1fc94ec-a4e0-44ae-84e1-c9e78ce8d641" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_bcd4f57a-1538-4420-ba8a-a691fc5ac326" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_86d2382e-5aee-4f5f-bf11-048f80e0c8cc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1fc94ec-a4e0-44ae-84e1-c9e78ce8d641" xlink:to="loc_us-gaap_DebtInstrumentTable_86d2382e-5aee-4f5f-bf11-048f80e0c8cc" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_84e39abd-3ab1-4f3e-a448-d62e3c489c86" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_86d2382e-5aee-4f5f-bf11-048f80e0c8cc" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_84e39abd-3ab1-4f3e-a448-d62e3c489c86" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_84e39abd-3ab1-4f3e-a448-d62e3c489c86_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_84e39abd-3ab1-4f3e-a448-d62e3c489c86" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_84e39abd-3ab1-4f3e-a448-d62e3c489c86_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_35230e8e-42e6-4238-8ce9-781bfa48c0a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_84e39abd-3ab1-4f3e-a448-d62e3c489c86" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_35230e8e-42e6-4238-8ce9-781bfa48c0a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_e37ffa79-8124-4d0c-af9e-1ccc89b0350d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_35230e8e-42e6-4238-8ce9-781bfa48c0a6" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_e37ffa79-8124-4d0c-af9e-1ccc89b0350d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_6e030d4d-e238-4530-829f-01fc5918f7c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_86d2382e-5aee-4f5f-bf11-048f80e0c8cc" xlink:to="loc_us-gaap_DebtInstrumentAxis_6e030d4d-e238-4530-829f-01fc5918f7c0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_6e030d4d-e238-4530-829f-01fc5918f7c0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_6e030d4d-e238-4530-829f-01fc5918f7c0" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_6e030d4d-e238-4530-829f-01fc5918f7c0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_6e030d4d-e238-4530-829f-01fc5918f7c0" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.625Due2023Member_06c5474b-cc4c-4de1-8439-019989eb12e9" xlink:href="hsy-20220403.xsd#hsy_Notes2.625Due2023Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes2.625Due2023Member_06c5474b-cc4c-4de1-8439-019989eb12e9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3375Due2023Member_ab05cfa1-bb5d-4d82-8428-db09890ff6c7" xlink:href="hsy-20220403.xsd#hsy_Notes3375Due2023Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes3375Due2023Member_ab05cfa1-bb5d-4d82-8428-db09890ff6c7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.050Due2024Member_5de599c8-dbd4-41af-ac67-2473163d8179" xlink:href="hsy-20220403.xsd#hsy_Notes2.050Due2024Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes2.050Due2024Member_5de599c8-dbd4-41af-ac67-2473163d8179" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes0900NotesDue2025Member_83a341fe-b9ca-4cd5-af78-c8c6d0c454ca" xlink:href="hsy-20220403.xsd#hsy_Notes0900NotesDue2025Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes0900NotesDue2025Member_83a341fe-b9ca-4cd5-af78-c8c6d0c454ca" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.20Due2025Member_ee1eeefd-2d54-4c52-8d59-b4611fcd5044" xlink:href="hsy-20220403.xsd#hsy_Notes3.20Due2025Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes3.20Due2025Member_ee1eeefd-2d54-4c52-8d59-b4611fcd5044" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.30Due2026Member_639c26f2-0995-4bff-a736-d6604352325a" xlink:href="hsy-20220403.xsd#hsy_Notes2.30Due2026Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes2.30Due2026Member_639c26f2-0995-4bff-a736-d6604352325a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Debentures7.2Due2027Member_19051ee3-50d3-47de-b396-1c146cd44d91" xlink:href="hsy-20220403.xsd#hsy_Debentures7.2Due2027Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Debentures7.2Due2027Member_19051ee3-50d3-47de-b396-1c146cd44d91" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.450Due2029Member_284540d5-7b0e-4f65-8514-70812ba77bf6" xlink:href="hsy-20220403.xsd#hsy_Notes2.450Due2029Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes2.450Due2029Member_284540d5-7b0e-4f65-8514-70812ba77bf6" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes1700Due2030Member_2594eb51-189f-439f-9a4f-461e09a23765" xlink:href="hsy-20220403.xsd#hsy_Notes1700Due2030Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes1700Due2030Member_2594eb51-189f-439f-9a4f-461e09a23765" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.375Due2046Member_e3d59626-195d-4a32-bf5e-f3876725942f" xlink:href="hsy-20220403.xsd#hsy_Notes3.375Due2046Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes3.375Due2046Member_e3d59626-195d-4a32-bf5e-f3876725942f" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.125Due2049Member_6107383e-1759-4dc0-8de0-543c43d2dc3d" xlink:href="hsy-20220403.xsd#hsy_Notes3.125Due2049Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes3.125Due2049Member_6107383e-1759-4dc0-8de0-543c43d2dc3d" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2650NotesDue2050Member_19e92ed2-7e37-48d3-9016-9f16930efb2d" xlink:href="hsy-20220403.xsd#hsy_Notes2650NotesDue2050Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_d34b7ea7-fab4-4231-83e4-7234426019f1" xlink:to="loc_hsy_Notes2650NotesDue2050Member_19e92ed2-7e37-48d3-9016-9f16930efb2d" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#DERIVATIVEINSTRUMENTSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSNARRATIVEDetails" xlink:type="extended" id="ic8fb7b7b28af4d238720c8225fb190d3_DERIVATIVEINSTRUMENTSNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTermOfContract_e2bf651d-4db3-4b04-aa70-4997d811555a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeTermOfContract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_us-gaap_DerivativeTermOfContract_e2bf651d-4db3-4b04-aa70-4997d811555a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeNotionalAmount_e800b359-31ac-4bfc-96a0-38747622bdd0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_us-gaap_DerivativeNotionalAmount_e800b359-31ac-4bfc-96a0-38747622bdd0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_4ee00061-df43-471b-ba7f-fa195469f4b8" xlink:href="hsy-20220403.xsd#hsy_MinimumLengthofTimeHedgedinCashFlowHedge"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_4ee00061-df43-471b-ba7f-fa195469f4b8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_ad6d8a67-36a4-41da-91de-1f051f51fd9d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_ad6d8a67-36a4-41da-91de-1f051f51fd9d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_7a25b2d7-e27f-4bd8-8e0e-583ac8f47ff7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_7a25b2d7-e27f-4bd8-8e0e-583ac8f47ff7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_f0ad1848-582a-487e-8b61-e691f5a5d9bf" xlink:to="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_ef13c601-67af-4607-89d3-c89b3e12f859" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_ef13c601-67af-4607-89d3-c89b3e12f859" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_ef13c601-67af-4607-89d3-c89b3e12f859_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ef13c601-67af-4607-89d3-c89b3e12f859" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_ef13c601-67af-4607-89d3-c89b3e12f859_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_f070369a-8631-477e-ba2b-70013a082368" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ef13c601-67af-4607-89d3-c89b3e12f859" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_f070369a-8631-477e-ba2b-70013a082368" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_00347fbb-8cd2-4291-99ce-225f312a4d77" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_f070369a-8631-477e-ba2b-70013a082368" xlink:to="loc_us-gaap_CommodityContractMember_00347fbb-8cd2-4291-99ce-225f312a4d77" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_1e6bb4a9-2e40-47ee-b5d8-54acdc95a0d5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_f070369a-8631-477e-ba2b-70013a082368" xlink:to="loc_us-gaap_ForeignExchangeContractMember_1e6bb4a9-2e40-47ee-b5d8-54acdc95a0d5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_b38dd978-ad9b-42e5-929d-98428c77db7d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_f070369a-8631-477e-ba2b-70013a082368" xlink:to="loc_us-gaap_EquitySwapMember_b38dd978-ad9b-42e5-929d-98428c77db7d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_47a31040-518b-466c-8be8-40ac5f290bf5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:to="loc_us-gaap_HedgingDesignationAxis_47a31040-518b-466c-8be8-40ac5f290bf5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_47a31040-518b-466c-8be8-40ac5f290bf5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_47a31040-518b-466c-8be8-40ac5f290bf5" xlink:to="loc_us-gaap_HedgingDesignationDomain_47a31040-518b-466c-8be8-40ac5f290bf5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_587fafe0-988d-4e4c-b45c-e7b5fb873750" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_47a31040-518b-466c-8be8-40ac5f290bf5" xlink:to="loc_us-gaap_HedgingDesignationDomain_587fafe0-988d-4e4c-b45c-e7b5fb873750" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_30f77512-3020-439c-b012-e0ed93e4ee7e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_587fafe0-988d-4e4c-b45c-e7b5fb873750" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_30f77512-3020-439c-b012-e0ed93e4ee7e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_f40a66af-6bf6-4125-99b5-79510f540f99" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_587fafe0-988d-4e4c-b45c-e7b5fb873750" xlink:to="loc_us-gaap_NondesignatedMember_f40a66af-6bf6-4125-99b5-79510f540f99" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5" xlink:to="loc_us-gaap_HedgingRelationshipDomain_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_6347f82e-f49e-4e38-ab34-4bf7ff87a5c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_35de6e46-8ac5-4e14-90cb-9f18aaeffdd5" xlink:to="loc_us-gaap_HedgingRelationshipDomain_6347f82e-f49e-4e38-ab34-4bf7ff87a5c0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_1409909f-7246-4c2b-b148-1fe94e45a2f6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_6347f82e-f49e-4e38-ab34-4bf7ff87a5c0" xlink:to="loc_us-gaap_CashFlowHedgingMember_1409909f-7246-4c2b-b148-1fe94e45a2f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_2f592820-06a3-44fe-8d8b-d61d01e236b5" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:to="loc_srt_RangeAxis_2f592820-06a3-44fe-8d8b-d61d01e236b5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_2f592820-06a3-44fe-8d8b-d61d01e236b5_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_2f592820-06a3-44fe-8d8b-d61d01e236b5" xlink:to="loc_srt_RangeMember_2f592820-06a3-44fe-8d8b-d61d01e236b5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_c466683a-5c66-4eca-9710-de316bd2ca51" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_2f592820-06a3-44fe-8d8b-d61d01e236b5" xlink:to="loc_srt_RangeMember_c466683a-5c66-4eca-9710-de316bd2ca51" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_0020c898-f267-4199-a218-5d4ef167434c" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_c466683a-5c66-4eca-9710-de316bd2ca51" xlink:to="loc_srt_MinimumMember_0020c898-f267-4199-a218-5d4ef167434c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_2ff3a1f2-d61e-427b-b4dd-0ddf12e15986" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_c466683a-5c66-4eca-9710-de316bd2ca51" xlink:to="loc_srt_MaximumMember_2ff3a1f2-d61e-427b-b4dd-0ddf12e15986" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_408eaeab-36a8-4fa7-a9f6-01a183fa1fc0" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_e4c1ef63-8435-4eac-8a15-5fb858667824" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_cbbdf666-db0f-4c58-b7ef-3c36a4857c1c" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_e4c1ef63-8435-4eac-8a15-5fb858667824" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails" xlink:type="extended" id="i9196f362260a4ae490ee1789406a0d0b_DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativesFairValueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_f34c57a5-81a1-417b-b21e-f06fa18d854c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:to="loc_us-gaap_DerivativeAssets_f34c57a5-81a1-417b-b21e-f06fa18d854c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_62d335c1-6e42-4b89-9d07-e9f1a0f62d5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:to="loc_us-gaap_DerivativeLiabilities_62d335c1-6e42-4b89-9d07-e9f1a0f62d5a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_18c9784a-490a-4b68-b492-a30e44d267c3" xlink:href="hsy-20220403.xsd#hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:to="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_18c9784a-490a-4b68-b492-a30e44d267c3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_9daabdec-c257-464e-a695-a5b887529eae" xlink:href="hsy-20220403.xsd#hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:to="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_9daabdec-c257-464e-a695-a5b887529eae" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_31986f96-b747-4e06-9ca8-77577bc1f3d2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_8f2d021e-d244-49c6-836b-2e3059e847d9" xlink:to="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_31986f96-b747-4e06-9ca8-77577bc1f3d2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_159e7aab-a818-4b82-8f79-67118a231830" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_31986f96-b747-4e06-9ca8-77577bc1f3d2" xlink:to="loc_us-gaap_HedgingDesignationAxis_159e7aab-a818-4b82-8f79-67118a231830" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_159e7aab-a818-4b82-8f79-67118a231830_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_159e7aab-a818-4b82-8f79-67118a231830" xlink:to="loc_us-gaap_HedgingDesignationDomain_159e7aab-a818-4b82-8f79-67118a231830_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_66655cb1-59b3-4eee-a08d-c495dbb26a5e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_159e7aab-a818-4b82-8f79-67118a231830" xlink:to="loc_us-gaap_HedgingDesignationDomain_66655cb1-59b3-4eee-a08d-c495dbb26a5e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_970eeb2d-0725-470e-bebe-6966e459c243" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_66655cb1-59b3-4eee-a08d-c495dbb26a5e" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_970eeb2d-0725-470e-bebe-6966e459c243" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_eaf7ef6b-b4c6-4115-9ac2-b9217d49665a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_66655cb1-59b3-4eee-a08d-c495dbb26a5e" xlink:to="loc_us-gaap_NondesignatedMember_eaf7ef6b-b4c6-4115-9ac2-b9217d49665a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_baef4d56-abd5-4d40-9d1a-99a0973add12" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_31986f96-b747-4e06-9ca8-77577bc1f3d2" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_baef4d56-abd5-4d40-9d1a-99a0973add12" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_baef4d56-abd5-4d40-9d1a-99a0973add12_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_baef4d56-abd5-4d40-9d1a-99a0973add12" xlink:to="loc_us-gaap_HedgingRelationshipDomain_baef4d56-abd5-4d40-9d1a-99a0973add12_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_71c00c50-42ec-4fab-a6f4-8bbea3dd7734" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_baef4d56-abd5-4d40-9d1a-99a0973add12" xlink:to="loc_us-gaap_HedgingRelationshipDomain_71c00c50-42ec-4fab-a6f4-8bbea3dd7734" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_0481b61e-2554-428f-aae7-704fb7ece9f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_71c00c50-42ec-4fab-a6f4-8bbea3dd7734" xlink:to="loc_us-gaap_CashFlowHedgingMember_0481b61e-2554-428f-aae7-704fb7ece9f4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_a5a4ac23-440b-4be3-8efa-e1b88c18aac2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_31986f96-b747-4e06-9ca8-77577bc1f3d2" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_a5a4ac23-440b-4be3-8efa-e1b88c18aac2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_a5a4ac23-440b-4be3-8efa-e1b88c18aac2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_a5a4ac23-440b-4be3-8efa-e1b88c18aac2" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_a5a4ac23-440b-4be3-8efa-e1b88c18aac2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_03a2a7b5-0492-4b28-a93e-869ce21ed959" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_a5a4ac23-440b-4be3-8efa-e1b88c18aac2" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_03a2a7b5-0492-4b28-a93e-869ce21ed959" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_1a563583-dbfc-4b5d-80e7-2513e655e19c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_03a2a7b5-0492-4b28-a93e-869ce21ed959" xlink:to="loc_us-gaap_ForeignExchangeContractMember_1a563583-dbfc-4b5d-80e7-2513e655e19c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_e0dad452-ada4-4107-98ad-ff1e529d9380" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_03a2a7b5-0492-4b28-a93e-869ce21ed959" xlink:to="loc_us-gaap_CommodityContractMember_e0dad452-ada4-4107-98ad-ff1e529d9380" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_d3b53fb6-80fb-4d38-8308-a017565c3452" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_03a2a7b5-0492-4b28-a93e-869ce21ed959" xlink:to="loc_us-gaap_EquitySwapMember_d3b53fb6-80fb-4d38-8308-a017565c3452" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails" xlink:type="extended" id="if926cfad7db346ae8a9a43fcc2607c43_DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_d5af457e-8a2d-4aa3-a2d2-b284044410de" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_9a13ff90-7d39-4752-a788-5b17d9603cdc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_d5af457e-8a2d-4aa3-a2d2-b284044410de" xlink:to="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_9a13ff90-7d39-4752-a788-5b17d9603cdc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_972d51b9-580e-49eb-a5a0-1bd759e9e04a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_d5af457e-8a2d-4aa3-a2d2-b284044410de" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_972d51b9-580e-49eb-a5a0-1bd759e9e04a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_46f966d7-93d8-40ba-9f0e-03a8b5dde434" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_d5af457e-8a2d-4aa3-a2d2-b284044410de" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_46f966d7-93d8-40ba-9f0e-03a8b5dde434" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_1f641f98-3ffc-4769-bcb5-b0f3a9028148" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_d5af457e-8a2d-4aa3-a2d2-b284044410de" xlink:to="loc_us-gaap_DerivativeTable_1f641f98-3ffc-4769-bcb5-b0f3a9028148" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_0d3689f1-d120-4ca8-9637-951a3b9d10cc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1f641f98-3ffc-4769-bcb5-b0f3a9028148" xlink:to="loc_us-gaap_HedgingDesignationAxis_0d3689f1-d120-4ca8-9637-951a3b9d10cc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_0d3689f1-d120-4ca8-9637-951a3b9d10cc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_0d3689f1-d120-4ca8-9637-951a3b9d10cc" xlink:to="loc_us-gaap_HedgingDesignationDomain_0d3689f1-d120-4ca8-9637-951a3b9d10cc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_f7246d6a-a2e9-4229-bdfe-8b5de89f0c93" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_0d3689f1-d120-4ca8-9637-951a3b9d10cc" xlink:to="loc_us-gaap_HedgingDesignationDomain_f7246d6a-a2e9-4229-bdfe-8b5de89f0c93" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_2e966234-d01c-48da-95d0-b233bd61b1a3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_f7246d6a-a2e9-4229-bdfe-8b5de89f0c93" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_2e966234-d01c-48da-95d0-b233bd61b1a3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_5cab0ab3-8470-4adc-8048-eb4b75e600d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1f641f98-3ffc-4769-bcb5-b0f3a9028148" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_5cab0ab3-8470-4adc-8048-eb4b75e600d9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_5cab0ab3-8470-4adc-8048-eb4b75e600d9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_5cab0ab3-8470-4adc-8048-eb4b75e600d9" xlink:to="loc_us-gaap_HedgingRelationshipDomain_5cab0ab3-8470-4adc-8048-eb4b75e600d9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_e97b4ef9-f0a8-4495-9cba-f164186794e2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_5cab0ab3-8470-4adc-8048-eb4b75e600d9" xlink:to="loc_us-gaap_HedgingRelationshipDomain_e97b4ef9-f0a8-4495-9cba-f164186794e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_8283bdc9-f0b3-4459-90e8-ee3c04c4cb6e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_e97b4ef9-f0a8-4495-9cba-f164186794e2" xlink:to="loc_us-gaap_CashFlowHedgingMember_8283bdc9-f0b3-4459-90e8-ee3c04c4cb6e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_7657d2bf-a6cc-43c9-91d9-66934823a50e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1f641f98-3ffc-4769-bcb5-b0f3a9028148" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_7657d2bf-a6cc-43c9-91d9-66934823a50e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_7657d2bf-a6cc-43c9-91d9-66934823a50e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_7657d2bf-a6cc-43c9-91d9-66934823a50e" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_7657d2bf-a6cc-43c9-91d9-66934823a50e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_7657d2bf-a6cc-43c9-91d9-66934823a50e" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_9c9648c0-ca28-43c5-b180-41b19ef6f14d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:to="loc_us-gaap_CommodityContractMember_9c9648c0-ca28-43c5-b180-41b19ef6f14d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_93ca00ba-4493-4401-9fb9-41863bd27a24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:to="loc_us-gaap_ForeignExchangeContractMember_93ca00ba-4493-4401-9fb9-41863bd27a24" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateContractMember_687439d9-1d0d-4702-a298-91b06c013869" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestRateContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:to="loc_us-gaap_InterestRateContractMember_687439d9-1d0d-4702-a298-91b06c013869" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_c2822db3-b673-4d98-9f3b-c6a74c9ca95f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_56c704b6-2ce0-4c32-8c2e-889ef56574a4" xlink:to="loc_us-gaap_EquitySwapMember_c2822db3-b673-4d98-9f3b-c6a74c9ca95f" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#FAIRVALUEMEASUREMENTSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSNARRATIVEDetails" xlink:type="extended" id="if4b60f1e9ba244aa99aa5e2352540a39_FAIRVALUEMEASUREMENTSNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a398a40f-c20f-4d52-b3a3-c255de664c68" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueNetAssetLiability_a4de841e-0601-4aef-9857-c74b7699e673" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueNetAssetLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a398a40f-c20f-4d52-b3a3-c255de664c68" xlink:to="loc_us-gaap_FairValueNetAssetLiability_a4de841e-0601-4aef-9857-c74b7699e673" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetImpairmentCharges_da459712-7f31-41f3-8e1d-cec482c89fff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AssetImpairmentCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a398a40f-c20f-4d52-b3a3-c255de664c68" xlink:to="loc_us-gaap_AssetImpairmentCharges_da459712-7f31-41f3-8e1d-cec482c89fff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_a20f2b17-15ff-40b5-a793-c3ba34badb35" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a398a40f-c20f-4d52-b3a3-c255de664c68" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_a20f2b17-15ff-40b5-a793-c3ba34badb35" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_a20f2b17-15ff-40b5-a793-c3ba34badb35" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_d9af81f3-0120-4292-9713-fec7e5b2bbe9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_c5cc278c-f31f-4e80-ab8b-5c4f397d70c0" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_d9af81f3-0120-4292-9713-fec7e5b2bbe9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_e1d83526-252b-425f-9c80-24eda0657f29" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_d9af81f3-0120-4292-9713-fec7e5b2bbe9" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_e1d83526-252b-425f-9c80-24eda0657f29" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails" xlink:type="extended" id="i1e4f254fd4b342d1a4f21db4b35ec181_FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a795ea50-c52d-427b-8ae3-e23ab4423d4d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_90b2fb5d-23a8-407c-a9ec-b80bee5ad44c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a795ea50-c52d-427b-8ae3-e23ab4423d4d" xlink:to="loc_us-gaap_DerivativeAssets_90b2fb5d-23a8-407c-a9ec-b80bee5ad44c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_b18b782a-4dc8-4f26-a0ad-b610419e8f3f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a795ea50-c52d-427b-8ae3-e23ab4423d4d" xlink:to="loc_us-gaap_DerivativeLiabilities_b18b782a-4dc8-4f26-a0ad-b610419e8f3f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_478f5854-0137-410c-bd83-d8bd022e77bb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_a795ea50-c52d-427b-8ae3-e23ab4423d4d" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_478f5854-0137-410c-bd83-d8bd022e77bb" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_478f5854-0137-410c-bd83-d8bd022e77bb" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_af0f7da2-8d52-403e-b352-9fdcd5be14ba" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4d5c07c4-c1f1-4283-8acb-8d1c6bb875e7" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_af0f7da2-8d52-403e-b352-9fdcd5be14ba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_d2322502-6afb-4ca3-b7ac-27addbec832c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_af0f7da2-8d52-403e-b352-9fdcd5be14ba" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_d2322502-6afb-4ca3-b7ac-27addbec832c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_478f5854-0137-410c-bd83-d8bd022e77bb" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_3f798747-512a-4fc9-92d0-ce3f7f6a73e4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_f9fb7dc8-3dee-4315-8d2e-bc25cc68fecc" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_3f798747-512a-4fc9-92d0-ce3f7f6a73e4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_2b719237-596d-48bc-a1e7-e99b193665fb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_3f798747-512a-4fc9-92d0-ce3f7f6a73e4" xlink:to="loc_us-gaap_ForeignExchangeContractMember_2b719237-596d-48bc-a1e7-e99b193665fb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_8872d977-ae26-4944-a2ff-33cd943f8469" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_3f798747-512a-4fc9-92d0-ce3f7f6a73e4" xlink:to="loc_us-gaap_EquitySwapMember_8872d977-ae26-4944-a2ff-33cd943f8469" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_32605171-e2e3-4062-a374-79a81c68345f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_3f798747-512a-4fc9-92d0-ce3f7f6a73e4" xlink:to="loc_us-gaap_CommodityContractMember_32605171-e2e3-4062-a374-79a81c68345f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_30ca05e7-d8e2-452b-9480-61997f353b00" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_478f5854-0137-410c-bd83-d8bd022e77bb" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_30ca05e7-d8e2-452b-9480-61997f353b00" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_30ca05e7-d8e2-452b-9480-61997f353b00_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_30ca05e7-d8e2-452b-9480-61997f353b00" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_30ca05e7-d8e2-452b-9480-61997f353b00_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_63d1d04f-c392-44a4-9b1c-00d12a3a32dc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_30ca05e7-d8e2-452b-9480-61997f353b00" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_63d1d04f-c392-44a4-9b1c-00d12a3a32dc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_524c32a6-5a74-492f-a4c0-f56790a58841" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_63d1d04f-c392-44a4-9b1c-00d12a3a32dc" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_524c32a6-5a74-492f-a4c0-f56790a58841" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_59fcb2f7-c068-483d-b2ea-0dd24e3db159" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_63d1d04f-c392-44a4-9b1c-00d12a3a32dc" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_59fcb2f7-c068-483d-b2ea-0dd24e3db159" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_9b3bf168-ca9c-4759-85a1-53523031418b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_63d1d04f-c392-44a4-9b1c-00d12a3a32dc" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_9b3bf168-ca9c-4759-85a1-53523031418b" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails" xlink:type="extended" id="ic30366cd490c40e08295df3ade8255ae_FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_87310347-f233-4ae6-8644-97d9f1ffaf60" xlink:href="hsy-20220403.xsd#hsy_LongtermDebtCurrentMaturitiesFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_87310347-f233-4ae6-8644-97d9f1ffaf60" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_ae45309d-18c6-42d4-9e3a-052560987452" xlink:href="hsy-20220403.xsd#hsy_LongtermDebtExcludingCurrentMaturitiesFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_ae45309d-18c6-42d4-9e3a-052560987452" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtFairValue_7a61438a-477d-4e6e-b764-39a52b010221" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_us-gaap_LongTermDebtFairValue_7a61438a-477d-4e6e-b764-39a52b010221" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_240bb759-019c-47ae-b2a9-2f337325d6c8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_us-gaap_LongTermDebtCurrent_240bb759-019c-47ae-b2a9-2f337325d6c8" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_494e3751-ffe3-4d8e-ab99-dc5f8b943a86" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_494e3751-ffe3-4d8e-ab99-dc5f8b943a86" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_27c8b1e6-18bd-4117-a17d-9d2a34130253" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_us-gaap_LongTermDebt_27c8b1e6-18bd-4117-a17d-9d2a34130253" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_56f218be-dce2-43bb-a7c5-188f4682a094" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_88d9efe2-6823-4baf-af1e-9054153b0aa7" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_56f218be-dce2-43bb-a7c5-188f4682a094" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_14b7ca81-2ae4-4abb-af01-a0dbb521ff23" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_56f218be-dce2-43bb-a7c5-188f4682a094" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_14b7ca81-2ae4-4abb-af01-a0dbb521ff23" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_14b7ca81-2ae4-4abb-af01-a0dbb521ff23_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_14b7ca81-2ae4-4abb-af01-a0dbb521ff23" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_14b7ca81-2ae4-4abb-af01-a0dbb521ff23_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_25bf854b-dc24-48b2-b3ef-e4f27f45fb24" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_14b7ca81-2ae4-4abb-af01-a0dbb521ff23" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_25bf854b-dc24-48b2-b3ef-e4f27f45fb24" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_46917536-a6dc-4ed2-a665-ca1fb6c09d18" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_25bf854b-dc24-48b2-b3ef-e4f27f45fb24" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_46917536-a6dc-4ed2-a665-ca1fb6c09d18" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="extended" id="i101d327822654d9f847d4a33f4c39b50_LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_2b28e724-4234-4198-b78f-af7a94f9ef2b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_2b28e724-4234-4198-b78f-af7a94f9ef2b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_4736fb65-cd78-41a8-b99a-5815a9eaf001" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_4736fb65-cd78-41a8-b99a-5815a9eaf001" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_57400068-d2f6-4ada-ac1d-82eba7d7221d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_57400068-d2f6-4ada-ac1d-82eba7d7221d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseRightofUseAsset_cdf1b1ed-1ee3-4047-8b37-1b1d98fe456c" xlink:href="hsy-20220403.xsd#hsy_LeaseRightofUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_hsy_LeaseRightofUseAsset_cdf1b1ed-1ee3-4047-8b37-1b1d98fe456c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_a4e77070-a396-4817-800c-4a1258887fc4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_a4e77070-a396-4817-800c-4a1258887fc4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_94e7b3ac-a5fc-4bdf-bf90-45edb6a6664f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_94e7b3ac-a5fc-4bdf-bf90-45edb6a6664f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_2fc214d0-4fdf-43f0-b276-05e0ad9b44ec" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_2fc214d0-4fdf-43f0-b276-05e0ad9b44ec" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_ef98daae-26a1-4abc-ae1b-1567694ce5cc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_ef98daae-26a1-4abc-ae1b-1567694ce5cc" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_c5028fed-4703-4f13-b8f2-d5e5460d84ef" xlink:href="hsy-20220403.xsd#hsy_LeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_hsy_LeaseLiability_c5028fed-4703-4f13-b8f2-d5e5460d84ef" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_241e59e3-553b-44ea-bbee-64c44f1a13e5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_625be5fa-452c-43ab-bab8-491476307d04" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_241e59e3-553b-44ea-bbee-64c44f1a13e5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_d6f729e0-7b6e-4b13-a589-aaf05ba3bada" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_241e59e3-553b-44ea-bbee-64c44f1a13e5" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_d6f729e0-7b6e-4b13-a589-aaf05ba3bada" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_d6f729e0-7b6e-4b13-a589-aaf05ba3bada_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_d6f729e0-7b6e-4b13-a589-aaf05ba3bada" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_d6f729e0-7b6e-4b13-a589-aaf05ba3bada_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_df72c8b2-bf34-4d79-925b-c51ec9411d7e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_d6f729e0-7b6e-4b13-a589-aaf05ba3bada" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_df72c8b2-bf34-4d79-925b-c51ec9411d7e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PropertyPlantandEquipmentGrossMember_58c35c6c-eb26-4770-a2b2-a6b87adb4161" xlink:href="hsy-20220403.xsd#hsy_PropertyPlantandEquipmentGrossMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_df72c8b2-bf34-4d79-925b-c51ec9411d7e" xlink:to="loc_hsy_PropertyPlantandEquipmentGrossMember_58c35c6c-eb26-4770-a2b2-a6b87adb4161" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_AccumulatedDepreciationMember_955d3c15-7c87-43e7-9b66-894f3b476fbf" xlink:href="hsy-20220403.xsd#hsy_AccumulatedDepreciationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_df72c8b2-bf34-4d79-925b-c51ec9411d7e" xlink:to="loc_hsy_AccumulatedDepreciationMember_955d3c15-7c87-43e7-9b66-894f3b476fbf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentMember_92aa6846-3d2b-41d7-ba62-bfe94cc0b1f0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PropertyPlantAndEquipmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_df72c8b2-bf34-4d79-925b-c51ec9411d7e" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentMember_92aa6846-3d2b-41d7-ba62-bfe94cc0b1f0" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails" xlink:type="extended" id="i0c5af500e0c74fc5a5676835ab9e9183_INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_492875f6-129a-45de-a6a2-57d538c551a4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_78a97ec4-b021-47e3-8edc-e0355cc4e03f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_492875f6-129a-45de-a6a2-57d538c551a4" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_78a97ec4-b021-47e3-8edc-e0355cc4e03f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_be077ef9-17f9-48b7-9d71-2a203e443e69" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_492875f6-129a-45de-a6a2-57d538c551a4" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_be077ef9-17f9-48b7-9d71-2a203e443e69" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_ccef19e7-8416-460a-8b9e-e483bd32e3e3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_be077ef9-17f9-48b7-9d71-2a203e443e69" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_ccef19e7-8416-460a-8b9e-e483bd32e3e3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_ccef19e7-8416-460a-8b9e-e483bd32e3e3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_ccef19e7-8416-460a-8b9e-e483bd32e3e3" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_ccef19e7-8416-460a-8b9e-e483bd32e3e3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_becb55e4-2623-404a-956b-f68f8a7b88f5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_ccef19e7-8416-460a-8b9e-e483bd32e3e3" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_becb55e4-2623-404a-956b-f68f8a7b88f5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncurrentAssetsMember_e3175395-7fb1-44c8-beb4-29036fa7739b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNoncurrentAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_becb55e4-2623-404a-956b-f68f8a7b88f5" xlink:to="loc_us-gaap_OtherNoncurrentAssetsMember_e3175395-7fb1-44c8-beb4-29036fa7739b" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails" xlink:type="extended" id="i31e19a5799ea4a6dbb4320e4c686ccb7_BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_89f992a7-5035-4c28-b094-a0cafe2438be" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_422528cf-8389-4f84-94e5-eab1599d0995" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_89f992a7-5035-4c28-b094-a0cafe2438be" xlink:to="loc_us-gaap_RestructuringCharges_422528cf-8389-4f84-94e5-eab1599d0995" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_eccde195-c570-40b7-a204-313a773ae8a5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_89f992a7-5035-4c28-b094-a0cafe2438be" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_eccde195-c570-40b7-a204-313a773ae8a5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_759e333b-61fa-41b3-b48d-29d9af92f5a3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_eccde195-c570-40b7-a204-313a773ae8a5" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_759e333b-61fa-41b3-b48d-29d9af92f5a3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_759e333b-61fa-41b3-b48d-29d9af92f5a3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_759e333b-61fa-41b3-b48d-29d9af92f5a3" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_759e333b-61fa-41b3-b48d-29d9af92f5a3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_f0170c8e-2a0e-4e33-91a8-3502107b7dad" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_759e333b-61fa-41b3-b48d-29d9af92f5a3" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_f0170c8e-2a0e-4e33-91a8-3502107b7dad" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_f3208c1b-b0dd-4a08-923b-70fa250888c9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_f0170c8e-2a0e-4e33-91a8-3502107b7dad" xlink:to="loc_us-gaap_EmployeeSeveranceMember_f3208c1b-b0dd-4a08-923b-70fa250888c9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherRestructuringMember_a9127085-df12-4ad5-a330-ebc0e63346d5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherRestructuringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_f0170c8e-2a0e-4e33-91a8-3502107b7dad" xlink:to="loc_us-gaap_OtherRestructuringMember_a9127085-df12-4ad5-a330-ebc0e63346d5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_19a40ca7-e7ee-4923-991b-313ebc5eb391" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_eccde195-c570-40b7-a204-313a773ae8a5" xlink:to="loc_us-gaap_RestructuringPlanAxis_19a40ca7-e7ee-4923-991b-313ebc5eb391" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_19a40ca7-e7ee-4923-991b-313ebc5eb391_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_19a40ca7-e7ee-4923-991b-313ebc5eb391" xlink:to="loc_us-gaap_RestructuringPlanDomain_19a40ca7-e7ee-4923-991b-313ebc5eb391_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_538a4a1c-6627-46f1-857f-ea5c10693432" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_19a40ca7-e7ee-4923-991b-313ebc5eb391" xlink:to="loc_us-gaap_RestructuringPlanDomain_538a4a1c-6627-46f1-857f-ea5c10693432" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalOptimizationProgramMember_bf2c2fc0-5bf5-439c-91e2-3c1493dd218f" xlink:href="hsy-20220403.xsd#hsy_InternationalOptimizationProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_538a4a1c-6627-46f1-857f-ea5c10693432" xlink:to="loc_hsy_InternationalOptimizationProgramMember_bf2c2fc0-5bf5-439c-91e2-3c1493dd218f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_eccde195-c570-40b7-a204-313a773ae8a5" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_8ad3e59d-c918-47e6-acd3-13b67b3f6f99" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3538e30c-b113-4bbc-98d3-aac9a4aa2bf4" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_8ad3e59d-c918-47e6-acd3-13b67b3f6f99" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_7941620e-a0e3-4c2c-af5a-5cdd9b5b52ef" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_8ad3e59d-c918-47e6-acd3-13b67b3f6f99" xlink:to="loc_us-gaap_CostOfSalesMember_7941620e-a0e3-4c2c-af5a-5cdd9b5b52ef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_f22d5458-9982-47af-b7a6-e9c61f0ed1d9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_8ad3e59d-c918-47e6-acd3-13b67b3f6f99" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_f22d5458-9982-47af-b7a6-e9c61f0ed1d9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringChargesMember_99e57a45-f796-4178-9ecf-412f95574af7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringChargesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_8ad3e59d-c918-47e6-acd3-13b67b3f6f99" xlink:to="loc_us-gaap_RestructuringChargesMember_99e57a45-f796-4178-9ecf-412f95574af7" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails" xlink:type="extended" id="i0fd78139d5984ca5a1b1e2872f7a6f2b_BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_34febe4c-87a5-44e2-b295-ca5d9f621773" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedCost1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_34febe4c-87a5-44e2-b295-ca5d9f621773" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringandRelatedCostExpectedCostCashPortion_f8004bb1-c49f-488b-a5d8-aff23aa6394e" xlink:href="hsy-20220403.xsd#hsy_RestructuringandRelatedCostExpectedCostCashPortion"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:to="loc_hsy_RestructuringandRelatedCostExpectedCostCashPortion_f8004bb1-c49f-488b-a5d8-aff23aa6394e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_f922258a-600c-423d-a7e4-e5581a419cef" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:to="loc_us-gaap_RestructuringCharges_f922258a-600c-423d-a7e4-e5581a419cef" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_0eb3d162-a538-42e5-976e-3f57fb7a3061" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringAndRelatedCostCostIncurredToDate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:to="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_0eb3d162-a538-42e5-976e-3f57fb7a3061" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_08c77cfe-c6dd-4a9a-805c-8007c58ae3f0" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_9c1047b4-0954-4f66-bca0-d6538bee8f81" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_9c1047b4-0954-4f66-bca0-d6538bee8f81" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_9c1047b4-0954-4f66-bca0-d6538bee8f81_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_9c1047b4-0954-4f66-bca0-d6538bee8f81" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_9c1047b4-0954-4f66-bca0-d6538bee8f81_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_4a718c1a-808a-4fbb-a334-1965e8da2b3c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_9c1047b4-0954-4f66-bca0-d6538bee8f81" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_4a718c1a-808a-4fbb-a334-1965e8da2b3c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_a1893ae9-cbc9-4616-b494-06db4fcb1d0f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_a1893ae9-cbc9-4616-b494-06db4fcb1d0f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_a1893ae9-cbc9-4616-b494-06db4fcb1d0f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_a1893ae9-cbc9-4616-b494-06db4fcb1d0f" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_a1893ae9-cbc9-4616-b494-06db4fcb1d0f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_ba1b2ddb-6735-4cc0-9bbb-5174ed67e039" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_a1893ae9-cbc9-4616-b494-06db4fcb1d0f" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_ba1b2ddb-6735-4cc0-9bbb-5174ed67e039" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_59fcdbb7-7edd-4a1f-a175-95d002461a21" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_59fcdbb7-7edd-4a1f-a175-95d002461a21" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_59fcdbb7-7edd-4a1f-a175-95d002461a21_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_59fcdbb7-7edd-4a1f-a175-95d002461a21" xlink:to="loc_us-gaap_SegmentDomain_59fcdbb7-7edd-4a1f-a175-95d002461a21_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_5de80da9-ba85-4ac9-8ae2-c9ccb5b7110b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_59fcdbb7-7edd-4a1f-a175-95d002461a21" xlink:to="loc_us-gaap_SegmentDomain_5de80da9-ba85-4ac9-8ae2-c9ccb5b7110b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_6e501324-078a-4e90-ae00-4229b1684720" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:to="loc_us-gaap_RestructuringPlanAxis_6e501324-078a-4e90-ae00-4229b1684720" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_6e501324-078a-4e90-ae00-4229b1684720_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_6e501324-078a-4e90-ae00-4229b1684720" xlink:to="loc_us-gaap_RestructuringPlanDomain_6e501324-078a-4e90-ae00-4229b1684720_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_6ef730d2-3817-442f-afd0-d408c14cc2c4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_6e501324-078a-4e90-ae00-4229b1684720" xlink:to="loc_us-gaap_RestructuringPlanDomain_6ef730d2-3817-442f-afd0-d408c14cc2c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalOptimizationProgramMember_cc623b75-fdb1-4781-9dc9-d4d24cc18719" xlink:href="hsy-20220403.xsd#hsy_InternationalOptimizationProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_6ef730d2-3817-442f-afd0-d408c14cc2c4" xlink:to="loc_hsy_InternationalOptimizationProgramMember_cc623b75-fdb1-4781-9dc9-d4d24cc18719" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_1e445686-b244-4824-903d-0866229e4ca1" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_960de0ea-6de5-4596-94e5-92230b19f90b" xlink:to="loc_srt_RangeAxis_1e445686-b244-4824-903d-0866229e4ca1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_1e445686-b244-4824-903d-0866229e4ca1_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_1e445686-b244-4824-903d-0866229e4ca1" xlink:to="loc_srt_RangeMember_1e445686-b244-4824-903d-0866229e4ca1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_a9a28ab2-5018-49d3-87b1-10799a239d7f" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_1e445686-b244-4824-903d-0866229e4ca1" xlink:to="loc_srt_RangeMember_a9a28ab2-5018-49d3-87b1-10799a239d7f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_4742eef0-d89b-4d0b-a70f-98e62d6f55f3" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_a9a28ab2-5018-49d3-87b1-10799a239d7f" xlink:to="loc_srt_MinimumMember_4742eef0-d89b-4d0b-a70f-98e62d6f55f3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_b72f4b36-4e26-478d-aa48-8bdc0fee503f" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_a9a28ab2-5018-49d3-87b1-10799a239d7f" xlink:to="loc_srt_MaximumMember_b72f4b36-4e26-478d-aa48-8bdc0fee503f" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="extended" id="i40c7c864e7f04dfda9bc37bc276bbaec_PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_3df13318-c74a-4e79-ae91-fdf31bcf25e6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_3df13318-c74a-4e79-ae91-fdf31bcf25e6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_13cc419a-41b4-46d5-871d-e5e915495982" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_13cc419a-41b4-46d5-871d-e5e915495982" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_93d2cc9b-0e94-49ca-b5b1-923503ab1f0c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_93d2cc9b-0e94-49ca-b5b1-923503ab1f0c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_bec3525c-e13e-4b10-ba43-b86fda6141cb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_bec3525c-e13e-4b10-ba43-b86fda6141cb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_3720dd0f-7b5f-4268-8fda-239e466e44a1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_3720dd0f-7b5f-4268-8fda-239e466e44a1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_a243faf1-504f-47c9-9757-a1711d4339b9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_a243faf1-504f-47c9-9757-a1711d4339b9" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_e5f7a9ad-9b92-499c-9df1-435ba28b2d72" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_e5f7a9ad-9b92-499c-9df1-435ba28b2d72" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_4284bab5-8b2d-45c7-94bb-952cf5c71f32" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_ea8ca642-2994-43a7-9125-d85341187f1a" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_4284bab5-8b2d-45c7-94bb-952cf5c71f32" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_e46e73aa-d86e-4d39-9bd6-eda614e73e20" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_4284bab5-8b2d-45c7-94bb-952cf5c71f32" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_e46e73aa-d86e-4d39-9bd6-eda614e73e20" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_e46e73aa-d86e-4d39-9bd6-eda614e73e20_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_e46e73aa-d86e-4d39-9bd6-eda614e73e20" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_e46e73aa-d86e-4d39-9bd6-eda614e73e20_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_d1c7e5a5-6565-4d4f-8a57-335196079ab6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_e46e73aa-d86e-4d39-9bd6-eda614e73e20" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_d1c7e5a5-6565-4d4f-8a57-335196079ab6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_e1afe969-d199-4ac4-b115-211e00eef000" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_d1c7e5a5-6565-4d4f-8a57-335196079ab6" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_e1afe969-d199-4ac4-b115-211e00eef000" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_23c8232e-b9b3-4ebe-bf7f-1e9c4efbbd6f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_d1c7e5a5-6565-4d4f-8a57-335196079ab6" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_23c8232e-b9b3-4ebe-bf7f-1e9c4efbbd6f" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails" xlink:type="extended" id="iec60cd1c25a5452696ef8b1390a77d21_PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_18caa7a3-3226-4fcb-88ae-649327954157" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_d58980d2-972f-4d9f-a0eb-25ef59ceaa7e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_18caa7a3-3226-4fcb-88ae-649327954157" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_d58980d2-972f-4d9f-a0eb-25ef59ceaa7e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate_274fd9cb-94c5-49dc-b062-ec8f658b57bb" xlink:href="hsy-20220403.xsd#hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_18caa7a3-3226-4fcb-88ae-649327954157" xlink:to="loc_hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate_274fd9cb-94c5-49dc-b062-ec8f658b57bb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_bc28bf41-3e78-4f9b-95bf-f1abf20173b3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_18caa7a3-3226-4fcb-88ae-649327954157" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_bc28bf41-3e78-4f9b-95bf-f1abf20173b3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8dc7e4d9-c926-40db-b2c6-aac2ec28296f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_18caa7a3-3226-4fcb-88ae-649327954157" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8dc7e4d9-c926-40db-b2c6-aac2ec28296f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8dc7e4d9-c926-40db-b2c6-aac2ec28296f" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_37ade3aa-d59b-4049-98be-b156d03e62c0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_a7ebcdd7-e45f-4377-b8ee-8b12ccd3a8fc" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_37ade3aa-d59b-4049-98be-b156d03e62c0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_fce43a72-6589-4b18-8417-86378ec2b4a6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_37ade3aa-d59b-4049-98be-b156d03e62c0" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_fce43a72-6589-4b18-8417-86378ec2b4a6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_764ba192-83be-4de9-b2f8-2f149a360b6f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_37ade3aa-d59b-4049-98be-b156d03e62c0" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_764ba192-83be-4de9-b2f8-2f149a360b6f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanNameAxis_4cefa0e9-7de0-475c-bfba-c936e84a088f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_8dc7e4d9-c926-40db-b2c6-aac2ec28296f" xlink:to="loc_us-gaap_RetirementPlanNameAxis_4cefa0e9-7de0-475c-bfba-c936e84a088f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanNameDomain_4cefa0e9-7de0-475c-bfba-c936e84a088f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanNameAxis_4cefa0e9-7de0-475c-bfba-c936e84a088f" xlink:to="loc_us-gaap_RetirementPlanNameDomain_4cefa0e9-7de0-475c-bfba-c936e84a088f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanNameDomain_1f52fa6d-1042-42b1-8384-da1d241caad2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RetirementPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanNameAxis_4cefa0e9-7de0-475c-bfba-c936e84a088f" xlink:to="loc_us-gaap_RetirementPlanNameDomain_1f52fa6d-1042-42b1-8384-da1d241caad2" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#STOCKCOMPENSATIONPLANSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSNARRATIVEDetails" xlink:type="extended" id="i479343784db64ee2978e5991af4fa693_STOCKCOMPENSATIONPLANSNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_030a639a-5f14-4bfa-a534-a8bce25059cc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_030a639a-5f14-4bfa-a534-a8bce25059cc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_e2effe91-f5c5-4614-b76b-c560f9facae1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_e2effe91-f5c5-4614-b76b-c560f9facae1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_dfea9ca8-fafa-4f8f-9e8b-508865a8de3e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_dfea9ca8-fafa-4f8f-9e8b-508865a8de3e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_8bbad854-7e83-4b19-9ef5-fb011932a66e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_8bbad854-7e83-4b19-9ef5-fb011932a66e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_6564cedb-9822-429c-bfdb-ccc7a783ba23" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_6564cedb-9822-429c-bfdb-ccc7a783ba23" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_c7107b36-2bf0-491b-8d08-38bf4e993941" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_c7107b36-2bf0-491b-8d08-38bf4e993941" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_d138638d-399b-4d5e-9e93-4613a92c287f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_d138638d-399b-4d5e-9e93-4613a92c287f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts_83e58be6-bd0f-4bea-afd8-ab64caf908b1" xlink:href="hsy-20220403.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts_83e58be6-bd0f-4bea-afd8-ab64caf908b1" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_6389a86b-96bd-4689-9e11-3a2f0aa63ca3" xlink:href="hsy-20220403.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_6389a86b-96bd-4689-9e11-3a2f0aa63ca3" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_36e520fc-a0c9-42a5-9da8-442f275694f4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_36e520fc-a0c9-42a5-9da8-442f275694f4" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_39024237-ab85-4b1f-86e4-b8dc3fee0cac" xlink:href="hsy-20220403.xsd#hsy_DeferredCompensationArrangementwithIndividualConversionBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_39024237-ab85-4b1f-86e4-b8dc3fee0cac" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_b87f01ae-af99-46e5-b821-1c1109014a18" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_823f8357-2a0a-4529-99e2-d76d7af13c43" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_b87f01ae-af99-46e5-b821-1c1109014a18" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_77e46c43-3294-4f65-955c-c11eebf6ed51" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_b87f01ae-af99-46e5-b821-1c1109014a18" xlink:to="loc_us-gaap_AwardTypeAxis_77e46c43-3294-4f65-955c-c11eebf6ed51" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_77e46c43-3294-4f65-955c-c11eebf6ed51_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_77e46c43-3294-4f65-955c-c11eebf6ed51" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_77e46c43-3294-4f65-955c-c11eebf6ed51_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_b0ecfc7d-cc32-4ba1-af7c-3bd9263d979a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_77e46c43-3294-4f65-955c-c11eebf6ed51" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_b0ecfc7d-cc32-4ba1-af7c-3bd9263d979a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_6f97e4fc-fc83-4837-ba00-724e642f642d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_b0ecfc7d-cc32-4ba1-af7c-3bd9263d979a" xlink:to="loc_us-gaap_EmployeeStockOptionMember_6f97e4fc-fc83-4837-ba00-724e642f642d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_fd104297-1e67-4aab-8f5f-3e61289a8820" xlink:href="hsy-20220403.xsd#hsy_PerformanceStockUnitsandRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_b0ecfc7d-cc32-4ba1-af7c-3bd9263d979a" xlink:to="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_fd104297-1e67-4aab-8f5f-3e61289a8820" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_a78f961d-d48d-456b-b15f-8d15d31614b6" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_b87f01ae-af99-46e5-b821-1c1109014a18" xlink:to="loc_srt_RangeAxis_a78f961d-d48d-456b-b15f-8d15d31614b6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_a78f961d-d48d-456b-b15f-8d15d31614b6_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_a78f961d-d48d-456b-b15f-8d15d31614b6" xlink:to="loc_srt_RangeMember_a78f961d-d48d-456b-b15f-8d15d31614b6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_553bc450-e6ff-4ec0-b9d4-81c31b0dbc6d" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_a78f961d-d48d-456b-b15f-8d15d31614b6" xlink:to="loc_srt_RangeMember_553bc450-e6ff-4ec0-b9d4-81c31b0dbc6d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_7426a916-0fb0-471f-8978-6c6f87ea20e6" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_553bc450-e6ff-4ec0-b9d4-81c31b0dbc6d" xlink:to="loc_srt_MinimumMember_7426a916-0fb0-471f-8978-6c6f87ea20e6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_ef48a4a0-89b0-488f-b504-c17d229d2f00" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_553bc450-e6ff-4ec0-b9d4-81c31b0dbc6d" xlink:to="loc_srt_MaximumMember_ef48a4a0-89b0-488f-b504-c17d229d2f00" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails" xlink:type="extended" id="i0752451b476b4e21be1a8f5dca384782_STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_760754a7-bfd0-45e5-a893-2320bf95c681" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_760754a7-bfd0-45e5-a893-2320bf95c681" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_aeba1aa5-cd25-4c83-92af-d3128cb61f76" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_aeba1aa5-cd25-4c83-92af-d3128cb61f76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_b4d70996-d4a2-47f6-b609-1ceddcf9bc00" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_b4d70996-d4a2-47f6-b609-1ceddcf9bc00" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_0d806951-ba63-45cf-a988-71e1848600ff" xlink:href="hsy-20220403.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_0d806951-ba63-45cf-a988-71e1848600ff" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_97ec8326-240f-4cf0-a3ab-9ad095b81f33" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_97ec8326-240f-4cf0-a3ab-9ad095b81f33" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_941f095c-8540-49b8-8ab8-dcc9c183cd8d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_ef4204a8-f928-44ca-9d03-847e5b4523bc" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_941f095c-8540-49b8-8ab8-dcc9c183cd8d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_68425fe3-2df2-4a48-84ec-195b3a0a7d5e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_760754a7-bfd0-45e5-a893-2320bf95c681" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_53d03939-19d5-4ea5-b957-f94b50aa4aca" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_53d03939-19d5-4ea5-b957-f94b50aa4aca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_ff6a0339-cb7a-4a9c-917c-6a76dcc0f2d8" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_ff6a0339-cb7a-4a9c-917c-6a76dcc0f2d8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_5c913dff-708d-4729-aa6d-0e8d468b9027" xlink:href="hsy-20220403.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_5c913dff-708d-4729-aa6d-0e8d468b9027" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_355f744b-0fdb-4872-a07e-635fc6a04c7c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_355f744b-0fdb-4872-a07e-635fc6a04c7c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_631e9aa4-704f-4cd7-acf7-507341fc3915" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_8e5f361e-6998-40d2-9cac-6b44d39f4f95" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_631e9aa4-704f-4cd7-acf7-507341fc3915" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_11a564ac-b57e-4a61-a0c9-c90b61f0ca2a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_dc3c5ed0-d120-4bb7-9fc5-c6d2e71975a0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_760754a7-bfd0-45e5-a893-2320bf95c681" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_dc3c5ed0-d120-4bb7-9fc5-c6d2e71975a0" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_dc3c5ed0-d120-4bb7-9fc5-c6d2e71975a0" xlink:to="loc_us-gaap_AwardTypeAxis_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_52a45afc-8594-4fb9-9f78-ba0ecd233d66" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_4ebf9dd0-2e5c-44c2-814d-a4d69bd93e2a" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_52a45afc-8594-4fb9-9f78-ba0ecd233d66" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_8d47221c-d6ca-4cce-85d8-7417999df90c" xlink:href="hsy-20220403.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_52a45afc-8594-4fb9-9f78-ba0ecd233d66" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_8d47221c-d6ca-4cce-85d8-7417999df90c" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails" xlink:type="extended" id="ifaae6d05e23e4e63a60986b2e6a270ea_STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_6a8488d6-ed50-4500-87e4-d03b2e19f7aa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_6a8488d6-ed50-4500-87e4-d03b2e19f7aa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_9cc023aa-ece5-40ec-8509-a9702e60c2ff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_9cc023aa-ece5-40ec-8509-a9702e60c2ff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharePrice_3f038c49-4f89-4993-8f9e-d93d9ea3c2be" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SharePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_SharePrice_3f038c49-4f89-4993-8f9e-d93d9ea3c2be" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_1c750a29-3be8-4ab5-90f9-efd03f0a3c2d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_1c750a29-3be8-4ab5-90f9-efd03f0a3c2d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_879f8db6-03a6-4f6d-8ecf-b78a840f9fe0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_879f8db6-03a6-4f6d-8ecf-b78a840f9fe0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_f9d5ffc2-66e0-44eb-8bb3-51103a598365" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_f2102779-5bb2-41bc-acb7-39436d9494b0" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_f9d5ffc2-66e0-44eb-8bb3-51103a598365" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_8222a270-481d-4a96-a6ef-58027cf19315" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_f9d5ffc2-66e0-44eb-8bb3-51103a598365" xlink:to="loc_us-gaap_AwardTypeAxis_8222a270-481d-4a96-a6ef-58027cf19315" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_8222a270-481d-4a96-a6ef-58027cf19315_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_8222a270-481d-4a96-a6ef-58027cf19315" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_8222a270-481d-4a96-a6ef-58027cf19315_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_094eeeae-e229-4fc0-a7c2-c9c8a47e6c35" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_8222a270-481d-4a96-a6ef-58027cf19315" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_094eeeae-e229-4fc0-a7c2-c9c8a47e6c35" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_7fcd3c37-7457-41b3-bfd0-61a824145c02" xlink:href="hsy-20220403.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_094eeeae-e229-4fc0-a7c2-c9c8a47e6c35" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_7fcd3c37-7457-41b3-bfd0-61a824145c02" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SEGMENTINFORMATIONNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONNARRATIVEDetails" xlink:type="extended" id="icd4eb06a0e2048128297258724e247d1_SEGMENTINFORMATIONNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_740aa637-f24e-4424-9477-078f7253c629" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives_2f06debc-1f8b-4f56-af4e-fc78a84255d0" xlink:href="hsy-20220403.xsd#hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_740aa637-f24e-4424-9477-078f7253c629" xlink:to="loc_hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives_2f06debc-1f8b-4f56-af4e-fc78a84255d0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_f7894e4e-462f-432e-8c72-4d6c4e4761f7" xlink:href="hsy-20220403.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_740aa637-f24e-4424-9477-078f7253c629" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_f7894e4e-462f-432e-8c72-4d6c4e4761f7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_740aa637-f24e-4424-9477-078f7253c629" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_3db54359-c662-4c5d-991b-d9f625fca2b6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_3db54359-c662-4c5d-991b-d9f625fca2b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_3db54359-c662-4c5d-991b-d9f625fca2b6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3db54359-c662-4c5d-991b-d9f625fca2b6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_3db54359-c662-4c5d-991b-d9f625fca2b6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_926c8414-db27-48d7-b2d4-f79555493a37" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_3db54359-c662-4c5d-991b-d9f625fca2b6" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_926c8414-db27-48d7-b2d4-f79555493a37" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_1177ef89-a09b-461e-bfe2-129b4e96f30f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_926c8414-db27-48d7-b2d4-f79555493a37" xlink:to="loc_us-gaap_CostOfSalesMember_1177ef89-a09b-461e-bfe2-129b4e96f30f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementScenarioAxis_127287ce-38ad-406c-8581-6824cc45aedc" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_StatementScenarioAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:to="loc_srt_StatementScenarioAxis_127287ce-38ad-406c-8581-6824cc45aedc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_127287ce-38ad-406c-8581-6824cc45aedc_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_127287ce-38ad-406c-8581-6824cc45aedc" xlink:to="loc_srt_ScenarioUnspecifiedDomain_127287ce-38ad-406c-8581-6824cc45aedc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_a0c7950c-7b76-43c7-a065-d28802817b33" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_127287ce-38ad-406c-8581-6824cc45aedc" xlink:to="loc_srt_ScenarioUnspecifiedDomain_a0c7950c-7b76-43c7-a065-d28802817b33" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioForecastMember_bc841118-8651-455c-ab80-672475e7368d" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ScenarioForecastMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ScenarioUnspecifiedDomain_a0c7950c-7b76-43c7-a065-d28802817b33" xlink:to="loc_srt_ScenarioForecastMember_bc841118-8651-455c-ab80-672475e7368d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_963f1427-71e3-4910-8b0b-6afc03cdc510" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:to="loc_srt_ConsolidationItemsAxis_963f1427-71e3-4910-8b0b-6afc03cdc510" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_963f1427-71e3-4910-8b0b-6afc03cdc510_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_963f1427-71e3-4910-8b0b-6afc03cdc510" xlink:to="loc_srt_ConsolidationItemsDomain_963f1427-71e3-4910-8b0b-6afc03cdc510_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_4c700245-c009-4d16-953c-981a02045fb2" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_963f1427-71e3-4910-8b0b-6afc03cdc510" xlink:to="loc_srt_ConsolidationItemsDomain_4c700245-c009-4d16-953c-981a02045fb2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_8887f89c-b815-48be-9cce-79f093f86655" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_4c700245-c009-4d16-953c-981a02045fb2" xlink:to="loc_us-gaap_OperatingSegmentsMember_8887f89c-b815-48be-9cce-79f093f86655" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_6260f719-f52e-425c-b898-d3bb2a0e15d5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_33683df5-0de4-48c2-a79c-67ada67f2c8d" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_6260f719-f52e-425c-b898-d3bb2a0e15d5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_6260f719-f52e-425c-b898-d3bb2a0e15d5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_6260f719-f52e-425c-b898-d3bb2a0e15d5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_6260f719-f52e-425c-b898-d3bb2a0e15d5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_499d8eb1-77f2-457b-b5b7-47ce59311435" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_6260f719-f52e-425c-b898-d3bb2a0e15d5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_499d8eb1-77f2-457b-b5b7-47ce59311435" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_48fad0ad-a4da-446c-a53e-0764610b4007" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_499d8eb1-77f2-457b-b5b7-47ce59311435" xlink:to="loc_us-gaap_CommodityContractMember_48fad0ad-a4da-446c-a53e-0764610b4007" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails" xlink:type="extended" id="idf8e9c12a7a64bdea70ec0a4fc9c8025_SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_f880329e-3bb7-4b70-9316-2d85309d4e89" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_f880329e-3bb7-4b70-9316-2d85309d4e89" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_35556585-488e-4252-ba76-8ec4c79a2917" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_OperatingIncomeLoss_35556585-488e-4252-ba76-8ec4c79a2917" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_96adba51-b61a-452c-9ab9-62caf78cca95" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_96adba51-b61a-452c-9ab9-62caf78cca95" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_5ac1dc06-d6be-42b0-aed8-e6236b299e9b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_5ac1dc06-d6be-42b0-aed8-e6236b299e9b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_1bb4e95e-2dd0-4b25-8f2b-2faabdcc1896" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_RestructuringCharges_1bb4e95e-2dd0-4b25-8f2b-2faabdcc1896" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_90f495fe-5f2a-417c-83c0-764fbe2e0306" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_90f495fe-5f2a-417c-83c0-764fbe2e0306" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_4ac67db1-fc37-4937-8610-2ce7404b0aed" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_4ac67db1-fc37-4937-8610-2ce7404b0aed" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4cc48f0a-3d67-4bfa-82be-70ce632d4dff" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_4cc48f0a-3d67-4bfa-82be-70ce632d4dff" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_80e533f7-452b-4608-9c84-5b078051bbdc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_da94dbcc-6a55-4119-b5d5-3a4bc8ce9485" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_80e533f7-452b-4608-9c84-5b078051bbdc" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_9965cfba-2aeb-42f2-a681-e3f1df109be1" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_80e533f7-452b-4608-9c84-5b078051bbdc" xlink:to="loc_srt_ConsolidationItemsAxis_9965cfba-2aeb-42f2-a681-e3f1df109be1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_9965cfba-2aeb-42f2-a681-e3f1df109be1_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_9965cfba-2aeb-42f2-a681-e3f1df109be1" xlink:to="loc_srt_ConsolidationItemsDomain_9965cfba-2aeb-42f2-a681-e3f1df109be1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_ce0e5b34-b615-4d40-9f1f-ccb4a3475195" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_9965cfba-2aeb-42f2-a681-e3f1df109be1" xlink:to="loc_srt_ConsolidationItemsDomain_ce0e5b34-b615-4d40-9f1f-ccb4a3475195" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_ad65f1e9-e200-4d90-9589-5f1cb87c404d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_ce0e5b34-b615-4d40-9f1f-ccb4a3475195" xlink:to="loc_us-gaap_OperatingSegmentsMember_ad65f1e9-e200-4d90-9589-5f1cb87c404d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_adbfa7b1-d158-4f5b-9073-2434697d1f79" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_ce0e5b34-b615-4d40-9f1f-ccb4a3475195" xlink:to="loc_us-gaap_CorporateNonSegmentMember_adbfa7b1-d158-4f5b-9073-2434697d1f79" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_8f3aa8d2-8129-4575-a18c-181a4eaef8d6" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_MaterialReconcilingItemsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_ce0e5b34-b615-4d40-9f1f-ccb4a3475195" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_8f3aa8d2-8129-4575-a18c-181a4eaef8d6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_ed9d07b7-908d-44f3-a8b2-6c051b21bae0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_80e533f7-452b-4608-9c84-5b078051bbdc" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_ed9d07b7-908d-44f3-a8b2-6c051b21bae0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_ed9d07b7-908d-44f3-a8b2-6c051b21bae0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_ed9d07b7-908d-44f3-a8b2-6c051b21bae0" xlink:to="loc_us-gaap_SegmentDomain_ed9d07b7-908d-44f3-a8b2-6c051b21bae0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_9a249e89-ac4e-4140-81c3-7125b9aa3792" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_ed9d07b7-908d-44f3-a8b2-6c051b21bae0" xlink:to="loc_us-gaap_SegmentDomain_9a249e89-ac4e-4140-81c3-7125b9aa3792" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_17eb162b-7235-43ce-9cfb-a43b1dcb64e8" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9a249e89-ac4e-4140-81c3-7125b9aa3792" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_17eb162b-7235-43ce-9cfb-a43b1dcb64e8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_e6111008-31d4-4f24-9d6e-3742d9f958d2" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9a249e89-ac4e-4140-81c3-7125b9aa3792" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_e6111008-31d4-4f24-9d6e-3742d9f958d2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_637ca694-374d-4e9b-9984-9cafedd0dbf9" xlink:href="hsy-20220403.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9a249e89-ac4e-4140-81c3-7125b9aa3792" xlink:to="loc_hsy_InternationalSegmentMember_637ca694-374d-4e9b-9984-9cafedd0dbf9" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails" xlink:type="extended" id="id31ca8dbdb5d480cb0a791aac585b1e9_SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_a9af146d-227d-433a-8e77-91646e7498fe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_bd675d73-6c22-4fd0-8b58-3609df2e9408" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a9af146d-227d-433a-8e77-91646e7498fe" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_bd675d73-6c22-4fd0-8b58-3609df2e9408" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_438dd1d4-573f-4511-a6e0-a73161aa3fa9" xlink:href="hsy-20220403.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a9af146d-227d-433a-8e77-91646e7498fe" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_438dd1d4-573f-4511-a6e0-a73161aa3fa9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_b344db99-c2e0-4343-b00f-587d00d1cc41" xlink:href="hsy-20220403.xsd#hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a9af146d-227d-433a-8e77-91646e7498fe" xlink:to="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_b344db99-c2e0-4343-b00f-587d00d1cc41" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_fa3697e7-18a4-4114-99ed-31763355792d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_a9af146d-227d-433a-8e77-91646e7498fe" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_fa3697e7-18a4-4114-99ed-31763355792d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_4d4920b2-6101-4e34-9d8b-35a0a0583d9c" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_fa3697e7-18a4-4114-99ed-31763355792d" xlink:to="loc_us-gaap_HedgingDesignationAxis_4d4920b2-6101-4e34-9d8b-35a0a0583d9c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_4d4920b2-6101-4e34-9d8b-35a0a0583d9c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_4d4920b2-6101-4e34-9d8b-35a0a0583d9c" xlink:to="loc_us-gaap_HedgingDesignationDomain_4d4920b2-6101-4e34-9d8b-35a0a0583d9c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_d4ca64a8-f6f3-42c0-9afe-8afdcc14a889" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_4d4920b2-6101-4e34-9d8b-35a0a0583d9c" xlink:to="loc_us-gaap_HedgingDesignationDomain_d4ca64a8-f6f3-42c0-9afe-8afdcc14a889" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_55c21f67-2c47-4259-a72c-41bca922aa86" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_d4ca64a8-f6f3-42c0-9afe-8afdcc14a889" xlink:to="loc_us-gaap_NondesignatedMember_55c21f67-2c47-4259-a72c-41bca922aa86" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_13d05402-a22b-4e41-983c-c12df4773c79" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_fa3697e7-18a4-4114-99ed-31763355792d" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_13d05402-a22b-4e41-983c-c12df4773c79" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_13d05402-a22b-4e41-983c-c12df4773c79_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_13d05402-a22b-4e41-983c-c12df4773c79" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_13d05402-a22b-4e41-983c-c12df4773c79_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_331f9de1-6681-4f16-9a89-43c55a7b7ffa" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_13d05402-a22b-4e41-983c-c12df4773c79" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_331f9de1-6681-4f16-9a89-43c55a7b7ffa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_7cb1304a-87e1-48ec-9ab1-71b5322cee9d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_331f9de1-6681-4f16-9a89-43c55a7b7ffa" xlink:to="loc_us-gaap_CommodityContractMember_7cb1304a-87e1-48ec-9ab1-71b5322cee9d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_c795d836-c459-41d1-9d1b-dcdc2aa09550" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_fa3697e7-18a4-4114-99ed-31763355792d" xlink:to="loc_srt_ConsolidationItemsAxis_c795d836-c459-41d1-9d1b-dcdc2aa09550" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_c795d836-c459-41d1-9d1b-dcdc2aa09550_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_c795d836-c459-41d1-9d1b-dcdc2aa09550" xlink:to="loc_srt_ConsolidationItemsDomain_c795d836-c459-41d1-9d1b-dcdc2aa09550_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_3ffa6f5c-b659-4f4c-960f-b34413758e64" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_c795d836-c459-41d1-9d1b-dcdc2aa09550" xlink:to="loc_srt_ConsolidationItemsDomain_3ffa6f5c-b659-4f4c-960f-b34413758e64" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_95f12c39-5753-4693-9e27-f11879bac31d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_3ffa6f5c-b659-4f4c-960f-b34413758e64" xlink:to="loc_us-gaap_OperatingSegmentsMember_95f12c39-5753-4693-9e27-f11879bac31d" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails" xlink:type="extended" id="id871ef182cc84bc3a61c218a8850b1c3_SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_aa513932-0fbd-4035-a3cc-eb1b2b6faf8f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_b83dc369-9727-427e-a8af-67f8ee82c3bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_aa513932-0fbd-4035-a3cc-eb1b2b6faf8f" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_b83dc369-9727-427e-a8af-67f8ee82c3bc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35ddfae7-fa8f-414f-818d-c4a8b0589a80" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_aa513932-0fbd-4035-a3cc-eb1b2b6faf8f" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35ddfae7-fa8f-414f-818d-c4a8b0589a80" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_3df5a751-0680-4b2d-8b8a-497dd7a44ee5" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35ddfae7-fa8f-414f-818d-c4a8b0589a80" xlink:to="loc_srt_ConsolidationItemsAxis_3df5a751-0680-4b2d-8b8a-497dd7a44ee5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_3df5a751-0680-4b2d-8b8a-497dd7a44ee5_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_3df5a751-0680-4b2d-8b8a-497dd7a44ee5" xlink:to="loc_srt_ConsolidationItemsDomain_3df5a751-0680-4b2d-8b8a-497dd7a44ee5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_55a27c89-80d3-496b-b0ca-88d86f823cdd" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_3df5a751-0680-4b2d-8b8a-497dd7a44ee5" xlink:to="loc_srt_ConsolidationItemsDomain_55a27c89-80d3-496b-b0ca-88d86f823cdd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_78e95280-1f05-4d94-af35-ad9ffb64c8bd" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_55a27c89-80d3-496b-b0ca-88d86f823cdd" xlink:to="loc_us-gaap_OperatingSegmentsMember_78e95280-1f05-4d94-af35-ad9ffb64c8bd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_e1de9a8c-2383-4c2e-a68d-d4e5dffaf637" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_55a27c89-80d3-496b-b0ca-88d86f823cdd" xlink:to="loc_us-gaap_CorporateNonSegmentMember_e1de9a8c-2383-4c2e-a68d-d4e5dffaf637" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_7a642f35-50a5-4129-8662-c0fd8910cd66" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_35ddfae7-fa8f-414f-818d-c4a8b0589a80" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_7a642f35-50a5-4129-8662-c0fd8910cd66" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_7a642f35-50a5-4129-8662-c0fd8910cd66_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7a642f35-50a5-4129-8662-c0fd8910cd66" xlink:to="loc_us-gaap_SegmentDomain_7a642f35-50a5-4129-8662-c0fd8910cd66_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_7a642f35-50a5-4129-8662-c0fd8910cd66" xlink:to="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_63aa7795-8117-44d7-9888-61b1e9db3134" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_63aa7795-8117-44d7-9888-61b1e9db3134" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_3c57e084-0c88-4bf3-a071-9417bbffd4ce" xlink:href="hsy-20220403.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_3c57e084-0c88-4bf3-a071-9417bbffd4ce" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_def274a4-ec56-4729-8dfb-35cfdf446c1a" xlink:href="hsy-20220403.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:to="loc_hsy_InternationalSegmentMember_def274a4-ec56-4729-8dfb-35cfdf446c1a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_0568f124-add2-417b-90f9-ca9a90c71a85" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_17673642-04e3-48d8-841a-62b33e8ccb8f" xlink:to="loc_us-gaap_CorporateMember_0568f124-add2-417b-90f9-ca9a90c71a85" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails" xlink:type="extended" id="ie72a699e32a84ddc8c01aebfff3268fd_SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_2ed503ac-1692-43c7-9267-39efc77d61a0" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_12198978-f7a0-4ea6-9a1d-01e3e3a617e7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_2ed503ac-1692-43c7-9267-39efc77d61a0" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_12198978-f7a0-4ea6-9a1d-01e3e3a617e7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_150e7f92-16f1-4c9f-a4a6-49208d32fec2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_2ed503ac-1692-43c7-9267-39efc77d61a0" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_150e7f92-16f1-4c9f-a4a6-49208d32fec2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_914b120d-dbb9-4f8a-8d68-88951c8eae49" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_150e7f92-16f1-4c9f-a4a6-49208d32fec2" xlink:to="loc_srt_StatementGeographicalAxis_914b120d-dbb9-4f8a-8d68-88951c8eae49" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_914b120d-dbb9-4f8a-8d68-88951c8eae49_default" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_914b120d-dbb9-4f8a-8d68-88951c8eae49" xlink:to="loc_srt_SegmentGeographicalDomain_914b120d-dbb9-4f8a-8d68-88951c8eae49_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_467f3295-c0eb-4b75-a569-63d66e063a61" xlink:href="https://xbrl.fasb.org/srt/2021/elts/srt-2021-01-31.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_914b120d-dbb9-4f8a-8d68-88951c8eae49" xlink:to="loc_srt_SegmentGeographicalDomain_467f3295-c0eb-4b75-a569-63d66e063a61" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_7e9e4117-e635-4cfa-adeb-ead4e3d134ef" xlink:href="https://xbrl.sec.gov/country/2021/country-2021.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_467f3295-c0eb-4b75-a569-63d66e063a61" xlink:to="loc_country_US_7e9e4117-e635-4cfa-adeb-ead4e3d134ef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonUsMember_4c69d9b7-e2d2-4e2f-96b8-626c3efa53d7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_NonUsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_467f3295-c0eb-4b75-a569-63d66e063a61" xlink:to="loc_us-gaap_NonUsMember_4c69d9b7-e2d2-4e2f-96b8-626c3efa53d7" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="extended" id="i7a7e190251e74b2084ee7972693b1141_TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_131f0eda-e53a-4854-9b91-03b02121b26f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_131f0eda-e53a-4854-9b91-03b02121b26f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_8858d7a2-5d7f-464f-997f-1cd0eb010145" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_8858d7a2-5d7f-464f-997f-1cd0eb010145" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockChangeinShares_b02c599a-c283-4d70-add9-31770cba0e5a" xlink:href="hsy-20220403.xsd#hsy_TreasuryStockChangeinShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_hsy_TreasuryStockChangeinShares_b02c599a-c283-4d70-add9-31770cba0e5a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_1d94f062-3cd9-42d0-89a6-fdc59705dac7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_1d94f062-3cd9-42d0-89a6-fdc59705dac7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_71c6149a-0f6d-4197-b672-5071359986d3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_71c6149a-0f6d-4197-b672-5071359986d3" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockChangeinValue_2f02959e-cf84-426a-8abf-fb80817ed382" xlink:href="hsy-20220403.xsd#hsy_TreasuryStockChangeinValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_hsy_TreasuryStockChangeinValue_2f02959e-cf84-426a-8abf-fb80817ed382" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_f02d2470-9ed7-4327-bb7f-5dc723218cfe" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfStockByClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_b84920d9-ca6b-4e1a-99c1-8c30869334cf" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_f02d2470-9ed7-4327-bb7f-5dc723218cfe" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_b6f3d202-674c-4cb5-9499-c9f8a337fc5f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_f02d2470-9ed7-4327-bb7f-5dc723218cfe" xlink:to="loc_us-gaap_StatementClassOfStockAxis_b6f3d202-674c-4cb5-9499-c9f8a337fc5f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_b6f3d202-674c-4cb5-9499-c9f8a337fc5f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_b6f3d202-674c-4cb5-9499-c9f8a337fc5f" xlink:to="loc_us-gaap_ClassOfStockDomain_b6f3d202-674c-4cb5-9499-c9f8a337fc5f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_2b57b0df-293d-44c7-842b-cbc84faa342d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_b6f3d202-674c-4cb5-9499-c9f8a337fc5f" xlink:to="loc_us-gaap_ClassOfStockDomain_2b57b0df-293d-44c7-842b-cbc84faa342d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_HersheyCommonStockMember_8048ff3a-0dcf-48ed-b5ca-e3259ccd8486" xlink:href="hsy-20220403.xsd#hsy_HersheyCommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_2b57b0df-293d-44c7-842b-cbc84faa342d" xlink:to="loc_hsy_HersheyCommonStockMember_8048ff3a-0dcf-48ed-b5ca-e3259ccd8486" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_fbe76465-97af-4ac9-aefe-4329258ddb6d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_f02d2470-9ed7-4327-bb7f-5dc723218cfe" xlink:to="loc_us-gaap_AwardTypeAxis_fbe76465-97af-4ac9-aefe-4329258ddb6d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_fbe76465-97af-4ac9-aefe-4329258ddb6d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_fbe76465-97af-4ac9-aefe-4329258ddb6d" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_fbe76465-97af-4ac9-aefe-4329258ddb6d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5b4843c2-5913-4c92-9cbb-938213039c54" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_fbe76465-97af-4ac9-aefe-4329258ddb6d" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5b4843c2-5913-4c92-9cbb-938213039c54" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_HersheyTrustCompanyMember_2c48ace4-1549-4434-8413-6899b622f0c2" xlink:href="hsy-20220403.xsd#hsy_HersheyTrustCompanyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5b4843c2-5913-4c92-9cbb-938213039c54" xlink:to="loc_hsy_HersheyTrustCompanyMember_2c48ace4-1549-4434-8413-6899b622f0c2" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#TREASURYSTOCKACTIVITYNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYNARRATIVEDetails" xlink:type="extended" id="ie91b838d0c8f4ed1897c0ccd1b7e8353_TREASURYSTOCKACTIVITYNARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EquityClassOfTreasuryStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_f0e23c9c-a9d2-4c86-8dcb-a10bc66166cf" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_f0e23c9c-a9d2-4c86-8dcb-a10bc66166cf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_753ad0ce-1c1f-4b3e-a129-697332ce470d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_TreasuryStockAcquiredAverageCostPerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_753ad0ce-1c1f-4b3e-a129-697332ce470d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_a42e9e4f-e6bf-4a1c-9fe1-5caea09a59fc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_a42e9e4f-e6bf-4a1c-9fe1-5caea09a59fc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_b7c9c3a7-f0cc-4a6f-a56f-53c72bd5b57a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockRepurchaseProgramAuthorizedAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_b7c9c3a7-f0cc-4a6f-a56f-53c72bd5b57a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_0de49575-d546-4912-8693-2a459b10db4f" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_0de49575-d546-4912-8693-2a459b10db4f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfTreasuryStockTable_5fb09889-1390-46a1-9194-47b0a1d3d84a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfTreasuryStockTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_c8b83f16-aae5-48d5-b9fe-3a220411083b" xlink:to="loc_us-gaap_ClassOfTreasuryStockTable_5fb09889-1390-46a1-9194-47b0a1d3d84a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_c03ddbec-c6c1-451b-a057-6c3a125c8f94" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_5fb09889-1390-46a1-9194-47b0a1d3d84a" xlink:to="loc_us-gaap_AwardTypeAxis_c03ddbec-c6c1-451b-a057-6c3a125c8f94" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_c03ddbec-c6c1-451b-a057-6c3a125c8f94_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_c03ddbec-c6c1-451b-a057-6c3a125c8f94" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_c03ddbec-c6c1-451b-a057-6c3a125c8f94_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5818c42e-452b-4ce4-a7b7-f5b6da26a9bc" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_c03ddbec-c6c1-451b-a057-6c3a125c8f94" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5818c42e-452b-4ce4-a7b7-f5b6da26a9bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_HersheyTrustCompanyMember_74cc6a9a-0fb3-4f13-87cd-4841e03e1fbe" xlink:href="hsy-20220403.xsd#hsy_HersheyTrustCompanyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5818c42e-452b-4ce4-a7b7-f5b6da26a9bc" xlink:to="loc_hsy_HersheyTrustCompanyMember_74cc6a9a-0fb3-4f13-87cd-4841e03e1fbe" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareRepurchaseProgramAxis_117c0df5-e50d-4d92-99f8-147697243c42" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareRepurchaseProgramAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_5fb09889-1390-46a1-9194-47b0a1d3d84a" xlink:to="loc_us-gaap_ShareRepurchaseProgramAxis_117c0df5-e50d-4d92-99f8-147697243c42" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_117c0df5-e50d-4d92-99f8-147697243c42_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_117c0df5-e50d-4d92-99f8-147697243c42" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_117c0df5-e50d-4d92-99f8-147697243c42_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareRepurchaseProgramDomain_9ee8b737-0b95-411e-987a-029929a7c33d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShareRepurchaseProgramAxis_117c0df5-e50d-4d92-99f8-147697243c42" xlink:to="loc_us-gaap_ShareRepurchaseProgramDomain_9ee8b737-0b95-411e-987a-029929a7c33d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_A2018ShareRepurchaseProgramMember_a19747a1-b44d-4d01-8bcc-3f340ddbbd8d" xlink:href="hsy-20220403.xsd#hsy_A2018ShareRepurchaseProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareRepurchaseProgramDomain_9ee8b737-0b95-411e-987a-029929a7c33d" xlink:to="loc_hsy_A2018ShareRepurchaseProgramMember_a19747a1-b44d-4d01-8bcc-3f340ddbbd8d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_A2021ShareRepurchaseProgramMember_fbc8e748-0b44-4d35-bd7a-e18b9a3dc209" xlink:href="hsy-20220403.xsd#hsy_A2021ShareRepurchaseProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareRepurchaseProgramDomain_9ee8b737-0b95-411e-987a-029929a7c33d" xlink:to="loc_hsy_A2021ShareRepurchaseProgramMember_fbc8e748-0b44-4d35-bd7a-e18b9a3dc209" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="extended" id="i6fe791d158b74994871f8dad1f0f5e75_EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicLineItems_1506cca8-f895-462e-83e8-4701e7da0a29" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareBasicLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareBasicTwoClassMethodAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_1506cca8-f895-462e-83e8-4701e7da0a29" xlink:to="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_41d2982c-77ed-4cf1-8411-fe1b69fcaab3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_Dividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:to="loc_us-gaap_Dividends_41d2982c-77ed-4cf1-8411-fe1b69fcaab3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_7cd6d44f-4d34-4969-819e-dfd72182ca7e" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_7cd6d44f-4d34-4969-819e-dfd72182ca7e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_bb8b15d5-e69e-4492-8e15-23d2c7a918ef" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_bb8b15d5-e69e-4492-8e15-23d2c7a918ef" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_13ad98c3-1c10-41db-b75a-9ae8d72c8d5a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_13ad98c3-1c10-41db-b75a-9ae8d72c8d5a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_08b06678-71a8-4fb3-bc03-0032dac6902b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_8f50bb53-61c0-4697-aed0-b60b388994be" xlink:to="loc_us-gaap_EarningsPerShareBasic_08b06678-71a8-4fb3-bc03-0032dac6902b" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_1506cca8-f895-462e-83e8-4701e7da0a29" xlink:to="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_d69e0e83-ad0d-48ed-9368-faa718c5cbc2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_fa0c15e2-946f-4367-95f1-a73c88803f2b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_DistributedEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_DistributedEarnings_fa0c15e2-946f-4367-95f1-a73c88803f2b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_611b83b6-ae06-404c-bb4e-aa80e361e7cb" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_611b83b6-ae06-404c-bb4e-aa80e361e7cb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_958f6942-bff5-462a-a24f-17e1ac17ce4a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_958f6942-bff5-462a-a24f-17e1ac17ce4a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_d64c3349-498f-4961-936f-534ca7f348f5" xlink:href="hsy-20220403.xsd#hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_d64c3349-498f-4961-936f-534ca7f348f5" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_60ce2310-b56d-445f-b2b0-7df3ecc21ae1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_60ce2310-b56d-445f-b2b0-7df3ecc21ae1" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_66f47b3f-b211-45e0-9cdb-4c28bdfd3b49" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_66f47b3f-b211-45e0-9cdb-4c28bdfd3b49" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_381f1d67-3242-4452-9474-6a7035d8717a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_4e365a0e-50c2-4ea0-a9a6-3738ff2939d1" xlink:to="loc_us-gaap_EarningsPerShareDiluted_381f1d67-3242-4452-9474-6a7035d8717a" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_eb4e2af5-973b-4116-b5e5-89ae5ff2ec84" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_1506cca8-f895-462e-83e8-4701e7da0a29" xlink:to="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_eb4e2af5-973b-4116-b5e5-89ae5ff2ec84" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_eb4e2af5-973b-4116-b5e5-89ae5ff2ec84" xlink:to="loc_us-gaap_StatementClassOfStockAxis_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4" xlink:to="loc_us-gaap_ClassOfStockDomain_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_53176282-ead3-44bc-bfdd-2b298764e444" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3ceff397-e8a8-4f6c-97e6-cf017bfb79c4" xlink:to="loc_us-gaap_ClassOfStockDomain_53176282-ead3-44bc-bfdd-2b298764e444" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_88c63bda-8b42-4311-9fb7-290c86d6dce2" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_53176282-ead3-44bc-bfdd-2b298764e444" xlink:to="loc_us-gaap_CommonStockMember_88c63bda-8b42-4311-9fb7-290c86d6dce2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_781f7d07-fdc4-49ad-a5d9-4e46e412a68a" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_53176282-ead3-44bc-bfdd-2b298764e444" xlink:to="loc_us-gaap_CommonClassBMember_781f7d07-fdc4-49ad-a5d9-4e46e412a68a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_7dbd4609-cb6f-43ba-8911-c437e7ec02be" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_eb4e2af5-973b-4116-b5e5-89ae5ff2ec84" xlink:to="loc_us-gaap_AwardTypeAxis_7dbd4609-cb6f-43ba-8911-c437e7ec02be" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7dbd4609-cb6f-43ba-8911-c437e7ec02be_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_7dbd4609-cb6f-43ba-8911-c437e7ec02be" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7dbd4609-cb6f-43ba-8911-c437e7ec02be_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4630e1a7-2b4d-44c8-9dbc-babe483eac5b" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_7dbd4609-cb6f-43ba-8911-c437e7ec02be" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4630e1a7-2b4d-44c8-9dbc-babe483eac5b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_51e648a4-9b7b-42a8-ac8f-84bfac1ec8f1" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4630e1a7-2b4d-44c8-9dbc-babe483eac5b" xlink:to="loc_us-gaap_EmployeeStockOptionMember_51e648a4-9b7b-42a8-ac8f-84bfac1ec8f1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_398ded2c-6820-4928-bba1-0aee1a772cb1" xlink:href="hsy-20220403.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_4630e1a7-2b4d-44c8-9dbc-babe483eac5b" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_398ded2c-6820-4928-bba1-0aee1a772cb1" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARENARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20220403.xsd#EARNINGSPERSHARENARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARENARRATIVEDetails" xlink:type="extended" id="if97a60f0bdb84332a178d697786ed652_EARNINGSPERSHARENARRATIVEDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_c85f15b9-a938-4927-9ea6-fe09eaad21d5" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_a0f44f17-1d57-4428-8f09-5c8be730afde" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_c85f15b9-a938-4927-9ea6-fe09eaad21d5" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_a0f44f17-1d57-4428-8f09-5c8be730afde" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_f989c18a-dc57-4c47-b3f2-47e7ac3ea6c3" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_c85f15b9-a938-4927-9ea6-fe09eaad21d5" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_f989c18a-dc57-4c47-b3f2-47e7ac3ea6c3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_068a5643-3588-489f-8c1e-2a84dcee8d0d" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_f989c18a-dc57-4c47-b3f2-47e7ac3ea6c3" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_068a5643-3588-489f-8c1e-2a84dcee8d0d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_068a5643-3588-489f-8c1e-2a84dcee8d0d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_068a5643-3588-489f-8c1e-2a84dcee8d0d" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_068a5643-3588-489f-8c1e-2a84dcee8d0d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7507b62f-daed-4ecd-ac08-d86f1ac046a9" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_068a5643-3588-489f-8c1e-2a84dcee8d0d" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7507b62f-daed-4ecd-ac08-d86f1ac046a9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_edf0e386-529d-4c94-99b9-6f0b21a803b7" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_7507b62f-daed-4ecd-ac08-d86f1ac046a9" xlink:to="loc_us-gaap_EmployeeStockOptionMember_edf0e386-529d-4c94-99b9-6f0b21a803b7" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-roles-2021-01-31.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2021/elts/us-gaap-2021-01-31.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:type="arc" order="0"/>
  </link:definitionLink>
</link:linkbase>
