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

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2004-09-30</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000720671</issuerCik>
        <issuerName>HALIFAX CORP</issuerName>
        <issuerTradingSymbol>hx</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001304799</rptOwnerCik>
            <rptOwnerName>Whiteside Larry L</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O HALIFAX CORPORATION</rptOwnerStreet1>
            <rptOwnerStreet2>5250 CHEROKEE AVENUE</rptOwnerStreet2>
            <rptOwnerCity>ALEXANDRIA</rptOwnerCity>
            <rptOwnerState>VA</rptOwnerState>
            <rptOwnerZipCode>22312</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Vice President</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Halifax Corporation Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2004-09-30</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>108597</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>5.1</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>108597</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Received in exchange for 18,000 shares of Alpha National Technology Services, Inc. (&quot;AlphaNational&quot;) in connection with the merger of AlphaNational with and into Halifax Corporation (&quot;Halifax&quot;) on September 30, 2004 (the &quot;Merger&quot;).  The number of Halifax Shares received was determined by multiplying Mr. Whiteside's percentage ownership interest in AlphaNational by the aggregate number of Halifax shares to be issued in connection with the Merger.  The aggregate number of Halifax shares to be issued in connection with the Merger was determined by dividing $1,200,000 by $5.10, which price represents the greater of (i) the closing price of Halifax's shares as of the closing date of the Merger and (ii) the average market price of Halifax's shares over the fifteen trading days immediately preceding the closing date.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Larry L. Whiteside</signatureName>
        <signatureDate>2004-10-01</signatureDate>
    </ownerSignature>
</ownershipDocument>

