MSG Viewer is a lightweight, secure, and fully offline .msg and .eml email file viewer designed for Windows. It allows users to open, inspect, and extract attachments from Microsoft Outlook message files (.msg) and standard RFC 822 / MIME email files (.eml) without requiring Microsoft Outlook, administrative permissions, or uploading sensitive data to external servers.
- MSG Viewer
- π 100% Offline & Private: All file processing occurs locally on your machine. Your emails and attachments never leave your device.
- π§ Multi-Format Support (.msg & .eml): Full compatibility with Outlook binary message files (
.msg) and standard MIME/RFC 822 files (.eml). - π§ Complete Email Rendering: High-fidelity display of HTML bodies, plain text fallbacks, sender/recipient metadata, headers, and dates.
- π Attachment Management: Detects, previews, and allows direct one-click downloads of all attached files.
- π¨ Modern Web UI: Responsive email client layout featuring:
- Dark Mode / Light Mode (automatic system detection & persistent preference).
- Multi-language Support (English, Spanish, French, and Portuguese with live switching).
- Drag & Drop file opening support for
.msgand.emlfiles.
- π» Zero-Admin Windows Integration:
- 1-Click Desktop Shortcut: Create a desktop icon directly from the UI or PowerShell.
- Run standalone in native Edge App Mode (
--app). - Silent launcher script to hide terminal windows.
MSG Viewer operates as a dual-layer application:
- Frontend: Standalone web interface built with HTML5, CSS3, and JavaScript, running inside Microsoft Edge in App Mode (
--app) or standard modern browsers. - Backend: Lightweight local Python HTTP/REST API server listening on
127.0.0.1:48721, usingextract-msgand Python's nativeemailstandard library to parse.msgand.emlformats directly from the file system or memory.
[ .msg / .eml File ] βββΊ [ Local Python Server (127.0.0.1:48721) ] βββΊ [ MSG Viewer App (Edge/Browser UI) ]
The local server binds strictly to loopback address 127.0.0.1:48721.
- Conflict Prevention: Standard ports like
8080,8000,3000, or5000are frequently occupied by web servers (Tomcat, Spring Boot, IIS), developer tools, or Docker containers. Port48721resides in the unassigned private range, preventing port collision issues. - Local Isolation: The socket is bound exclusively to
127.0.0.1(localhost), meaning it is completely unreachable from outside the machine or local area network.
The application features a Dual-Engine communication model:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MSG Viewer Frontend (UI) β
β (Edge App / JavaScript / DOM Sanitizer) β
βββββββββββββββββββββ²βββββββββββββββββββββββββββββββββ²ββββββββββββββββββββ
β β
HTTP Fetch β (JSON Response) β (Pure JS Fallback)
REST API β Metadata, HTML, Attachments β If Python offline
β β
βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββΌββββββββββββββββββββ
β Local Python Server (48721) β
β (extract-msg & email / PowerShell Dialogs) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-
Server-Assisted Processing (Primary): The frontend communicates asynchronously with the local Python server via the standard
Fetch API.GET /api/health: Health-check endpoint used during startup to verify server readiness or detect existing instances before opening new windows.GET /api/load-file?path=<path>: Loads and extracts a.msgor.emlfile directly from local disk. Python extracts headers, sender/recipient details, date/time, HTML/plain text bodies, and base64-encoded attachments, returning a structured JSON payload to the UI.POST /api/parse: Parses raw.msgor.emlbinary buffers uploaded via drag-and-drop or file selection.GET/POST /api/pick-files&/api/pick-folder: Triggers native Windows file/folder selection dialogs through PowerShell, recursively scanning directories for.msgand.emlfiles and extracting metadata in batches.POST /api/open-folder: Opens Windows File Explorer highlighting the active email file location on disk.POST /api/delete-file: Safely removes the selected email file from disk upon user confirmation.POST /api/create-shortcut: Automatically generates a Windows Desktop shortcut with the custom application icon.
-
Client-Side Fallback (Secondary): If the Python server is not reachable, the frontend seamlessly activates its embedded JavaScript OLE Compound File (CFBF), EML MIME parser, and LZFu decompressor engine, enabling 100% standalone offline operation directly within any browser window.
-
Windows 10 / 11
-
Python 3.8+ (recommended for full binary parsing)
-
Dependencies:
pip install extract-msg
git clone https://github.com/YOUR_USERNAME/msg-viewer.git
cd msg-viewer- Start the viewer:
- Silent Mode (Recommended): Double-click
MSG-Viewer.vbsto launch the application seamlessly without opening a console window. - Command Prompt: Run
Start-MSG-Viewer.cmd.
- Silent Mode (Recommended): Double-click
You can create a desktop shortcut in two ways:
- Open the application.
- Click the About icon (
βΉοΈ) in the top navigation bar or the Windows Integration button on the welcome screen. - Under the Windows Integration section, click Create Desktop Shortcut.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\scripts\Create-Desktop-Shortcut.ps1msg-viewer/
βββ index.html # Main application user interface
βββ manifest.json # Web app manifest configuration
βββ favicon.ico # Multi-resolution application icon
βββ Start-MSG-Viewer.cmd # Windows batch launcher (starts server & opens app mode)
βββ MSG-Viewer.vbs # Silent VBScript launcher (hides command prompt)
βββ css/ # CSS stylesheets (design system, dark/light themes)
βββ docs/ # Documentation assets and icons (SVG, PNG, ICO)
βββ js/ # Client-side logic (UI, parsing fallback, i18n)
βββ py/ # Local Python server & backend scripts
β βββ server.py # HTTP REST API server (processes .msg & .eml files)
β βββ launch.ps1 # Background python server launcher
βββ scripts/ # Utility scripts
βββ Build-EXE.ps1 # Build standalone MSG-Viewer.exe using PyInstaller
βββ Create-Desktop-Shortcut.ps1 # Create Windows desktop shortcut with app icon
βββ Sign-Application.ps1 # Self-signing code certificate script
To compile a standalone portable executable dist/MSG-Viewer.exe with the custom application icon embedded:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\scripts\Build-EXE.ps1Or using PyInstaller directly:
pyinstaller MSG-Viewer.spec --clean --noconfirmThe resulting executable will be located in dist/MSG-Viewer.exe.
- No Remote Calls: No telemetry, tracking scripts, or external dependencies.
- Localhost Binding: The local backend server binds strictly to
127.0.0.1:48721and is inaccessible from external networks. - No Installation Needed: Works cleanly out of local directories without installing system-wide drivers or background services.
- Security Policy: For responsible disclosure and vulnerability reporting, see
SECURITY.md.
Distributed under the GNU General Public License v3.0 (GPLv3). See LICENSE for more information.

