JSON
AvailableJSON Formatter
Format, validate, minify, and sort JSON locally.
Enter plain text. Output is JSON string content without surrounding quotes.
Conversion output appears here.
Read-only output remains selectable and can be copied manually.
Non-ASCII and forward-slash options apply when escaping. Escaping / is valid JSON but is usually unnecessary.
Nothing you enter is uploaded or automatically saved. No logging or network calls are involved.
Input: 0 characters · 0 lines
Output: 0 characters · 0 lines
Escape sequences: 0 · Unicode escapes: 0
UTF-8 bytes: 0 B input · 0 B output
JSON strings use backslashes to represent quotes, backslashes, and control characters. A real newline is a line break; the two characters \n represent its JSON escape. This tool works on string content, so it does not add surrounding quotes.
A \uXXXX escape represents one UTF-16 code unit. Accented text can use one escape, while an emoji such as 🚀 uses two escapes: \uD83D\uDE80. The tool validates those pairs, preserves combining characters, and never normalizes your text.
JSON escaping is for JSON string syntax. It is different from URL percent encoding and HTML entity encoding, which use different rules and should be selected only for their respective contexts.
A quote ends a JSON string, so a quote that belongs in the string must be written as \".
A real newline moves to the next line. The characters backslash and n are the JSON notation that represents one newline.
JSON \uXXXX escapes encode UTF-16 units. Most emoji need a high and low surrogate pair.
No. \/ is valid JSON, but / is normally safe to leave unescaped.
That is JavaScript syntax. JSON permits only classic four-digit \uXXXX escapes.
Use it when a piece of text must become the contents of a JSON string, or when an escaped JSON string needs to be read normally.
A message containing a quote and a newline becomes "She said \"hello\"\n" inside a JSON string.
JSON escaping is different from URL encoding and HTML escaping; choose the encoding required by the destination.
JSON
AvailableFormat, validate, minify, and sort JSON locally.
JSON
AvailableRemove nonessential whitespace from JSON documents.
JSON
AvailableCheck JSON syntax and pinpoint invalid data.