Linear-optical logic gates have the potential to be the bases of the next-generation information technology (IT) because of the low power consumption and rapid response. This study proposes a general theoretical model to obtain the optimal solutions for linear-optical logic gates. All common logic gates (AND, OR, NOT, NAND, NOR, XOR, and XNOR) are experimentally demonstrated with one single sample structure based on ultracompact plasmonic waveguides. The measured intensity contrast ratio between the output-logic “1” and “0” states reaches 28 dB for the OR gate and 9.4 dB for the AND gate, thereby approaching the theoretical maximum of infinity and 9.5 dB, respectively. The proposed logic gates provide uniform output intensities for identical output logics when the input logics are different. The measured intensity discrepancies are below 1% for the three output-logic “1” states of the OR gate and the three output-logic “0” states of the AND gate. This phenomenon is favored in practical applications and the cascading of logic gates. The proposed universal linear-optical logic gate with maximal intensity contrast ratios may find important future applications in the field of IT.