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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2012-08-14</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001142576</issuerCik>
        <issuerName>OPTIMER PHARMACEUTICALS INC</issuerName>
        <issuerTradingSymbol>OPTR</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001380521</rptOwnerCik>
            <rptOwnerName>Gorbach MD Sherwood</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>10110 SORRENTO VALLEY ROAD</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE C</rptOwnerStreet2>
            <rptOwnerCity>SAN DIEGO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>92121</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Chief Scientific Officer, SVP</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common stock</value>
            </securityTitle>
            <transactionDate>
                <value>2012-08-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>3500</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>42219</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The award will vest as to one-third (1/3) of the restricted stock units annually on each anniversary of the vesting commencement date, so that the restricted stock units are fully vested on the third anniversary of the vesting commencement date.  Notwithstanding the foregoing, vesting shall terminate upon the participant's termination of continuous service as a service provider.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Meredith Schaum, attorney-in-fact</signatureName>
        <signatureDate>2012-08-14</signatureDate>
    </ownerSignature>
</ownershipDocument>
