Opcode

Also: OP code

cryptography · intermediate

A single instruction in Bitcoin Script — a one-byte value that tells the interpreter to push data, hash, compare, verify a signature, etc.

Bitcoin [Script](/glossary/script) is a sequence of bytes. Each byte is either a push opcode (asking the interpreter to take the next N bytes off the script and put them on the stack) or an operation opcode (asking the interpreter to do something with what's already on the stack).

The most useful ones, by category:

- Stack manipulationOP_DUP (duplicate the top item), OP_DROP (discard), OP_SWAP.
- Cryptographic hashingOP_SHA256, OP_HASH160 (RIPEMD-160 of SHA-256), OP_HASH256 (double SHA-256).
- ComparisonOP_EQUAL, OP_EQUALVERIFY (combine with a VERIFY that fails the script if not equal).
- Signature checksOP_CHECKSIG, OP_CHECKMULTISIG, OP_CHECKSIGVERIFY.
- TimelocksOP_CHECKLOCKTIMEVERIFY (CLTV, absolute height/time), OP_CHECKSEQUENCEVERIFY (CSV, relative).
- Control flowOP_IF / OP_ELSE / OP_ENDIF, OP_VERIFY, OP_RETURN (provably unspendable; used to store arbitrary data).

Several opcodes were disabled by Satoshi in 2010 after exploits surfaced — OP_CAT, OP_MUL, OP_LSHIFT, and others. Taproot's [Tapscript](/glossary/bip86) re-enabled a few in a more carefully scoped form, and proposals to re-enable OP_CAT are an active discussion in 2025–2026.

The full list lives in [the Bitcoin wiki](https://en.bitcoin.it/wiki/Script) and is the canonical reference.

Related terms

Where you'll see this