How Bitcoin Inscriptions Work: A Technical Overview
How Bitcoin inscriptions work under the hood: witness data, Taproot, and the technical mechanics of ordinals.
A Bitcoin inscription is data — an image, text, audio, or other file — embedded directly inside a Bitcoin transaction using the witness field made available by the Taproot upgrade, then permanently associated with a specific numbered satoshi via the ordinal numbering scheme. Unlike most NFT systems, nothing is stored off-chain: the content itself lives in Bitcoin's blockchain.
This technical mechanism only became practical after Bitcoin activated Taproot in 2021, which quietly laid the groundwork for what would become the inscriptions protocol roughly two years later. If you want the conceptual overview before the technical details, start with what are Bitcoin Ordinals.
Why Taproot made this possible
Taproot introduced Tapscript, a more flexible scripting system, and expanded the witness discount — a fee mechanism that charges less per byte for data placed in the witness portion of a transaction compared to data in the traditional transaction body. Segregated Witness (SegWit), an earlier upgrade, had already split transaction signature data ("witness data") out from the main transaction structure for scaling reasons. Inscriptions exploit this discount by placing arbitrary content inside a Taproot script-path spend, disguised as if it were part of a script, using an OP_FALSE OP_IF ... OP_ENDIF envelope that Bitcoin nodes recognize as data to be ignored for execution purposes but still store and relay as part of the transaction.
The envelope structure
An inscription typically has three logical parts:
- The envelope marker, which tells parsing software "what follows is inscription content, not an executable script."
- The content type, similar to a MIME type (e.g.,
image/pngortext/plain), so wallets and explorers know how to render it. - The content itself, chunked into the witness data across one or more pushes, since Bitcoin script has limits on how much data a single push can carry.
Because none of this executes as real script logic (it's wrapped in a conditional that's always skipped), Bitcoin's consensus rules simply treat it as valid, unremarkable transaction data — full nodes store and relay it like any other transaction, without needing any awareness of the ordinals protocol at all.
The two-step inscribing process
Inscribing typically happens in two Bitcoin transactions:
- Commit transaction: creates a special output committing to the inscription content via a script hash, without revealing the actual content yet.
- Reveal transaction: spends that commit output, revealing the full inscription content in its witness data, and this is the transaction that actually attaches the data to a specific numbered satoshi.
This two-step design exists partly for technical reasons around how Taproot spending works, and partly because it lets the content be broadcast and mined more predictably in terms of fees.
How the satoshi gets tagged
The ordinal numbering scheme tracks satoshis using a first-in-first-out rule: within a transaction, input satoshis are assigned to output satoshis in the order they appear, preserving the oldest satoshis' identity through transfers. The reveal transaction's first input satoshi (by this ordering convention) becomes the one that "receives" the inscription. This means the specific position of inputs and outputs in a transaction genuinely matters — a wallet unaware of ordinal theory could combine or reorder satoshis in a way that accidentally moves or effectively burns an inscription's association if it isn't careful about preserving that specific input.
Data permanence and node requirements
Because inscription content is embedded directly in transaction witness data, any full Bitcoin node that stores full blocks retains that data as long as it retains the blockchain itself — there's no separate server or hosting arrangement that could go offline and break the link, unlike NFT platforms that store metadata off-chain. The tradeoff is that this content permanently adds to the size of the blockchain that every full node must eventually store, which is part of the broader debate we cover in the ordinals controversy.
Technical comparison
| Component | Role |
|---|---|
| SegWit | Separates witness data, enabling the discount inscriptions rely on |
| Taproot | Enables flexible script-path spends used for the envelope |
| Commit transaction | Commits to content hash without revealing it |
| Reveal transaction | Publishes actual content, attaches it to a satoshi |
| Ordinal numbering | Determines exactly which satoshi is inscribed |
Bottom line
Bitcoin inscriptions work by exploiting Taproot's flexible scripting and the SegWit witness discount to embed real content directly into transactions, then using a deterministic numbering scheme to tie that content to one specific satoshi. It's a clever repurposing of existing Bitcoin infrastructure rather than a new blockchain feature, which is exactly why it required no protocol changes to exist — and exactly why its resource usage lands squarely on Bitcoin's shared block space.
Related articles
This article is for educational purposes only and is not financial advice. DeFi involves significant risk, including total loss of funds. Always do your own research.