As mentioned in the comments,
.tex files are just plain-text files, so they do not have "hidden metadata".
If you inspect it with any text editor as Notepad, TeXnicCenter etc... you will see the contents byte per byte (encoding issues apart, which are off-topic it would seem).
If your concern is how safe it is to run
latex (or variants) on the file, the answer is simple. It is pretty safe, the worst it can do is be stuck in a loop and produce some garbage in the form of easy-to-delete temporary
Things change if you compile it using the
-shell-escape argument: this would allow the
.tex file to execute external programs and this could be potentially harmful. You can explicitly disable this behaviour by running the
latex command with the
There are packages that make legitimate use of this feature (
minted comes to mind). To be sure nothing nasty is going to happen you need to inspect the contents of the
But: Absolutely no harm can be caused by inspecting the file with a text editor.
As mentioned before, even plain-text files can be harmful in Windows if assigned extensions that instruct the operating system to interpret them as programs (examples are
.bat files or
.vbs). To avoid this you can open the file from your text editor's menu: this way you avoid Windows guessing how to open the file.