Quick answer
Unicode in JSON strings uses \u followed by exactly four hexadecimal digits.
JSON Invalid Unicode Escape
Unicode in JSON strings uses \u followed by exactly four hexadecimal digits. Wrong length or non-hex characters cause an error.
Common causes
- Using fewer or more than four hex digits after \u.
- Using uppercase U or wrong case in hex.
- Copying Unicode from a context that uses different escape format.
How to fix
- Use \uXXXX where X is 0-9 or A-F (e.g. \u0020 for space).
- For code points above U+FFFF, use a surrogate pair (two \u escapes).
- Validate with a JSON validator to see the exact invalid escape.
FAQ
- What is the correct JSON Unicode escape format?
- \u followed by exactly four hex digits, e.g. \u00A9 for ©.
- How do I escape emoji in JSON?
- Use UTF-8 encoding (no escape needed) or surrogate pairs with \u.
Fix it now
Try in validator (prefill this example)