<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2016-05-18</periodOfReport>

    <issuer>
        <issuerCik>0001053352</issuerCik>
        <issuerName>HERITAGE COMMERCE CORP</issuerName>
        <issuerTradingSymbol>HTBK</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001541330</rptOwnerCik>
            <rptOwnerName>Benito Michael Eugene</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>150 ALMADNE BLVD.</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SAN JOSE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95113</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>true</isOfficer>
            <officerTitle>EVP</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common</value>
            </securityTitle>
            <transactionDate>
                <value>2016-05-18</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>540</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>10</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>0</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>Indirect by Spouse</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>28600</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - ISO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>23.89</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2007-05-04</value>
            </exerciseDate>
            <expirationDate>
                <value>2017-05-04</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>155</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>16</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2008-05-22</value>
            </exerciseDate>
            <expirationDate>
                <value>2018-05-22</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>7000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>23.85</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2006-08-03</value>
            </exerciseDate>
            <expirationDate>
                <value>2016-08-03</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>23.89</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2007-05-04</value>
            </exerciseDate>
            <expirationDate>
                <value>2017-05-04</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>6845</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>3.57</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2010-07-26</value>
            </exerciseDate>
            <expirationDate>
                <value>2020-07-26</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>6.57</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2013-04-30</value>
            </exerciseDate>
            <expirationDate>
                <value>2023-04-30</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>10000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>7.43</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2009-05-04</value>
            </exerciseDate>
            <expirationDate>
                <value>2019-05-04</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>4500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Standard Employee Option - NSO</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>8.07</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2014-02-27</value>
            </exerciseDate>
            <expirationDate>
                <value>2024-02-27</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>12500</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes></footnotes>

    <ownerSignature>
        <signatureName>Debbie Reuter as Attorney in fact for Michael Benito</signatureName>
        <signatureDate>2016-05-25</signatureDate>
    </ownerSignature>
</ownershipDocument>
