file in abyss
Back to formats

Data

JSON JavaScript Object Notation

JavaScript Object Notation is a data format commonly identified by .json. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .json
MIME application/json

Magic numbers

Analyze your file
offset 0 JavaScript Object Notation leading signature
7B
{
offset 0 JavaScript Object Notation leading signature
5B
[

Structure

  1. Value
  2. Objects
  3. Arrays
  4. Strings
  5. Numbers

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 7B, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("7b")
OFFSET = 0

def is_json(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

JavaScript Object Notation is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.

Common detection mistakes

  • The .json extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • JavaScript Object Notation can start with signatures such as 7B or 5B, but related containers and damaged files may require additional validation.

Security notes

Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Data

Package JSON

Package JSON is a JavaScript Object Notation sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.

package.json
Type Sample
Small file
153 B
Generated CC0 1.0
SHA-256 4aeb5d23399187bdf1741cfd857a3bdef95d6cf252c08f3ca67fd3aa7e53cf9c
Download
Data

Blue Sky JSON

Blue Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.json
Type Sample
Small file
295 B
SHA-256 13424717c87f786e7bcee999a47d958e60c0befc3456dbf6a1ddc9de7f7f13e6
Download
Data

Flower Garden JSON

Flower Garden JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.json
Type Sample
Small file
447 B
SHA-256 639ca42d44746f8d2d5553fe737f18a7c49524332eb7558e1a920a6d4283a6c4
Download
Data

Navy Blue Sky JSON

Navy Blue Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.json
Type Sample
Small file
525 B
SHA-256 8d41fe37d5a796b6ec3d08b6acfdf94c988e4ccd184f26c137b8569095cbdd97
Download
Data

Nature of the Sky JSON

Nature of the Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.json
Type Sample
Small file
625 B
SHA-256 99ee168edc0b2ccff52ac45d6917312dfb924f37a7e429cfac14b79057f2e198
Download
Data

Sky Landscape JSON

Sky Landscape JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.json
Type Sample
Small file
787 B
SHA-256 6aa1c8bc4fc46d769a7adddb67d0a9eafc78e68305400bf7840700cf7da88947
Download
Data

Starry Sky JSON

Starry Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.json
Type Sample
Small file
757 B
SHA-256 88daf0799c063059e82966648aebdc2a99d6127b86e40c969350da16ffb56698
Download
Data

Blue Night Sky JSON

Blue Night Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.json
Type Sample
Small file
913 B
SHA-256 811f6083cba15f1817a71a7165c09cec75656e2c7bc8ec8adde2ecf15ce9c988
Download
Data

Hibiscus Flower JSON

Hibiscus Flower JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.json
Type Sample
1.1 KB
SHA-256 941fa1a5c64dfc77b8b0a047b4d07df12d2008dc8f402883e218d228ac9a8ee0
Download
Data

Arctic Sky JSON

Arctic Sky JSON is a JavaScript Object Notation sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.json
Type Sample
1.1 KB
SHA-256 c55d9943edf58b8b40ddde65e89a9e7ac32f5a26619cc5605dd6214e3533b6e5
Download
Data

NASA Blue Marble JSON

NASA Blue Marble JSON is a JavaScript Object Notation sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.json
Type Sample
1.8 KB
SHA-256 ab16f5b759281d30393fe3fd61d080a2ead45dc82f1d1f1caa625f750aef54dd
Download

Frequently asked questions

What is the magic number (file signature) of JavaScript Object Notation?

JavaScript Object Notation files begin with the byte signature 7B ("{") or 5B ("["). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of JavaScript Object Notation?

The MIME type for JavaScript Object Notation is application/json.

What file extension does JavaScript Object Notation use?

JavaScript Object Notation files use the .json extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats