Visual RFC.
ALL RFCs / RFC 8259
Read the RFC ↗
RFC 8259 / JSON BUILDING BLOCKS

Strings and Unicode

03

Quotes delimit strings; escapes represent special characters without changing the intended string value.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

DIAGRAM§ 7 ↗
RFC 8259 · § 7EXAMPLE
3 / 3
Strings and UnicodeTwo different JSON string spellings decode to the same characters, then a UTF-8 byte strip shows an interoperable network representation.Escaped spelling and string value differIllustrative reverse-solidus character"a\\b""a\u005Cb"a + U+005C + bSame decoded code-unit sequence22615C5C6222UTF-8 bytes of the first JSON text · no BOMTransmit the JSON text in UTF-8 without a BOM
03
Encode interoperable network text.

Use UTF-8 and omit a leading byte-order mark in transmitted JSON.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
WHAT CHANGED
RFC 7159 character-encoding guidanceRFC 8259 §8.1

RFC 8259 requires UTF-8 for JSON exchanged between systems outside a closed ecosystem. Earlier JSON specifications did not require a single encoding.

Read the updated RFC section ↗
KEY POINT

Compare decoded strings and exchange UTF-8.

  • Quotation marks, reverse solidus, and control characters U+0000–U+001F must be escaped inside strings.
  • Escapes such as \u005C represent Unicode code units; non-BMP characters can use a UTF-16 surrogate pair. Unpaired surrogates harm interoperability.
  • JSON exchanged outside a closed ecosystem must use UTF-8. Do not add a byte-order mark to network-transmitted JSON.
DETAILS

Different escape spellings can represent the same string. Compare decoded code-unit sequences, rather than raw escape text. A parser may ignore a received BOM for interoperability.

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. A tree of JSON values
  2. Objects and arrays
  3. Strings and Unicode
  4. Numbers and precision
  5. Parsing and generating
  6. Interoperability checks
RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗