.jsonld MIME type
JSON-LDtext & code
application/ld+jsonLinked data in JSON — most often the structured data inside <script type="application/ld+json"> tags.
| MIME type | application/ld+json |
|---|---|
| Extensions | .jsonld |
| Content-Type | application/ld+json |
| Compress in transit? | Yes — enable gzip or Brotli |
Good to know
- Search engines read JSON-LD from script tags in the page; you rarely serve
.jsonldfiles directly. - A script tag with this type isn't executed — it's data, so it doesn't need a CSP nonce.
Serve .jsonld files with the right type
The response header to send:
Content-Type: application/ld+json
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
application/ld+json jsonld;
Apache (.htaccess or server config)
AddType application/ld+json .jsonld
Express
res.set("Content-Type", "application/ld+json");Python
import mimetypes
mimetypes.add_type("application/ld+json", ".jsonld")HTML file input
<input type="file" accept=".jsonld,application/ld+json">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.jsonld | grep -i '^content-type:' file --mime-type file.jsonld
Frequently asked questions
What is the MIME type for .jsonld files?
application/ld+json.
What Content-Type header should a .jsonld file be served with?
Content-Type: application/ld+json. It compresses well, so let the server apply gzip or Brotli.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options