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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4/A</documentType>

    <periodOfReport>2018-02-21</periodOfReport>

    <dateOfOriginalSubmission>2018-02-23</dateOfOriginalSubmission>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000863436</issuerCik>
        <issuerName>BENCHMARK ELECTRONICS INC</issuerName>
        <issuerTradingSymbol>BHE</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001201520</rptOwnerCik>
            <rptOwnerName>TUFANO PAUL J</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>4141 N. SCOTTSDALE ROAD</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SCOTTSDALE</rptOwnerCity>
            <rptOwnerState>AZ</rptOwnerState>
            <rptOwnerZipCode>85251</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>CEO</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common stock</value>
            </securityTitle>
            <transactionDate>
                <value>2018-02-21</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>55369</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>109663</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Performance-based Restricted Stock Units</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>0</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2018-02-21</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>55370</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F2"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>55370</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>55370</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">These shares are represented by a restricted stock unit award bearing the right to receive Common Shares and are scheduled to vest in two equal installments on December 31, 2018 and December 31, 2019.</footnote>
        <footnote id="F2">This reflects the target number of performance-based restricted stock units awarded. Actual awards may vary from as low as zero to as high as 2.5 times the target. As soon as reasonably practicable following the end of the Performance Period (beginning on January 1, 2018 and ending on December 31, 2019) and in no event later than March 15, 2020, the number of shares that may ultimately be earned will be determined and issued.</footnote>
    </footnotes>

    <remarks>Due to administrative error, the Form 4 filed on February 23, 2018 is amended and restated to provide the correct date Exercisable and expiration date for the restricted stock unit granted.</remarks>

    <ownerSignature>
        <signatureName>/s/ James Walker by Power of Attorney for Paul J. Tufano</signatureName>
        <signatureDate>2018-04-30</signatureDate>
    </ownerSignature>
</ownershipDocument>
