Online JSON formatter, beautifier and validator
Paste JSON and get it back pretty printed, validated and easy to read. This JSON formatter is built for real-world data: JSON copied out of log files, stringified JSON with escaped quotes, and payloads nested several levels deep inside string fields. It unescapes all of it, formats it, and lets you search the result by path.
Features
- Beautify & pretty print JSON with 2 spaces, 4 spaces or tabs.
- Minify JSON to a single compact line.
- Validate JSON: errors show the exact line and column, highlighted in the input, with clear messages for trailing commas, single quotes and other common mistakes.
- Unescape JSON strings: paste
"{\"id\":1}"or{\"id\":1}and get real JSON back. - Expand nested JSON: fields that contain escaped JSON are decoded in place, even when they are escaped twice.
- Extract JSON from logs: timestamps, log levels and other text around the JSON are ignored.
- NDJSON / JSON Lines: many log lines are formatted as separate records.
- Search JSON by path: find every
user.address.cityand copy just the one you need. - Exact numbers: large IDs such as
7234567890123456789are never rounded. - Private by design: no uploads, no tracking, nothing stored.
How to format JSON
- Paste JSON, a log line, or an escaped JSON string into Input.
- The formatted JSON appears in Output as you type. Choose Format or Minify and the indent size.
- Keep Expand nested JSON strings on to unescape JSON hidden inside string fields.
- Click Copy, or press Ctrl/⌘ + Shift + C.
Search inside JSON by path
Press / and type a path. Each match is shown as its own block with its full location and a Copy button.
| Search | Finds |
|---|---|
user.address.city | Every city under user.address, at any depth |
order.items.price | The price of every item in an order; arrays are matched automatically |
items[0].name | The name of the first item in items |
settings.*.enabled | enabled under any key inside settings |
$.status | status at the root only |
Frequently asked questions
What is a JSON formatter?
A JSON formatter, also called a JSON beautifier or pretty printer, re-indents compact JSON so it is easy to read. This tool also validates the JSON and points to the exact line and column of any error.
How do I unescape a JSON string?
Paste the escaped string, such as "{\"id\":1}" or {\"id\":1}. The formatter detects it, unescapes it and shows the formatted JSON. With Expand nested JSON strings turned on, fields that contain escaped JSON are unescaped too, at any depth.
Can I format JSON copied from log files?
Yes. Paste a whole log line and the formatter extracts the JSON, ignoring timestamps and other text around it. Several log lines with one JSON object each are formatted as separate records (NDJSON).
How do I search inside JSON?
Type a path such as user.address.city in the search box above the output. Every matching block is shown with its full location and its own Copy button. Arrays are matched automatically; use [0] for a specific item, * for any key, or start with $ to match from the root.
Is my JSON data safe?
Yes. Formatting, unescaping and searching all run in your browser. Nothing you paste is sent to a server or stored.
Will the formatter change my numbers?
No. Numbers are kept exactly as written, so large IDs like 7234567890123456789 and values like 1.50 are never rounded or reformatted.