Examples
-
Unicode text
{"greeting":"Hello 世界"}
About JSON Unicode Escape
Some transports and legacy parsers only trust ASCII, but real-world content is full of accents, emoji, and non-Latin scripts. Sending raw UTF-8 through one of those pipes can mean silent corruption.
This re-encodes a JSON string's non-ASCII characters as \uXXXX escapes, producing output that's still perfectly valid JSON.parse input but safe for ASCII-only systems and older log pipelines.
FAQ
- Is the output still valid JSON?
- Yes - escaped output remains valid JSON.parse input.