Suprisingly, I cannot find the hex value that identified a .json as a .json in any online list. What is the file signature for a .json file?

  • 2
    You probably won't find one for HTML, CSS, JS, or XML either...
    – Matthew
    Commented Jun 14, 2016 at 20:20
  • 1
    The hex value you refer to is part of the file header. In JSON there is no standardized header, so no hex value to look at. Meanwhile, I do not see any direct link between this question and IT Security... Commented Jun 14, 2016 at 21:28

2 Answers 2


JSON (nominally) doesn't have a file signature.

File signatures (usually "magic" byte sequences with given offsets) exist in binary file formats; this includes executables, images, video, music, other media files, as well as numerous proprietary file formats.

The purpose of file signatures is to provide a would-be API for identifying the type of hard-to-parse or unparseable files, which is normally the case with binary files.

JSON is data structured in a specific format, which is almost always stored in a plain text file, which can be parsed with relative ease, and so doesn't need a file signature. The closest thing would be a MIME type, which usually only applies to JSON files being sent over a network.


Technically there's no such thing like a JSON File. It's just a normal text file containing text in a JSON Format.

Not the answer you're looking for? Browse other questions tagged .