What is the JSON file format?
Files with the .json extension contain data stored in plain-text format, using notation derived from a subset of JavaScript, with UTF-8 encoding. The current authoritative description of the format is ECMA-404 and IETF RFC 8259 (2017), which superseded the earlier RFC 4627. Among other uses, .json is widely used to transfer information across networks and to store configuration, settings, and serialized application state.
A .json document can hold:
- Strings,
- Numbers (IEEE 754 double-precision floating-point),
- Boolean values (
trueandfalse), null,- Arrays of the above elements,
- Objects (key-value maps).
Objects and arrays can be nested on multiple levels. Although the syntax of .json files is based on JavaScript, they are used within applications written in virtually every programming language. In JavaScript, parsing and serialization are handled by the built-in JSON.parse() and JSON.stringify() methods, available since ECMAScript 5 - no external library is required. The format has no support for comments. Related text-based data formats include YAML, XML, and CSV.
Security & safety
RISK: LOWA JSON file is pure data - it cannot contain or execute code, so opening one in an editor is safe. The risks are informational: data exports often contain private data, API keys or session tokens (do not paste such files into online viewers or share them); and for developers, parsing untrusted JSON with eval() instead of JSON.parse(), or oversized files used for denial-of-service, are classic pitfalls. Watch for double extensions (.json.exe) in downloads.
Format details
in a nutshellPrograms that open JSON files
Technical details
deep spec| MIME type | application/json |
| Character encoding | UTF-8; RFC 8259 mandates UTF-8 without BOM for network interchange |
| File signature (magic bytes) | None - plain text; a valid document starts with '{' (object) or '[' (array), optionally preceded by whitespace |
| Supported data types | string, number, boolean (true/false), null, array, object |
| Number representation | IEEE 754 double-precision (64-bit) floating-point; the spec defines no distinct integer type |
| String encoding | Unicode; non-ASCII characters may appear as literal UTF-8 or as \uXXXX four-hex-digit escape sequences |
| Comment support | None - comments are explicitly excluded from the JSON specification |
| Whitespace | Insignificant whitespace (space, tab, CR, LF) is permitted between any two tokens |
| BOM handling | RFC 8259 explicitly prohibits a UTF-8 BOM at the start of a JSON interchange document |
| Object key uniqueness | Keys within an object should be unique; RFC 8259 does not forbid duplicates but leaves the behavior implementation-defined |
| Nesting | Unlimited recursive nesting of objects and arrays; practical depth is limited by the parser's stack size |
| Built-in JavaScript API | JSON.parse() and JSON.stringify() are native since ECMAScript 5 (2009); no third-party library needed |
| Interoperability | Language-agnostic; parsers and serializers exist for virtually every major programming language |
| Common uses | REST API payloads, application configuration files, data serialization, streaming log lines (JSONL / NDJSON), web app manifests |
| Released | 2001 (json.org); first IETF spec RFC 4627 (2006); current RFC 8259 / ECMA-404 (2017) |
| Open standard | Yes · royalty-free |
| Specification | www.rfc-editor.org |
JSON conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about JSON files.