JSON Formatter / Viewer
Enter a JSON string to validate it and see it laid out as an indented, syntax-highlighted tree. Your input is never sent to a server — everything happens in your browser.
Tip. When you stop typing, the input is validated and, if valid, the view switches automatically to the "Output" tab. The dot on the Output tab shows the current validity status. The ▾/▸ buttons for collapsing/expanding objects and arrays sit next to the line numbers (left margin) for easy clicking. The search box is focused automatically when the Output tab opens, and you can choose a search mode (Contains/Exact/Regex) to find keys and values the way you want. Line numbers on the output are renumbered to match only the visible lines, so you can still tell where you are even when parts of the structure are collapsed. The input panel has the same kind of search (Contains/Exact/Regex) so you can locate and highlight text directly in the original input. Press Enter (next) / Shift+Enter (previous) to move between matches. Even if some quotes (") are missing around keys or string values, we do our best to recognize the text as JSON anyway.
How to use this tool
- Paste a JSON string into the input box on the left and it's validated automatically, with the result rendered right away.
- If the JSON isn't valid, you'll get an approximate line/column for where the problem is.
- Clicking "Format" also reformats the input box's content using the selected indent size.
- When the output is long, use "Collapse all" to get an overview of the structure first, then expand only the nodes you need with the ▾/▸ buttons next to the line numbers.
- Everything happens in your browser — the data you enter is never sent to a server.
- Even if quotes are missing around some keys or string values, we do our best to auto-correct and recognize them. In that case the status badge shows "Fixed", and the corrected lines are highlighted in the input panel's line numbers.
- Once your input is confirmed valid (or fixed), the view switches automatically to the "Output" tab and focus moves to the search box so you can start typing right away.
- Choose a search mode: "Contains" (partial match), "Exact" (exact match), or "Regex" (regular expression).
- The input panel has the same search feature (Contains/Exact/Regex, previous/next navigation, highlighting) so you can search directly in the original text.
Related tips
- Use "Copy minified" instead of "Copy" when you need a compact payload for an API request or a config value — no extra whitespace or line breaks.
- Switch the indent size to Tab if your project's style guide calls for tabs instead of spaces.
- The Regex search mode can match a pattern across every key or value at once — handy for auditing IDs, dates, or emails in a large document.
- For deeply nested JSON, click "Collapse all" first to see the overall shape, then expand only the branch you actually need to inspect.