How to use
- Paste a message copied from a queue or a log into Message payload. It accepts JSON, XML, logs with one JSON per line (JSON Lines), strings wrapped in quotes or escaped with
\", and Base64-encoded values. The format is detected automatically. - If there are no errors you get Pretty print or Minify to one line. Choose 2 spaces, 4 spaces or a tab for indentation.
- If the message carries JSON inside a string (the
Messageof an SNS notification, a double-serialized Kafka value), turn on Expand JSON inside strings. - When something is wrong you see the line and column and an excerpt of that spot. Copy the result or download it as a file.
Shapes it unwraps for you
| What you paste | What happens |
|---|---|
{...} or [...] |
Validated as JSON and formatted |
<...> |
Validated as XML and formatted |
{...} on every line |
Treated as JSON Lines, each line formatted, the broken line number shown |
"{\"a\":1}" |
Outer quotes and escapes removed, then formatted |
{\"a\":1} (copied from a log) |
\" unescaped, then formatted |
eyJhIjoxfQ== |
Base64 decoded as UTF-8 text and formatted if it is JSON or XML |
Doubly wrapped values are unwrapped up to 3 levels. A \" inside already valid JSON is a normal escape and is left alone.
How it differs from other JSON tidy tools
It rewrites numbers as written instead of parsing them. Through the browser’s JSON.parse, an integer above 2^53−1 (9,007,199,254,740,991) has its trailing digits changed. In message queues, where 19-digit order IDs and snowflake IDs are common, that damages data without any visible sign. This tool keeps notations such as 1234567890123456789, 1.50 and 1E+3, along with key order and string escapes, exactly as they were. If there are large integers it tells you how many.
Unicode escapes can be decoded. Messages that write Korean as 홍길동, as Python’s json.dumps does by default, become readable 홍길동. Escapes for quotes ("), backslashes and control characters such as newlines are kept, so the JSON stays valid.
Conversion example
One line of an SNS notification envelope (207 bytes), formatted with both options on. The inner Message expands into an object, the Korean text is decoded, and the 19-digit orderId is untouched.
{
"Type": "Notification",
"MessageId": "7c1f9a2e",
"Message": {
"orderId": 1234567890123456789,
"buyer": "홍길동",
"items": [
{
"sku": "A-1",
"qty": 2
}
]
},
"Timestamp": "2026-03-02T05:07:11.123Z"
}
The same input minified is 179 bytes. It reports 9 keys and a maximum depth of 4.
Things to watch
- Expanding is for viewing. Turning a string-valued
Messageinto an object changes the structure, so for a value you will put back on a queue, use the minified result without expanding. - When sending to a broker with a size limit, check the minified size in bytes. It is the UTF-8 byte count, not the character count, and a Korean character takes 3 bytes.
- XML is checked for matching tags and the root rule. Entity definitions and schema (XSD) validation are not done. Lines holding only whitespace between tags are tidied and leading and trailing spaces in text are trimmed.
- JSON does not allow comments, single quotes or trailing commas (RFC 8259). Such input is reported as an error.
FAQ
What if a Kafka or SQS value is full of quotes and backslashes?
The log or console printed the value wrapped in one more string. Paste it as is and it is unwrapped automatically. The Handling row then says “after unescaping the string”.
What if the message body is Base64 and unreadable?
SQS binary attributes and some broker consoles show the body as Base64. Paste it and it is decoded as UTF-8 text, then formatted if that text is JSON or XML. Plain text, or binary such as images and archives encoded as Base64, is not decoded. For plain encoding and decoding use the Base64 Encoder and Decoder.
How is this different from the JSON formatter?
The JSON Formatter focuses on key sorting and reading statistics, and interprets values as JavaScript values. This tool is tuned for message queue work: it preserves large integers, unwraps escapes and Base64, handles JSON Lines and detects XML. To see how two JSON documents differ, use JSON Diff.
What happens to logs with one JSON per line (NDJSON)?
With two or more non-empty lines that are all valid JSON, it is treated as JSON Lines and each line is formatted. If a middle line is broken, it tells you which line.
My message has personal data. Is that safe?
Everything is processed inside this page and nothing is sent or stored.
Related tools
- For key sorting and statistics use the JSON Formatter, and for XML alone the XML Formatter.
- To turn timestamps inside a message into readable times, use the Log Timestamp Converter.
- To carry a JSON structure into code types, there is JSON to TypeScript.
The payload you enter is processed only in your browser and never sent to a server.