Someone sends you a file called notes.txt, but it is suspiciously large for a text file. Or a download arrives with an extension your computer does not recognise. Your first instinct is to ask what the file really is, and that is a fair question with a less satisfying answer than most tools admit.

This guide is honest about the limits. The File Hash and Info Report on Ovatly does not inspect a file's contents or sniff its real format, and this guide will not pretend otherwise. What it gives you is a set of facts, and used together, three of them are a genuine test of whether a file is what its name claims.

Contents

  • Quick answer
  • Why the extension and the reported type can mislead
  • The three checks that actually tell you something
  • How to run the checks, step by step
  • Worked example: the classic abc check
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

Open the File Hash and Info Report, choose the suspicious file, and read the report. The type field is what your browser reports, which usually follows the extension, so it only tells you what the file claims to be. Then test the claim: does the size make sense for that kind of file, does a text preview appear if the file claims to be text, and does the SHA-256 match a copy or checksum you trust. The hash is the decisive check, because it is computed from the bytes and ignores the name entirely.

Why the extension and the reported type can mislead

An extension is not a property of the data. It is the last part of the file's name, and anyone can change it in seconds by renaming the file. Nothing inside the file updates when that happens. A photo renamed to .txt is still a photo; an archive renamed to .pdf is still an archive.

The type shown in the report comes from your browser, and browsers generally take it from that same extension. So the type field inherits the weakness of the name: it reports the file's claim about itself. That is still useful information, because a mismatch between the claim and everything else is exactly the warning sign you are looking for. But it is a claim, not a measurement.

The three checks that actually tell you something

The size check. A plain text note is usually a few kilobytes; a single photo is usually hundreds of kilobytes to several megabytes. If a supposed text file weighs 40 MB, something about the claim is off, whatever the report's type field says. Size alone proves nothing, but a size that makes no sense for the claimed type is a reason to stop and dig.

The preview check. When a file is text-like, meaning text, Markdown, JSON, code and similar, and no larger than 512 KB, the report shows a preview of its contents. So if a file claims to be text and a readable preview appears, the claim holds up. If a file claims to be text and no preview appears, treat that as a red flag. Binary files, such as photos and archives, legitimately show no preview, so the absence means nothing for them.

The hash check. This is the one that settles identity. The report computes MD5 and SHA-256 from the file's actual bytes. Compare the SHA-256 with a value from a source you trust: a publisher's checksum, or the hash of a copy you know is good. An exact match proves the files are identical. A mismatch proves they are different. Either way, the answer does not depend on the name at all. Prefer SHA-256 for this, because MD5 is identification only: collisions are practical, so it is the weaker proof.

How to run the checks, step by step

  1. Open the File Hash and Info Report and choose the file with the file box. Nothing is uploaded; the browser reads the file on your device.
  2. Read the basics first: name, size, type, extension and modified date. Note the type, but remember it follows the extension.
  3. Ask whether the size makes sense for the claimed type. A tiny installer or a huge text file both deserve a second look.
  4. Look for the text preview. If the file claims to be text and is under 512 KB, a preview should appear and should read like the content you expected.
  5. Compare the SHA-256 against any trusted value you have. If it matches, the file is the file, whatever it is called. If you have no trusted value and the other checks raise doubts, the safe move is to get the file again from its original source.

Worked example: the classic abc check

You can see the difference between claimed facts and computed facts with the standard test input. Create a text file containing exactly the three characters abc, with no newline at the end, and run it through the tool. The report shows a size of 3 bytes and these fingerprints:

MD5:     900150983cd24fb0d6963f7d28e17f72
SHA-256: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Those are the published test vectors for the input abc. Now rename the file to abc.zip without changing a single byte, and run it again. The name, extension and reported type all change, because they follow the name. The size and both hashes come back identical, because they are measured from the bytes. That one experiment shows exactly which parts of the report you can trust when a file's identity is in question.

Limitations and honest tradeoffs

The central limitation is worth repeating plainly: this tool does not determine a file's real format from its contents. It does not read magic bytes or parse the data. If you need certainty about what format a file's bytes actually follow, you need a tool built for content inspection, and even then, a file can be constructed to fool casual checks.

There are practical limits too. The preview only covers text-like files up to 512 KB, so it cannot help with larger files. And large files take patience: MD5 is read in 4 MB slices with a progress bar, but SHA-256 reads the file as one block, so a very large file can be slow and memory-heavy while it works. That is the cost of keeping everything on your own device instead of uploading the file to a server.

Common mistakes

  • Treating the reported type as a content verdict. It usually comes from the extension. It is the file's claim, not a measurement of its bytes.
  • Renaming a file to fix it. Changing the extension changes nothing inside the file. It only changes what your system tries to open it with.
  • Ignoring a missing preview. For a small file that claims to be text, no preview is a genuine warning sign, not a quirk.
  • Comparing only part of a hash. Hashes are all or nothing. Compare the full SHA-256 string, character by character.
  • Opening the file to see what it is. If a file's identity is in doubt, opening it in its supposed application is the risky way to find out. Check the facts first.

FAQs

Can this tool tell me a file's real type from its contents? No. The type shown is the type your browser reports for the file, which usually comes from its extension, not from inspecting the contents or reading magic bytes. Treat it as the file's claim about itself, then use the size, preview and hash checks to test that claim.

What will the report show for a file renamed from .zip to .txt? It will describe the file the way its name suggests, because the reported type follows the extension. What will not change are the size and the hashes, which are computed from the actual bytes and ignore the name completely.

What does it mean if no text preview appears? Previews are shown only for text-like files up to 512 KB. If a file that claims to be plain text shows no preview, that is a warning sign worth investigating. A binary file, such as a photo or an archive, legitimately has no preview.

How does a hash help identify an unknown file? Compute the SHA-256 and compare it with a hash from a source you trust, such as the publisher's checksum or a copy you hashed earlier. An exact match proves the two files are byte for byte identical, whatever either of them is named.

Is my file uploaded for any of this? No. The browser reads the file locally on your device and nothing is sent anywhere, which matters when the file itself is one you do not fully trust yet.

Conclusion

A file's name is a claim, and claims are cheap. The File Hash and Info Report gives you the facts that test the claim: a size that should make sense, a preview that should appear for text, and a SHA-256 computed from the bytes themselves. When the other side of the exchange is you sending files out, our companion guide on recording hashes for files you share with clients shows how to build the matching record. For more guides in this series, see our File and Data Conversion guides.

References