user134626: I have some files (e.g. of 10MB in size, think of it as a paper, an article, a photo, etc), and want to permanently prove that "at 2022.05.24, I already come up with such a file with such content".
So, is it possible to be done via bitcoin? My very naive thought is that, transferring some bitcoin with "attachment" being the hash of my file. Then, since this money transfer record is permanently unmodifiable and visible to everyone, I prove that I have it at this time.
In addition, can this be evidence in, for example, courts?
I am new to blockchain/bitcoin so I am not sure whether this thought is reasonable or not. Thanks for any suggestions!

user128444: Ethereum could be the right choice, Bitcoin require more hassle. I developed a simple smart contract for certification as you described more than three years ago and it is still working and used by the customer. Moreover, you can label the output so that it is not required to give a lot of explanation when you need to demonstrate your certification: the smart contract “print out” all whatever needed to understand (I.e. not a simple number or hash, but a complete “legenda” of the record).

user134646: You cannot use bitcoin alone to prove something about arbitrary files, because bitcoin does not interact with arbitrary files. Any software which calculates a file hash and puts it on the blockchain could have been a software which read hashes from a website, e.g. [1], and never had the actual files.
So a verifier like a court would have to trust a combination of blockchain, custom software and your deployment of it.
[1] http://ftp.debian.org/debian/dists/bullseye/Release

user134664: In addition to the services already mentioned, Proof of Existence, billed as "the original Blockchain notary service", does exactly what you are asking for (if you're asking only about existence and not possession), for a fee of 0.00025 BTC each.
Actually uploading the document to the server is not necessary; it only needs the hash, which is computed client-side. I can't vouch for whether or not what's currently on the web site secretly uploads your submissions somewhere. However, they do host their code on GitHub, so you could e.g. run your own server (or just see what exactly it puts on the blockchain, so you could do the same on your own). There is also a free API available, with which you know for sure only the hash is being submitted.

user12983: Yes, it is possible today. Have a look to https://originstamp.com/ - this service already performs it. I do not recommend you to upload your files to this site, but you will find more information there, rather in my answer

user121614: Embedding arbitrary data in the Bitcoin blockchain is possible with the use of an OP_RETURN output. If you embed a hash of your file this way, it will prove its existence at that point in time, for as long as Bitcoin exists and its timestamps can be trusted. Note that block timestamps in Bitcoin can theoretically be up to 2 hours different from real time.
However, embedding a hash of a single file in a transaction is wasteful. Using a merkle tree, you can timestamp thousands or millions of files at the same time, and still use only one transaction. The OpenTimestamps project creates an open standard for exactly that and lists several so-called "calendar servers" that allow you to create a trusted timestamp for free (they rely on donations to cover transaction fees and other expenses).
Example OpenTimestamps transaction: f1127bd52c1fe4894134379403f4dc7287018fc4f1361c3ce01a554ae6995f9c

134626: <p>I have some files (e.g. of 10MB in size, think of it as a paper, an article, a photo, etc), and want to permanently prove that &quot;at 2022.05.24, I already come up with such a file with such content&quot;.</p>
<p>So, is it possible to be done via bitcoin? My very naive thought is that, transferring some bitcoin with &quot;attachment&quot; being the hash of my file. Then, since this money transfer record is permanently unmodifiable and visible to everyone, I prove that I have it at this time.</p>
<p>In addition, can this be evidence in, for example, courts?</p>
<p>I am new to blockchain/bitcoin so I am not sure whether this thought is reasonable or not. Thanks for any suggestions!</p>
 128444: <p>Ethereum could be the right choice, Bitcoin require more hassle. I developed a simple smart contract for certification as you described more than three years ago and it is still working and used by the customer. Moreover, you can label the output so that it is not required to give a lot of explanation when you need to demonstrate your certification: the smart contract “print out” all whatever needed to understand (I.e. not a simple number or hash, but a complete “legenda” of the record).</p>
 134646: <p>You cannot use bitcoin alone to prove something about arbitrary files, because bitcoin does not interact with arbitrary files. Any software which calculates a file hash and puts it on the blockchain could have been a software which read hashes from a website, e.g. [1], and never had the actual files.</p>
<p>So a verifier like a court would have to trust a combination of blockchain, custom software and your deployment of it.</p>
<p>[1] <a href="http://ftp.debian.org/debian/dists/bullseye/Release" rel="nofollow noreferrer">http://ftp.debian.org/debian/dists/bullseye/Release</a></p>
 134664: <p>In addition to the services already mentioned, <a href="https://proofofexistence.com/" rel="nofollow noreferrer">Proof of Existence</a>, billed as &quot;the original Blockchain notary service&quot;, does exactly what you are asking for (if you're asking only about existence and not possession), for a fee of 0.00025 BTC each.</p>
<p>Actually uploading the document to the server is not necessary; it only needs the hash, which is computed client-side. I can't vouch for whether or not what's currently on the web site secretly uploads your submissions somewhere. However, they do host their code on GitHub, so you could e.g. run your own server (or just see what exactly it puts on the blockchain, so you could do the same on your own). There is also a free API available, with which you know for sure only the hash is being submitted.</p>
 12983: <p>Yes, it is possible today. Have a look to <a href="https://originstamp.com/" rel="noreferrer">https://originstamp.com/</a> - this service already performs it. I do not recommend you to upload your files to this site, but you will find more information there, rather in my answer</p>
 121614: <p>Embedding arbitrary data in the Bitcoin blockchain is possible with the use of an OP_RETURN output. If you embed a hash of your file this way, it will prove its existence at that point in time, for as long as Bitcoin exists and its timestamps can be trusted. Note that block timestamps in Bitcoin can theoretically be up to 2 hours different from real time.</p>
<p>However, embedding a hash of a single file in a transaction is wasteful. Using a merkle tree, you can timestamp thousands or millions of files at the same time, and still use only one transaction. The <a href="https://opentimestamps.org/" rel="noreferrer">OpenTimestamps</a> project creates an open standard for exactly that and lists several so-called &quot;calendar servers&quot; that allow you to create a trusted timestamp for free (they rely on donations to cover transaction fees and other expenses).</p>
<p>Example OpenTimestamps transaction: <a href="https://mempool.space/tx/f1127bd52c1fe4894134379403f4dc7287018fc4f1361c3ce01a554ae6995f9c" rel="noreferrer">f1127bd52c1fe4894134379403f4dc7287018fc4f1361c3ce01a554ae6995f9c</a></p>
