Overview
Preview .html, .md, .json and diagram files inside Google Chat, and .html and diagram files in Google Drive. No download needed.
Someone drops an .html report, a .md spec or a .json export into a Google Chat thread, and reading it costs you four steps: download, find it in Downloads, open it, come back. This extension adds a Preview button next to the attachment and shows you the file in place. It works in Google Drive too. .html, .mmd and .puml files get the same button in the file list, the grid and the viewer, which otherwise shows them as source text. .md and .json are offered in Chat only. WHAT IT PREVIEWS • HTML — rendered as the page it is, exactly as the sender built it. • Markdown — headings, lists, tables, code blocks and links, properly rendered rather than shown as source. Fenced code is syntax-coloured in around 25 common languages. A fence tagged with something unrecognised stays a plain code block rather than being coloured wrongly. • Mermaid and PlantUML files — a whole .mmd or .puml attachment opens as the diagram itself, not as text. Mermaid is drawn on your own machine. Turn drawing off in the settings and the file still opens, showing its source, so a PlantUML file can be read without its source going anywhere. • JSON — a collapsible tree with syntax colouring, array indices and key counts, plus Expand all and Collapse all. A file that fails to parse still opens: you get the parse error above the raw text, because seeing why it is broken is usually the point. Plain .txt is deliberately left alone — Google Chat already previews it, and a second button next to Google's own preview would only be noise. DIAGRAMS IN MARKDOWN Fenced ```mermaid blocks are drawn as flowcharts, sequence diagrams and the rest, rendered entirely on your own machine — nothing is sent anywhere. Fenced ```plantuml blocks are drawn too; PlantUML has no browser renderer, so those send the diagram source to a PlantUML server. That is on by default using the public plantuml.com, and you can switch it off or point it at a server inside your own network. Mermaid diagrams never leave your browser. BUILT FOR FILES YOU DID NOT WRITE Anyone in a chat can send you a file, and anyone can share one with you in Drive, so every previewed file is treated as hostile. • It cannot reach your Google session. The preview renders in a doubly sandboxed iframe with no same-origin access — your cookies, the Chat or Drive page and the extension's own APIs are all out of reach. The file's markup is never inserted into the Google page. • It cannot phone home. Network access inside a preview is switched off at the Content Security Policy level: no fetch, no XHR, no WebSocket, no form posts, no popups, no remote images, fonts or scripts. Nothing a previewed file observes can leave your browser. That holds whether or not you switch on the linked-resources setting below — it never gives the page network access, it only has the extension fetch and embed the files beforehand. • Its scripts do not run until you say so. HTML previews start fully static and gain scripting only when you click Enable scripts on that specific preview. A page that cannot run code cannot capture what you type, which is what makes a fake login form in an attachment harmless. Markdown and JSON previews have no such toggle at all — the extension builds those documents itself and escapes every tag, so a JSON value containing <script> is just characters on screen. • It tells you what it found. Before an HTML file is shown, the extension reads it on your machine and names what it holds: scripts, a password field, a page that looks like a sign-in, or scripts that look deliberately disguised. Nothing is sent anywhere for this. No note means nothing was found, not that the file is safe; the sandbox protects you either way. LINKED RESOURCES FROM A CDN The cost of cutting off the network, stated plainly: a file that pulls its styling, fonts or scripts from a CDN renders without them, as unformatted text. If you would rather see those files the way they were written, you can switch it on and list the hosts you trust — the common CDNs are suggested for you. The extension then downloads what the file links to, over https and without your cookies, and builds it into the preview before showing it. The page itself still reaches nothing; what changes is that a host you allowed can tell you opened a file linking to it. That is why it is off until you turn it on, limited to hosts you name, and why turning it back off hands those permissions back. SETTINGS Open the options page from chrome://extensions to choose which file types get a Preview button, whether HTML previews start with scripts enabled (off by default), whether linked resources are loaded and from which hosts (off by default), whether Mermaid and PlantUML render, which PlantUML server to use, how much of a JSON tree opens by default, and the maximum file size to preview (5 MB by default). PRIVACY The extension has no analytics, no account, no server of its own, and sends nothing anywhere except the three cases it tells you about: fetching the file you asked to preview from Google's own servers; if you leave PlantUML enabled, the source of a PlantUML diagram to the PlantUML server you have configured; and if you switch linked resources on, the files an HTML file links to, from the hosts you allowed. Full policy: https://hblab-dieuhd.github.io/gchat-preview-files/ Not affiliated with, endorsed by, or sponsored by Google. Google Chat and Google Drive are trademarks of Google LLC.
5 out of 52 ratings
Details
- Version1.4.0
- UpdatedNovember 8, 2026
- Size1016KiB
- LanguagesEnglish
- DeveloperWebsite
Email
dieuhd@hblab.vn - Non-traderThis developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.
Privacy
File Preview for Google Chat & Drive has disclosed the following information regarding the collection and usage of your data. More detailed information can be found in the developer's privacy policy.
File Preview for Google Chat & Drive handles the following:
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes
Support
For help with questions, suggestions, or problems, please open this page on your desktop browser