.NDJSON file extension
To open .NDJSON files on Windows, open the .ndjson file in a text editor (for example, Notepad) to view the raw lines (each line is one JSON document).
To open a .ndjson file, use a plain text editor (it’s just UTF-8 text with one JSON value per line). For structured viewing or conversion, use tools that support NDJSON/newline-delimited JSON, such as the ecosystem around JSON streaming; Kibana also exports data as NDJSON.
Last updated: June 12, 2026
Open on your device
Choose your operating system for a dedicated step-by-step opening guide.
How to open .NDJSON files
Use these platform-specific instructions to open .NDJSON files safely.
Windows
- Open the .ndjson file in a text editor (for example, Notepad) to view the raw lines (each line is one JSON document).
- If you expected a “normal JSON file,” remember NDJSON is not a single JSON array; process it with a tool that supports newline-delimited JSON (one JSON value per line).
Mac
- Open the .ndjson file in a text editor (for example, TextEdit in plain-text mode) to view the raw records line-by-line.
- For structured use, import/process it as newline-delimited JSON (each line is a separate JSON value), not as one JSON document.
Linux
- Open the .ndjson file in a text editor to inspect the contents (each line should be valid JSON).
- If file associations are missing, add a MIME association through your desktop’s MIME database mechanisms (the shared-mime-info system uses extension globs to associate types).
iOS
- Open the .ndjson file in a plain-text capable app to view the lines; if you need to query/transform it, transfer it to a desktop environment where NDJSON tooling is more common.
Android
- Open the .ndjson file in a text editor app to view it as plain text; for validation or conversion, transfer it to a desktop tool that supports newline-delimited JSON.
Security notes
- NDJSON is plain text (no macros), but it is often used for large, untrusted data streams; malformed or adversarial JSON can trigger performance or memory issues in parsers—prefer streaming/line-by-line processing rather than loading the entire file at once.
- Be careful when feeding NDJSON into downstream systems (indexers, dashboards, importers): each line becomes a record/document, so a file from an untrusted source can create unexpected fields or very large documents that stress storage and search pipelines.
- Because NDJSON is frequently used for logs/exports, it can contain sensitive data (tokens, emails, identifiers). Treat .ndjson files like other raw data exports and avoid sharing them publicly without review/redaction.
If you did not expect this file
This extension is usually plain data, text, or structured content—not a program by itself. The practical risk is social engineering (a scam attachment or misleading filename). For trusted senders you rarely need heavy-handed antivirus wording; use these tools when you want an extra check on unexpected downloads.
Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.
NortonNorton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.
We may earn a commission when you use affiliate links. This supports our free file extension guides.
Can't open this file?
These are the most common causes and fixes when .NDJSON files fail to open.
Common reasons
- “JSON parse error” when using a normal JSON parser
- A line isn’t valid JSON, breaking processing partway through
- The file opens as plain text, but looks “unformatted” or hard to read
- Wrong content type / MIME type expectations in an API or pipeline
Fix steps
- Confirm the file is NDJSON: each line should be a complete JSON value (commonly an object).
- Use a reader/parser that supports NDJSON/newline-delimited JSON (line-by-line JSON streaming), or split the file by lines and parse each line separately.
OS-specific troubleshooting
What is a .NDJSON file?
NDJSON (newline-delimited JSON) stores a sequence of JSON texts separated by newlines, where each line is an independent JSON value (commonly an object). The ndjson-spec recommends the .ndjson extension and the media type application/x-ndjson. Unlike a single JSON array file, NDJSON is designed to be streamed and processed incrementally line-by-line.
Background
NDJSON is commonly used for data interchange when records are produced over time (for example, logs, event streams, exports, or bulk processing). Because each line is standalone JSON, tools can append new records without rewriting the whole file and consumers can parse records as they arrive.
The format is widely discussed as part of “JSON streaming” approaches, where a sequence of JSON values is sent or stored in a way that supports incremental processing. In the Elastic ecosystem, Kibana exports Saved Objects in NDJSON, explicitly using one document per line.
NDJSON is related to (but not the same as) the standardized “JSON Text Sequences” format in RFC 7464, which defines a different framing mechanism and an IANA-registered media type (application/json-seq). NDJSON’s commonly used media type (application/x-ndjson) is a community convention described by the ndjson-spec rather than an IANA-registered subtype.
Common MIME types: application/x-ndjson, application/json-seq
Known aliases: .jsonl, .ldjson
Further reading
Authoritative resources for more details on the .NDJSON format.
- ndjson-spec (NDJSON - Newline delimited JSON)
- JSON streaming (Wikipedia) – includes NDJSON/LDJSON overview
- Kibana: Importing and exporting Saved Objects (exports NDJSON)
- IANA Media Types registry (to verify what is and isn’t registered)
- shared-mime-info (freedesktop.org) – MIME database used on Linux desktops
Common .NDJSON issues
“JSON parse error” when using a normal JSON parser
Many JSON parsers expect a single JSON document (often one object or one array). An NDJSON file contains multiple JSON texts separated by newlines, so a parser that expects one document may fail after the first line.
- Confirm the file is NDJSON: each line should be a complete JSON value (commonly an object).
- Use a reader/parser that supports NDJSON/newline-delimited JSON (line-by-line JSON streaming), or split the file by lines and parse each line separately.
A line isn’t valid JSON, breaking processing partway through
NDJSON requires each record to be valid JSON on a single line. If a record contains an unescaped newline inside a string or the line is truncated/corrupted, tools may fail at that line.
- Locate the failing line number (many tools report it) and inspect that specific line in a text editor.
- Fix or remove the malformed record; ensure embedded newlines in strings are properly escaped and each JSON value stays on one line.
The file opens as plain text, but looks “unformatted” or hard to read
NDJSON is optimized for streaming rather than human readability. Each line may be minified JSON with no indentation.
- Use a text editor with JSON formatting features to pretty-print individual lines (record-by-record).
- If you need a single JSON document, convert the lines into a JSON array with a tool/workflow that reads NDJSON and outputs standard JSON.
Wrong content type / MIME type expectations in an API or pipeline
NDJSON commonly uses the media type application/x-ndjson per the ndjson-spec, but this is not an IANA-registered subtype; some systems may expect something else or treat it as generic text.
- If you control the sender, set Content-Type to application/x-ndjson when interacting with systems that recognize the ndjson-spec convention.
- If you need a standardized alternative for streaming JSON, consider RFC 7464 JSON Text Sequences (application/json-seq) where supported.
FAQ
Is NDJSON the same as JSON?
It uses the same JSON syntax, but an NDJSON file contains multiple JSON texts separated by newlines (one per line). A typical .json file usually contains one JSON document (often an object or an array).
What MIME type should I use for .ndjson?
The ndjson-spec recommends application/x-ndjson. This is a widely used convention, but it is not an IANA-registered media type subtype (unlike RFC 7464’s application/json-seq for JSON text sequences).
Why does Kibana export .ndjson?
Elastic’s Kibana Saved Objects export uses NDJSON so that each line is a single document, which makes it easy to stream, import, and process records one-by-one.
What is the standardized alternative for streaming JSON sequences?
RFC 7464 defines “JSON Text Sequences” with the media type application/json-seq. It uses a different framing approach than NDJSON and is standardized via the RFC.
Similar file extensions
Compare related formats in the same category to find the right tool faster.