<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>830</ContextCount>
  <ElementCount>616</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>197</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00000002 - Statement - Consolidated statements of financial position</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/StatementsOfFinancialPosition</Role>
      <ShortName>Consolidated statements of financial position</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00000003 - Statement - Consolidated statements of income and comprehensive income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/StatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated statements of income and comprehensive income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00000004 - Statement - Consolidated statements of changes in equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/StatementsOfChangesInEquity</Role>
      <ShortName>Consolidated statements of changes in equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00000005 - Statement - Consolidated statements of cash flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/StatementsOfCashFlows</Role>
      <ShortName>Consolidated statements of cash flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00000006 - Disclosure - 1 Corporate information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CorporateInformation</Role>
      <ShortName>1 Corporate information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00000007 - Disclosure - 2 Significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPolicies</Role>
      <ShortName>2 Significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>00000008 - Disclosure - 3 Significant accounting estimates and assumptions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingEstimatesAndAssumptions</Role>
      <ShortName>3 Significant accounting estimates and assumptions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>00000009 - Disclosure - 4 Segment information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SegmentInformation</Role>
      <ShortName>4 Segment information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>00000010 - Disclosure - 5 Business combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinations</Role>
      <ShortName>5 Business combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>00000011 - Disclosure - 6 Cash and cash equivalents</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CashAndCashEquivalents</Role>
      <ShortName>6 Cash and cash equivalents</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>00000012 - Disclosure - 7 Restricted cash</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RestrictedCash</Role>
      <ShortName>7 Restricted cash</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>00000013 - Disclosure - 8 Trade receivables</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/TradeReceivables</Role>
      <ShortName>8 Trade receivables</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>00000014 - Disclosure - 9 Related parties</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RelatedParties</Role>
      <ShortName>9 Related parties</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>00000015 - Disclosure - 10 Investment in associate</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InvestmentInAssociate</Role>
      <ShortName>10 Investment in associate</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>00000016 - Disclosure - 11 Property and equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/PropertyAndEquipment</Role>
      <ShortName>11 Property and equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>00000017 - Disclosure - 12 Intangible assets and goodwill</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwill</Role>
      <ShortName>12 Intangible assets and goodwill</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>00000018 - Disclosure - 13 Financial assets and financial liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilities</Role>
      <ShortName>13 Financial assets and financial liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>00000019 - Disclosure - 14 Fair value measurement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FairValueMeasurement</Role>
      <ShortName>14 Fair value measurement</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>00000020 - Disclosure - 15 Capital management</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CapitalManagement</Role>
      <ShortName>15 Capital management</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>00000021 - Disclosure - 16 Labor and social obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligations</Role>
      <ShortName>16 Labor and social obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>00000022 - Disclosure - 17 Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/Equity</Role>
      <ShortName>17 Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>00000023 - Disclosure - 18 Earnings per share (EPS)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/EarningsPerShareEps</Role>
      <ShortName>18 Earnings per share (EPS)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>00000024 - Disclosure - 19 Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/Revenue</Role>
      <ShortName>19 Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>00000025 - Disclosure - 20 Expenses and cost by nature</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/ExpensesAndCostByNature</Role>
      <ShortName>20 Expenses and cost by nature</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>00000026 - Disclosure - 21 Finance result</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinanceResult</Role>
      <ShortName>21 Finance result</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>00000027 - Disclosure -  22 Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IncomeTaxes</Role>
      <ShortName>22 Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>00000028 - Disclosure - 23 Insurance contracts and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InsuranceContractsAndContingencies</Role>
      <ShortName>23 Insurance contracts and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>00000029 - Disclosure - 24 Non-cash transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/Non-cashTransactions</Role>
      <ShortName>24 Non-cash transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>00000030 - Disclosure - 25 Subsequent events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SubsequentEvents</Role>
      <ShortName>25 Subsequent events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>00000031 - Disclosure - 2 Significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesPolicies</Role>
      <ShortName>2 Significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>00000032 - Disclosure - 2 Significant accounting policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesTables</Role>
      <ShortName>2 Significant accounting policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPolicies</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>00000033 - Disclosure - 4 Segment information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SegmentInformationTables</Role>
      <ShortName>4 Segment information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/SegmentInformation</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>00000034 - Disclosure - 5 Business combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsTables</Role>
      <ShortName>5 Business combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinations</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>00000035 - Disclosure - 6 Cash and cash equivalents (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CashAndCashEquivalentsTables</Role>
      <ShortName>6 Cash and cash equivalents (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/CashAndCashEquivalents</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>00000036 - Disclosure - 7 Restricted cash (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RestrictedCashTables</Role>
      <ShortName>7 Restricted cash (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/RestrictedCash</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>00000037 - Disclosure - 8 Trade receivables (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/TradeReceivablesTables</Role>
      <ShortName>8 Trade receivables (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/TradeReceivables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>00000038 - Disclosure - 9 Related parties (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RelatedPartiesTables</Role>
      <ShortName>9 Related parties (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/RelatedParties</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>00000039 - Disclosure - 10 Investment in associate (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InvestmentInAssociateTables</Role>
      <ShortName>10 Investment in associate (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/InvestmentInAssociate</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>00000040 - Disclosure - 11 Property and equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/PropertyAndEquipmentTables</Role>
      <ShortName>11 Property and equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/PropertyAndEquipment</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>00000041 - Disclosure - 12 Intangible assets and goodwill (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwillTables</Role>
      <ShortName>12 Intangible assets and goodwill (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/IntangibleAssetsAndGoodwill</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>00000042 - Disclosure - 13 Financial assets and financial liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</Role>
      <ShortName>13 Financial assets and financial liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilities</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>00000043 - Disclosure - 14 Fair value measurement (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FairValueMeasurementTables</Role>
      <ShortName>14 Fair value measurement (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/FairValueMeasurement</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>00000044 - Disclosure - 15 Capital management (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CapitalManagementTables</Role>
      <ShortName>15 Capital management (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/CapitalManagement</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>00000045 - Disclosure - 16 Labor and social obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsTables</Role>
      <ShortName>16 Labor and social obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligations</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>00000046 - Disclosure - 18 Earnings per share (EPS) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/EarningsPerShareEpsTables</Role>
      <ShortName>18 Earnings per share (EPS) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/EarningsPerShareEps</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>00000047 - Disclosure - 19 Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RevenueTables</Role>
      <ShortName>19 Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/Revenue</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>00000048 - Disclosure - 20 Expenses and cost by nature (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/ExpensesAndCostByNatureTables</Role>
      <ShortName>20 Expenses and cost by nature (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/ExpensesAndCostByNature</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>00000049 - Disclosure - 21 Finance result (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinanceResultTables</Role>
      <ShortName>21 Finance result (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinanceResult</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>00000050 - Disclosure -  22 Income taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IncomeTaxesTables</Role>
      <ShortName>22 Income taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/IncomeTaxes</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>00000051 - Disclosure - 23 Insurance contracts and contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InsuranceContractsAndContingenciesTables</Role>
      <ShortName>23 Insurance contracts and contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://afya.com.br/role/InsuranceContractsAndContingencies</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>00000052 - Disclosure - 1 Corporate information (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CorporateInformationDetailsNarrative</Role>
      <ShortName>1 Corporate information (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/CorporateInformation</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>00000053 - Disclosure - 2 Significant accounting policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesDetails</Role>
      <ShortName>2 Significant accounting policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>00000054 - Disclosure - 2 Significant accounting policies (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesDetails1</Role>
      <ShortName>2 Significant accounting policies (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>00000055 - Disclosure - 2 Significant accounting policies (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesDetails2</Role>
      <ShortName>2 Significant accounting policies (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>00000056 - Disclosure - 2 Significant accounting policies (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesDetails3</Role>
      <ShortName>2 Significant accounting policies (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>00000057 - Disclosure - 2 Significant accounting policies (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SignificantAccountingPoliciesDetailsNarrative</Role>
      <ShortName>2 Significant accounting policies (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SignificantAccountingPoliciesTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>00000058 - Disclosure - 4 Segment information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SegmentInformationDetails</Role>
      <ShortName>4 Segment information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SegmentInformationTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>00000059 - Disclosure - 4 Segment information (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SegmentInformationDetails1</Role>
      <ShortName>4 Segment information (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SegmentInformationTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>00000060 - Disclosure - 4 Segment information (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SegmentInformationDetailsNarrative</Role>
      <ShortName>4 Segment information (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SegmentInformationTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>00000061 - Disclosure - 5 Business combinations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails</Role>
      <ShortName>5 Business combinations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>00000062 - Disclosure - 5 Business combinations (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails1</Role>
      <ShortName>5 Business combinations (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>00000063 - Disclosure - 5 Business combinations (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails2</Role>
      <ShortName>5 Business combinations (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>00000064 - Disclosure - 5 Business combinations (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails3</Role>
      <ShortName>5 Business combinations (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>00000065 - Disclosure - 5 Business combinations (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails4</Role>
      <ShortName>5 Business combinations (Details 4)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>00000066 - Disclosure - 5 Business combinations (Details 5)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails5</Role>
      <ShortName>5 Business combinations (Details 5)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>00000067 - Disclosure - 5 Business combinations (Details 6)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails6</Role>
      <ShortName>5 Business combinations (Details 6)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>00000068 - Disclosure - 5 Business combinations (Details 7)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails7</Role>
      <ShortName>5 Business combinations (Details 7)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>00000069 - Disclosure - 5 Business combinations (Details 8)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails8</Role>
      <ShortName>5 Business combinations (Details 8)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>00000070 - Disclosure - 5 Business combinations (Details 9)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetails9</Role>
      <ShortName>5 Business combinations (Details 9)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>00000071 - Disclosure - 5 Business combinations (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetailsNarrative</Role>
      <ShortName>5 Business combinations (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>00000072 - Disclosure - 5 Business combinations (Details Narrative 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/BusinessCombinationsDetailsNarrative1</Role>
      <ShortName>5 Business combinations (Details Narrative 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/BusinessCombinationsTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>00000073 - Disclosure - 6 Cash and cash equivalents (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CashAndCashEquivalentsDetails</Role>
      <ShortName>6 Cash and cash equivalents (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/CashAndCashEquivalentsTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>00000074 - Disclosure - 6 Cash and cash equivalents (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CashAndCashEquivalentsDetailsNarrative</Role>
      <ShortName>6 Cash and cash equivalents (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/CashAndCashEquivalentsTables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>00000075 - Disclosure - 7 Restricted cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RestrictedCashDetails</Role>
      <ShortName>7 Restricted cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RestrictedCashTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>00000076 - Disclosure - 7 Restricted cash (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RestrictedCashDetailsNarrative</Role>
      <ShortName>7 Restricted cash (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RestrictedCashTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>00000077 - Disclosure - 8 Trade receivables (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/TradeReceivablesDetails</Role>
      <ShortName>8 Trade receivables (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/TradeReceivablesTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>00000078 - Disclosure - 8 Trade receivables (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/TradeReceivablesDetails1</Role>
      <ShortName>8 Trade receivables (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/TradeReceivablesTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>00000079 - Disclosure - 8 Trade receivables (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/TradeReceivablesDetails2</Role>
      <ShortName>8 Trade receivables (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/TradeReceivablesTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>00000080 - Disclosure - 9 Related parties (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RelatedPartiesDetails</Role>
      <ShortName>9 Related parties (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RelatedPartiesTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>00000081 - Disclosure - 9 Related parties (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RelatedPartiesDetails1</Role>
      <ShortName>9 Related parties (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RelatedPartiesTables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>00000082 - Disclosure - 9 Related parties (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RelatedPartiesDetailsNarrative</Role>
      <ShortName>9 Related parties (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RelatedPartiesTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>00000083 - Disclosure - 10 Investment in associate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InvestmentInAssociateDetails</Role>
      <ShortName>10 Investment in associate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/InvestmentInAssociateTables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>00000084 - Disclosure - 10 Investment in associate (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InvestmentInAssociateDetailsNarrative</Role>
      <ShortName>10 Investment in associate (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/InvestmentInAssociateTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>00000085 - Disclosure - 11 Property and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/PropertyAndEquipmentDetails</Role>
      <ShortName>11 Property and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/PropertyAndEquipmentTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>00000086 - Disclosure - 12 Intangible assets and goodwill (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwillDetails</Role>
      <ShortName>12 Intangible assets and goodwill (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/IntangibleAssetsAndGoodwillTables</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>00000087 - Disclosure - 12 Intangible assets and goodwill (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwillDetails1</Role>
      <ShortName>12 Intangible assets and goodwill (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/IntangibleAssetsAndGoodwillTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>00000088 - Disclosure - 12 Intangible assets and goodwill (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwillDetails2</Role>
      <ShortName>12 Intangible assets and goodwill (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/IntangibleAssetsAndGoodwillTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>00000089 - Disclosure - 12 Intangible assets and goodwill (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IntangibleAssetsAndGoodwillDetailsNarrative</Role>
      <ShortName>12 Intangible assets and goodwill (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/IntangibleAssetsAndGoodwillTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>00000090 - Disclosure - 13 Financial assets and financial liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails</Role>
      <ShortName>13 Financial assets and financial liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>00000091 - Disclosure - 13 Financial assets and financial liabilities (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails1</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>00000092 - Disclosure - 13 Financial assets and financial liabilities (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails2</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>92</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>00000093 - Disclosure - 13 Financial assets and financial liabilities (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails3</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>00000094 - Disclosure - 13 Financial assets and financial liabilities (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails4</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 4)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>00000095 - Disclosure - 13 Financial assets and financial liabilities (Details 5)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails5</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 5)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>95</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>00000096 - Disclosure - 13 Financial assets and financial liabilities (Details 6)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails6</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 6)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>00000097 - Disclosure - 13 Financial assets and financial liabilities (Details 7)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails7</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 7)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>00000098 - Disclosure - 13 Financial assets and financial liabilities (Details 8)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails8</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 8)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>98</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>00000099 - Disclosure - 13 Financial assets and financial liabilities (Details 9)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails9</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 9)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>99</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>00000100 - Disclosure - 13 Financial assets and financial liabilities (Details 10)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails10</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 10)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>00000101 - Disclosure - 13 Financial assets and financial liabilities (Details 11)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetails11</Role>
      <ShortName>13 Financial assets and financial liabilities (Details 11)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>00000102 - Disclosure - 13 Financial assets and financial liabilities (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesDetailsNarrative</Role>
      <ShortName>13 Financial assets and financial liabilities (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinancialAssetsAndFinancialLiabilitiesTables</ParentRole>
      <Position>102</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>00000103 - Disclosure - 14 Fair value measurement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FairValueMeasurementDetails</Role>
      <ShortName>14 Fair value measurement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FairValueMeasurementTables</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>00000104 - Disclosure - 15 Capital management (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/CapitalManagementDetails</Role>
      <ShortName>15 Capital management (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/CapitalManagementTables</ParentRole>
      <Position>104</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>00000105 - Disclosure - 16 Labor and social obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsDetails</Role>
      <ShortName>16 Labor and social obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligationsTables</ParentRole>
      <Position>105</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>00000106 - Disclosure - 16 Labor and social obligations (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsDetails1</Role>
      <ShortName>16 Labor and social obligations (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligationsTables</ParentRole>
      <Position>106</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>00000107 - Disclosure - 16 Labor and social obligations (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsDetails2</Role>
      <ShortName>16 Labor and social obligations (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligationsTables</ParentRole>
      <Position>107</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>00000108 - Disclosure - 16 Labor and social obligations (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsDetails3</Role>
      <ShortName>16 Labor and social obligations (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligationsTables</ParentRole>
      <Position>108</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>00000109 - Disclosure - 16 Labor and social obligations (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/LaborAndSocialObligationsDetailsNarrative</Role>
      <ShortName>16 Labor and social obligations (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/LaborAndSocialObligationsTables</ParentRole>
      <Position>109</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>00000110 - Disclosure - 17 Equity (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/EquityDetailsNarrative</Role>
      <ShortName>17 Equity (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/Equity</ParentRole>
      <Position>110</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>00000111 - Disclosure - 18 Earnings per share (EPS) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/EarningsPerShareEpsDetails</Role>
      <ShortName>18 Earnings per share (EPS) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/EarningsPerShareEpsTables</ParentRole>
      <Position>111</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>00000112 - Disclosure - 19 Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RevenueDetails</Role>
      <ShortName>19 Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RevenueTables</ParentRole>
      <Position>112</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>00000113 - Disclosure - 19 Revenue (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/RevenueDetails1</Role>
      <ShortName>19 Revenue (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/RevenueTables</ParentRole>
      <Position>113</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>00000114 - Disclosure - 20 Expenses and cost by nature (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/ExpensesAndCostByNatureDetails</Role>
      <ShortName>20 Expenses and cost by nature (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/ExpensesAndCostByNatureTables</ParentRole>
      <Position>114</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>00000115 - Disclosure - 21 Finance result (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/FinanceResultDetails</Role>
      <ShortName>21 Finance result (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/FinanceResultTables</ParentRole>
      <Position>115</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>00000116 - Disclosure - 22 Income taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IncomeTaxesDetails</Role>
      <ShortName>22 Income taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/IncomeTaxesTables</ParentRole>
      <Position>116</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>00000117 - Disclosure - 22 Income Taxes (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/IncomeTaxesDetailsNarrative</Role>
      <ShortName>22 Income Taxes (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>00000118 - Disclosure - 23 Insurance contracts and contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InsuranceContractsAndContingenciesDetails</Role>
      <ShortName>23 Insurance contracts and contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/InsuranceContractsAndContingenciesTables</ParentRole>
      <Position>118</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>00000119 - Disclosure - 23 Insurance contracts and contingencies (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InsuranceContractsAndContingenciesDetails1</Role>
      <ShortName>23 Insurance contracts and contingencies (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/InsuranceContractsAndContingenciesTables</ParentRole>
      <Position>119</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>00000120 - Disclosure - 23 Insurance contracts and contingencies (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/InsuranceContractsAndContingenciesDetailsNarrative</Role>
      <ShortName>23 Insurance contracts and contingencies (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/InsuranceContractsAndContingenciesTables</ParentRole>
      <Position>120</Position>
    </Report>
    <Report instance="afya-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>00000121 - Disclosure - 25 Subsequent events (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://afya.com.br/role/SubsequentEventsDetailsNarrative</Role>
      <ShortName>25 Subsequent events (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://afya.com.br/role/SubsequentEvents</ParentRole>
      <Position>121</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>afya-20191231.xml</File>
    <File>afya-20191231.xsd</File>
    <File>afya-20191231_cal.xml</File>
    <File>afya-20191231_def.xml</File>
    <File>afya-20191231_lab.xml</File>
    <File>afya-20191231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/currency/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.ifrs.org/taxonomy/2019-03-27/ifrs-full</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
