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

    <schemaVersion>X0303</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2011-06-06</periodOfReport>

    <issuer>
        <issuerCik>0000946840</issuerCik>
        <issuerName>VIROPHARMA INC</issuerName>
        <issuerTradingSymbol>VPHM</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001421915</rptOwnerCik>
            <rptOwnerName>Wolf John Peter III</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>730 STOCKTON DRIVE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>EXTON</rptOwnerCity>
            <rptOwnerState>PA</rptOwnerState>
            <rptOwnerZipCode>19341</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>VP, General Counsel</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>17.98</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2011-06-06</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>40261</value>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2012-06-06</value>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <value>2021-06-06</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>40261</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>40261</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The options vest in four equal annual installments beginning on the first anniversary date from time of grant</footnote>
        <footnote id="F2">This is an option grant for which there is no purchase price.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ J. Peter Wolf</signatureName>
        <signatureDate>2011-06-07</signatureDate>
    </ownerSignature>
</ownershipDocument>
