A professional, client-side ICO file analyzer that provides comprehensive analysis of Windows icon files with detailed layer inspection, quality scoring, and actionable recommendations.
xsukax ICO File Analyzer is a sophisticated web-based tool designed for developers, designers, and system administrators who need to analyze and validate ICO (Windows Icon) files. The application performs deep inspection of icon file structures, extracts metadata from each embedded layer, calculates quality metrics, and provides professional recommendations for optimization.
Built entirely with vanilla JavaScript and requiring no backend infrastructure, this analyzer processes files locally in the browser, ensuring maximum performance and user privacy. The tool features a GitHub-inspired dark theme interface that provides an intuitive and professional user experience.
- Multi-Layer Analysis: Parses and displays all embedded icon sizes within a single ICO file
- Format Detection: Identifies PNG, BMP, and DIB formats within icon layers
- Quality Scoring: Calculates comprehensive quality scores based on industry standards
- Visual Inspection: Renders each layer with transparent background support for accurate preview
- Detailed Metrics: Provides bit depth, color count, file size, and structural information
- Smart Recommendations: Generates actionable suggestions for improving icon compatibility and quality
This application implements a privacy-first architecture that prioritizes user data protection and security:
All file analysis occurs entirely within the user's browser using the FileReader API and JavaScript binary parsing. No data is ever transmitted to external servers, eliminating risks associated with file uploads, data breaches, or unauthorized access to potentially sensitive icon files.
The application is built with zero external JavaScript libraries or CDN resources, reducing attack surface area and eliminating supply chain vulnerabilities. This self-contained design ensures that no third-party code can access or exfiltrate user data.
Icon files are processed in the browser's secure sandbox environment with no access to the file system beyond the explicitly selected file. Blob URLs are used for image rendering and are automatically revoked after use to prevent memory leaks and unauthorized access.
The application maintains no local storage, cookies, or session data. Analysis results exist only in memory during the active session and are completely cleared when the user navigates away or closes the browser tab.
Comprehensive validation checks are performed on uploaded files, including magic number verification, size constraints (10MB limit), and structure validation to prevent malformed or malicious files from causing security issues.
The complete source code is publicly available for audit, allowing security researchers and concerned users to verify the application's behavior and confirm the absence of data collection or tracking mechanisms.
- Binary-Level Parsing: Direct manipulation of byte arrays for accurate ICO structure interpretation
- Multi-Format Support: Handles PNG, BMP, and DIB image formats embedded within ICO files
- Automatic Sorting: Intelligently orders layers by size for logical presentation
- Error Handling: Robust validation with user-friendly error messages for corrupted or invalid files
- Quality Scoring Algorithm: Evaluates icons based on standard size coverage, format quality, color depth, and layer count
- Visual Rating System: Five-star rating display with descriptive labels (Poor to Excellent)
- Detailed Statistics: File structure breakdown, color depth ranges, and layer size metrics
- Interactive Layer Preview: Individual rendering of each icon layer with checkerboard transparency pattern
- GitHub-Inspired Design: Professional dark theme with carefully chosen colors and typography
- Drag-and-Drop Support: Intuitive file upload with visual feedback for drag operations
- Responsive Layout: Adapts seamlessly to different screen sizes and devices
- Smooth Animations: Polished transitions and hover effects for enhanced user experience
- Single-File Architecture: Entire application contained in one HTML file for easy deployment
- No Build Process: No compilation, bundling, or transpilation required
- Standards Compliant: Uses modern JavaScript APIs without requiring polyfills
- Lightweight: Minimal file size with no external dependencies
- Standard Size Detection: Identifies missing icon sizes (16, 24, 32, 48, 64, 128, 256px)
- Format Optimization: Suggests PNG conversion for better quality and transparency
- Color Depth Analysis: Recommends 32-bit layers for modern application compatibility
- Layer Count Guidance: Advises on optimal number of size variations
-
Download the File
wget https://raw.githubusercontent.com/xsukax/xsukax-ICO-File-Analyzer/main/index.html
or manually download
index.htmlfrom the repository -
Open in Browser
- Double-click
index.htmlto open in your default browser - Or right-click and select "Open with" to choose a specific browser
- Double-click
-
Clone the Repository
git clone https://github.com/xsukax/xsukax-ICO-File-Analyzer.git
-
Navigate to Directory
cd xsukax-ICO-File-Analyzer -
Open in Browser
# On macOS open index.html # On Linux xdg-open index.html # On Windows start index.html
For deployment on a web server:
-
Upload to Server
scp index.html user@yourserver.com:/var/www/html/ico-analyzer/
-
Configure Web Server (Optional)
For Apache, add to
.htaccess:<Files "index.html"> Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' blob:; img-src 'self' data: blob:;" </Files>
-
Access via Browser Navigate to
https://yourserver.com/ico-analyzer/
- Modern web browser with JavaScript enabled (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
- Support for ES6+ features (FileReader API, DataView, Uint8Array)
- No additional software or plugins required
flowchart TD
A[Start] --> B[Open index.html in Browser]
B --> C{Select ICO File}
C -->|Drag & Drop| D[File Validation]
C -->|Click to Browse| D
D -->|Valid| E[Binary Parsing]
D -->|Invalid| F[Display Error Modal]
F --> C
E --> G[Extract Layer Data]
G --> H[Analyze Metadata]
H --> I[Calculate Quality Score]
I --> J[Generate Report]
J --> K[Display Results]
K --> L{Analyze Another?}
L -->|Yes| C
L -->|No| M[End]
Open index.html in any modern web browser. You'll see the main upload interface with a drag-and-drop area.
Choose one of two methods:
- Drag and Drop: Drag an ICO file from your file manager directly onto the upload area
- File Browser: Click the upload area to open a file selection dialog
The application automatically processes the file and displays:
- Quality Score: Overall rating from 0-100 with star visualization
- Summary Statistics: Layer count, size range, transparency support, and file formats
- File Information: Detailed breakdown of header size, image data, and overhead
- Layer Details: Individual preview and specifications for each embedded icon size
- Recommendations: Actionable suggestions for improving icon quality and compatibility
The quality score is calculated based on:
- Standard Size Coverage (35%): Presence of common icon sizes (16, 24, 32, 48, 64, 128, 256px)
- PNG Format Usage (25%): Percentage of layers using PNG format
- Color Depth (20%): Percentage of 32-bit layers with alpha transparency
- Layer Count (15%): Number of size variations (optimal: 5-7 layers)
- Size Range (5%): Coverage of both small (≤32px) and large (≥128px) sizes
Review the recommendations section for specific improvements:
- Add missing standard sizes
- Convert layers to PNG format
- Increase color depth to 32-bit
- Add or remove layers as needed
Click the "Analyze Another File" button at the bottom of the report to return to the upload interface.
graph LR
A[ICO File] --> B[Header Parser]
B --> C[Directory Entry Reader]
C --> D[Image Data Extractor]
D --> E{Format Detector}
E -->|PNG| F[PNG Metadata]
E -->|BMP| G[BMP Metadata]
E -->|DIB| H[DIB Metadata]
F --> I[Layer Object]
G --> I
H --> I
I --> J[Quality Scorer]
I --> K[Report Generator]
J --> K
K --> L[User Interface]
Error: "Please select a valid ICO file"
- Ensure the file has a
.icoextension - Verify the file is not corrupted
Error: "File size exceeds 10MB limit"
- The file is too large for browser processing
- Consider optimizing the icon file
Error: "Invalid ICO file: incorrect type field"
- The file may be a cursor (.cur) file instead of an icon
- Verify file integrity with a hex editor
No Preview Images Shown
- Browser may block blob URLs - check console for errors
- Ensure JavaScript is enabled
- Try a different browser
This project is licensed under the GNU General Public License v3.0, ensuring that it remains free and open-source software with strong copyleft protections.
Made with ❤️ by xsukax | Report Issues