A simple and elegant web application to merge all <path> elements from an SVG into a single path.
- Automatic merging: Combines all
<path>elements from an SVG into a single path - Real-time preview: Visualize the original SVG and merged SVG side by side
- Detailed statistics: Number of paths, file sizes, and reduction percentage
- One-click copy: Easily copy the merged SVG to clipboard
- Modern interface: Clean and responsive design with Tailwind CSS
- Optimized build: Built with Vite for maximum performance
- Node.js (version 16 or higher)
- npm or yarn
# Install dependencies
npm install# Start the development server
npm run devThe application will be accessible at http://localhost:3000
# Create an optimized production build
npm run build
# Preview the production build
npm run preview- Paste your SVG code in the left field
- The application will automatically merge all
<path>elements - The result will appear in the right field
- Click "Copy" to copy the merged SVG
The application is automatically deployed to GitHub Pages via GitHub Actions on every push to the main branch.
# Build for production
npm run build
# The dist/ folder contains the production-ready filesInput:
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<path d="M 10 10 L 30 10 L 30 30 L 10 30 Z" fill="#4f46e5"/>
<path d="M 40 10 L 60 10 L 60 30 L 40 30 Z" fill="#6366f1"/>
<path d="M 70 10 L 90 10 L 90 30 L 70 30 Z" fill="#818cf8"/>
</svg>Output:
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<path d="M 10 10 L 30 10 L 30 30 L 10 30 Z M 40 10 L 60 10 L 60 30 L 40 30 Z M 70 10 L 90 10 L 90 30 L 70 30 Z" fill="#4f46e5"/>
</svg>- Vite - Fast and modern build tool
- Tailwind CSS - Utility-first CSS framework
- JavaScript ES6+ - Modern JavaScript
- HTML5 - Semantic structure
- The
fill,stroke, andstroke-widthattributes from the first path are preserved - Complex transformations may require manual processing
- The application runs entirely client-side (no data is sent to any server)
The interface includes:
- Two text fields for SVG code (input and output)
- Two preview areas with checkerboard background
- Real-time statistics
- Intuitive action buttons
All operations are performed locally in your browser. No data is transmitted to any external server.
This project is free to use for any personal or commercial purpose.
Contributions are welcome! Feel free to open an issue or submit a pull request.