<blockquote>
<p>A type corresponding to the Plutus Core builtin equivalent of Data.</p>
<p>The point of this type is to be an opaque equivalent of Data, so as to ensure that it is only used in ways that the compiler can handle.</p>
<p>As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.</p>
<p>For off-chain usage, there are conversion functions builtinDataToData and dataToBuiltinData, but note that these will not work on-chain.</p>
</blockquote>
<p>Source <a href="https://playground.plutus.iohkdev.io/doc/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Api.html#t:BuiltinData" rel="nofollow noreferrer">(1)</a></p>

CC BY-SA 4.0
2022-08-19T10:10:07.143Z
2022-08-19T10:10:07.143Z
Fermat
<p>I am confused about how they relate to each other. At first I thought Data is for offchain use and BuiltinData is for onchain use, but then I saw that that Data is also defined in PlutusCore which surely provides onchain utility. Can somebody give a comprehensive explanation please?</p>

<plutus><builtindata><data>
Plutus BuiltinData vs. Data
# Plutus BuiltinData vs. Data

(Asked by: username_0 on 2022-08-12)

I am confused about how they relate to each other. At first I thought Data is for offchain use and BuiltinData is for onchain use, but then I saw that that Data is also defined in PlutusCore which surely provides onchain utility. Can somebody give a comprehensive explanation please?

**Tags:** plutus, builtindata, data

---

## 1 answers

### Answer by username_1 on 2022-08-19. Score: 1

> A type corresponding to the Plutus Core builtin equivalent of Data.
>
> The point of this type is to be an opaque equivalent of Data, so as to ensure that it is only used in ways that the compiler can handle.
>
> As such, you should use this type in your on-chain code, and in any data structures that you want to be representable on-chain.
>
> For off-chain usage, there are conversion functions builtinDataToData and dataToBuiltinData, but note that these will not work on-chain.

Source [(1)](https://playground.plutus.iohkdev.io/doc/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Api.html#t:BuiltinData)


---

