Online JSON Viewer and Editor
Explore JSON as a tree, a table or formatted code, fix errors with line and column, then format, sort and download it. Your file never leaves your device.
Turn on JavaScript to open your file. It is read in your browser and never uploaded.
How to open and format a JSON file online
- Drop your JSON file on the page. Choose a .json file. It is read in your browser, so API responses, configuration files and other private data are never uploaded.
- Explore it three ways. View the file as a collapsible tree, as a table (when it is a list of objects) or as formatted code. Search works on keys and values.
- Fix errors. If the file is not valid JSON you see the message with its line and column, and in the code view "Go to error" puts the cursor on the problem.
- Format and edit. Switch to Edit. Choose 2 spaces, 4 spaces, a tab or minified from the Format menu, sort keys or lists, and change, add, duplicate, move or delete nodes.
- Download your JSON. Use the download icon to save the result. The original file on your device is never changed.
JSON viewer and editor: common questions
How do I format (pretty print) JSON online?
Open your file, switch to Edit and choose 2 spaces, 4 spaces or Tab from the Format menu. The code view shows the formatted result and the download uses the same layout.
How do I minify JSON?
Switch to Edit, open the Format menu and choose "Minified (one line)". All spaces and line breaks outside strings are removed, which makes the file smaller.
How do I find the error in my JSON?
When the JSON is not valid, OpenAnyDoc shows what is wrong with the line and column number. In the code view, "Go to error" selects the place in the text. Typing in the code view re-checks the JSON as you type.
Can I sort the keys of a JSON object alphabetically?
Yes. In Edit mode use the Sort keys menu for the selected object or the whole document, A to Z or Z to A, with or without the objects nested inside. You can also sort a selected list.
Can I open a large JSON file?
Yes. A file of about 50 MB opens, because it is read in the background so the page stays responsive. Files over 50 MB show a warning, and the limit is your browser's memory.
Is it safe to paste or open private JSON here?
Your JSON is not uploaded: the browser reads the file and nothing is sent to a server, which makes it suitable for tokens, customer data in test files and internal configuration.