A browser-based tool specifically designed to view and analyze structured JSON outputs exported from Google Gemini via AI Studio. When you export your Gemini conversations (often to Google Drive), this tool helps you load that JSON file and displays the interaction data (prompts, responses, "thoughts", metadata) in an organized, readable, and searchable format.
Developed by Marcel Mayr (marcelamayr on GitHub, @marcelamayr on social media)
- Load Local Files: Easily load JSON files exported from Google Gemini / AI Studio.
- Prompt-Answer Sets: Structures the output into clear prompt-answer sets.
- Navigation:
- List of (truncated) user prompts on the left for quick navigation.
- Click a prompt to view its details and the corresponding model response(s).
- Collapsible Sections: User prompts and model "thought processes" can be collapsed/expanded for better focus.
- Metadata Display: View
runSettings,systemInstruction, andcitationsin a tabbed, collapsible section at the top. - Complete Dialog View: Option to see the entire prompt-answer dialog chronologically.
- Search: Filter prompts by keywords.
- Readability:
- Clear distinction between user messages, model responses, and model thoughts.
- Markdown rendering for text content (bold, italics, lists, tables).
- Syntax highlighting for code blocks using Highlight.js.
- Copy Code: "Copy" button for quickly copying code snippets from responses.
- Client-Side: Runs entirely in your browser; no data is sent to any server.
-
Clone or Download:
git clone https://github.com/aresprom/Gemini-json-Viewer.git cd Gemini-json-ViewerOr download the ZIP from the repository page and extract it.
-
Open in Browser: Open the
index.htmlfile in your web browser. -
Load Gemini JSON Output:
- In Google AI Studio, after your conversation with Gemini, use the export option (often saves to Google Drive as a JSON file).
- Download this JSON file to your computer.
- In the "Gemini JSON Viewer", click the "Load LLM Output File" button.
- Select the JSON file you downloaded from Google Drive.
-
Interact:
- Browse the list of prompts on the left.
- Click a prompt to see its content and Gemini's response on the right.
- Use the "View Complete Dialog" button to see the full conversation.
- Expand/collapse sections as needed.
- Use the tabs at the top to view Run Settings, System Instruction, and Citations associated with the Gemini interaction.
This tool is tailored for the JSON structure typically exported by Google Gemini from AI Studio. A simplified example:
{
"runSettings": {
"temperature": 0.9,
"model": "models/gemini-1.5-pro-latest",
// ... other settings like topP, topK, maxOutputTokens, safetySettings
},
"citations": [
// { "uri": "https://example.com/source" } // If present
],
"systemInstruction": {
// "parts": [{ "text": "You are a helpful assistant for coding." }]
// or "text": "You are a helpful assistant for coding."
// or can be an empty object {} if no system instruction was set.
},
"chunkedPrompt": {
"chunks": [
{
"text": "User's first prompt text...",
"role": "user",
"tokenCount": 25 // Optional
},
{
"text": "Gemini's internal thought process for the first prompt...",
"role": "model",
"isThought": true, // Indicates a thought step
"tokenCount": 50 // Optional
},
{
"text": "Gemini's actual response to the first prompt...",
"role": "model",
"tokenCount": 150 // Optional
},
{
"text": "User's second prompt text...",
"role": "user",
"tokenCount": 30 // Optional
}
// ... more chunks representing the conversation flow
]
}
}chunkedPrompt.chunksis the core array of interaction turns.- Each chunk has a
role(userormodel) andtext. - Model chunks may have
isThought: trueto distinguish them. tokenCountis displayed if present.runSettings,citations, andsystemInstructionare parsed from the top level of the JSON.
- HTML5
- CSS3 (Flexbox for layout)
- JavaScript (Vanilla JS)
- Marked.js - For Markdown parsing.
- DOMPurify - For HTML sanitization.
- Highlight.js - For syntax highlighting.
Contributions, bug reports, and feature requests are welcome! Please feel free to:
- Fork the repository (https://github.com/aresprom/Gemini-json-Viewer).
- Create a new branch (
git checkout -b feature/YourImprovement). - Make your changes.
- Commit your changes (
git commit -m 'Add YourImprovement'). - Push to the branch (
git push origin feature/YourImprovement). - Open a Pull Request.
- More robust error handling for slight variations in the Gemini JSON structure.
- Advanced search/filtering options (e.g., filter by "thought" steps, search within responses).
- Option to save the current view or a processed version.
- UI Theming (e.g., light/dark mode for the viewer).
- Better handling of image/multimedia content if present in Gemini exports.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Project by Marcel Mayr (@ marcelamayr on GitHub | marcelamayr.com)
