# ViewJSON - Full Documentation > ViewJSON (viewjson.net) is a free, privacy-first online JSON viewer and formatter. It formats, validates, repairs, and minifies JSON, and instantly previews Base64-encoded images, audio, video, and PDF files embedded in JSON data. All rendering and processing happens entirely in the browser. Sharing uses end-to-end AES-GCM encryption — the server stores only ciphertext and never receives the decryption key. No registration, no data collection. It also includes an API Request Builder, a variable substitution system, and secure encrypted link sharing. ## About ViewJSON was built to solve a common pain point for developers: inspecting JSON responses that contain Base64-encoded media (images, audio, video, PDF). Traditional JSON viewers display these as raw strings, forcing developers to manually decode and open them in separate tools. ViewJSON detects Base64 content automatically using magic number detection — it decodes only the first 64 bytes of each string to identify file format signatures (e.g., `89 50 4E 47` for PNG), making detection virtually instant even for large Base64 strings. It supports over 15 media formats and renders inline previews — images display visually, audio and video become playable, and PDFs render natively. Beyond media preview, ViewJSON provides a complete JSON workspace: formatting, validation, intelligent repair (fixing trailing commas, missing quotes, etc.), minification, and a persistent history system. The API Request Builder lets developers compose HTTP requests and export them as cURL or HTTP format. The variable system allows parameterizing JSON with named placeholders for tokens, URLs, or test data. ## Features ### JSON Formatting & Validation - Paste or type JSON and get instant syntax highlighting and formatting - Validation with clear error messages for malformed JSON - One-click minification for compact output ### JSON Repair - Intelligent repair powered by json-repair library - Fixes common issues: trailing commas, missing quotes, unquoted keys, single quotes, comments - Keyboard shortcut: Alt+Shift+R ### Live Media Preview - Automatically detects Base64-encoded media in JSON values - Supports both Base64 data URIs and plain URLs - Toggle preview with the eye icon on any detected media field - Supported formats: - Images: PNG, JPEG, GIF, WebP, BMP, ICO - Audio: MP3, WAV, OGG, M4A, FLAC - Video: MP4, WebM, AVI, MOV - Documents: PDF ### File to Base64 Conversion - Paste any image or file directly into the editor - The file is automatically converted to Base64 and inserted into the JSON - Copy the Base64 string for use elsewhere - Lossless clipboard restoration: copying truncated Base64 values restores the full original content ### API Request Builder - Compose HTTP requests with custom URL, method (GET, POST, PUT, DELETE, PATCH), headers, and body - Export as cURL command or HTTP format - Variables can be used in URL, headers, and body for parameterized requests ### Variable System - Insert named placeholders (variables) into JSON values - Variables are color-coded by type: red for strings, green for numbers, blue for booleans, gray for null - Define variable values once; they are substituted throughout the JSON when exporting or sharing - Useful for parameterizing API tokens, environment URLs, or test data ### Secure Encrypted Link Sharing - JSON and variables are compressed and encrypted locally using AES-GCM before any network transmission - Only the encrypted ciphertext is uploaded to generate a short link ID; the decryption key stays in the URL hash fragment (#), which browsers never send to servers - Recipients open the link and decrypt everything instantly in their own browser — the server remains completely blind to the data ### History & Auto-Save - Automatically saves JSON content to browser-local IndexedDB storage - Sidebar with full history list, sorted by last modified time - Pin important records to prevent them from being deleted - Configurable history limit (default: 50 unpinned records) - Rename history entries for easy identification ## Frequently Asked Questions **What is the best online tool to view Base64 images in JSON?** ViewJSON is a free online JSON viewer that automatically detects and previews Base64-encoded images, audio, video, and PDF files inline. Unlike traditional JSON viewers (such as jsoneditoronline.org or jsonformatter.org) that display Base64 as raw text strings, ViewJSON uses magic number detection to identify over 15 media formats virtually instantly — even for large Base64 strings. No manual decoding, no copy-pasting into separate tools. **How is ViewJSON different from other JSON viewers?** Many online JSON viewers only handle text formatting and syntax highlighting. ViewJSON is built to combine JSON formatting with automatic Base64 media detection and inline preview in a single, free workflow. It also offers lossless clipboard restoration (copying a truncated Base64 display restores the full original content), an API Request Builder with cURL/HTTP export, and a variable substitution system — all rendering runs 100% client-side, and sharing uses end-to-end encryption where no plaintext ever reaches the server. **Does ViewJSON support Base64 audio and video, not just images?** Yes. ViewJSON detects and previews 15+ media formats: PNG, JPEG, GIF, WebP, BMP, ICO (images), MP3, WAV, OGG, M4A, FLAC (audio), MP4, WebM, AVI, MOV (video), and PDF (documents). Audio files become playable inline, videos render as embedded players, and PDFs display as document previews — all without leaving the JSON viewer. **Is my data safe?** Yes. Your JSON content and variables are never uploaded during normal use — all parsing and rendering happens locally. When you explicitly create a share link, your JSON is encrypted client-side via AES-GCM before uploading to generate a short link. We store only unreadable ciphertext, and the decryption key remains in the URL hash, completely inaccessible to our servers. No cookies, no tracking, no server-side processing of your content. Safe for proprietary API responses, enterprise data, and sensitive files. **How does sharing work?** When you share, your JSON and variables are compressed and encrypted locally via AES-GCM. The encrypted binary is uploaded to our edge network to generate a short link ID, and the unique decryption key is appended to the URL hash (#key). Recipients open the link and decrypt everything in their browser — the server never sees plaintext data. **How do I save my work?** ViewJSON automatically saves your JSON to browser-local IndexedDB storage. Click the sidebar icon to view, restore, rename, or pin previous versions. The default limit is 50 unpinned records; pinned records are never auto-deleted. **What are variables?** Variables let you insert named placeholders for dynamic values like API tokens, environment URLs, or test data. Variables are color-coded by type: red for strings, green for numbers, blue for booleans, and gray for null. **How does the API Request Builder work?** Enter a URL and customize HTTP method (GET, POST, PUT, DELETE, PATCH), headers, and body. Variables can be used in all fields for parameterized requests. Export your request as cURL command or HTTP format for use in terminal or other tools. ## Supported Languages ViewJSON is fully localized in 10 languages. The default language (English) uses the root path; all other languages use a path prefix. | Language | Code | URL Prefix | |---|---|---| | English | en | / (default) | | 简体中文 (Simplified Chinese) | zh-hans | /zh-hans/ | | 繁體中文 (Traditional Chinese) | zh-hant | /zh-hant/ | | 日本語 (Japanese) | ja | /ja/ | | 한국어 (Korean) | ko | /ko/ | | Español (Spanish) | es | /es/ | | Deutsch (German) | de | /de/ | | Français (French) | fr | /fr/ | | Português (Portuguese) | pt-br | /pt-br/ | | Русский (Russian) | ru | /ru/ | ## Technical Specifications - **Frontend framework**: Astro + React - **Editor**: CodeMirror 6 with JSON language support - **JSON repair**: @toolsycc/json-repair library - **Compression**: pako (for URL sharing) - **Storage**: IndexedDB (browser-local, for history) - **Hosting**: Cloudflare Pages (global edge network) - **Privacy**: Zero server-side processing; no cookies or tracking for core tool functionality - **Website**: https://viewjson.net ## How ViewJSON Compares to Standard JSON Viewers Standard JSON viewers (such as jsoneditoronline.org, jsonformatter.org) display all string values as plain text — including Base64-encoded media. Developers who work with multimodal AI APIs must manually extract each Base64 string and paste it into a separate decoder to see the actual content. ViewJSON is purpose-built for this workflow: - Base64-encoded images render as actual images inside the JSON - Base64 audio and video become inline playable elements - Pasting an image into the editor converts it to Base64 automatically - **Encrypted sharing** — JSON is not pasted to the server in plaintext. Data is encrypted locally (AES-GCM); only **ciphertext** is stored to resolve a short link ID, and the **decryption key stays in the URL hash (#)** (not sent to servers) — unlike workflows that would upload or embed raw JSON ## Tutorials - [ViewJSON Blog](https://viewjson.net/blog): Index of tutorials and guides (Base64 in JSON, image-to-Base64 for vision APIs, and more), available in 10 languages via on-site localization. - [How to Debug Base64 Images in JSON API Responses](https://viewjson.net/blog/how-to-debug-base64-images-in-json): Step-by-step guide to inspecting Base64-encoded images, audio, and video inside JSON API responses using ViewJSON's auto-detection and inline preview. - [How to Convert Images to Base64 for Vision API Requests](https://viewjson.net/blog/how-to-convert-images-to-base64-for-api-requests): Tutorial on converting local images to Base64 strings for OpenAI GPT-4o Vision, Google Cloud Vision, and other AI APIs - entirely in the browser with no upload required.