A powerful SVG toolkit that helps developers and designers view, optimize, and convert SVG files.
- SVG Viewer: Real-time preview and edit SVG code
- SVG Optimizer: Reduce SVG file size, improve performance
- SVG Converter: Convert SVG to other formats (such as PNG, JPG, etc.)
- Code Editor: Built-in syntax highlighting SVG code editor
- Real-time Preview: Instantly view SVG editing effects
- Zoom Control: Adjust SVG preview size
- File Import/Export: Upload SVG files and download optimized results
- Responsive Design: Adapts to various device screens
- Next.js - React framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible UI components
- Prism.js - Code syntax highlighting
- Lucide React - Icon library
- Node.js 18.x or higher
- npm or yarn or pnpm
- Clone the repository
git clone https://github.com/yourusername/svg-viewer.git
cd svg-viewer
- Install dependencies
npm install
# or
yarn install
# or
pnpm install
- Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
- Open your browser and visit http://localhost:3000
- Enter or paste SVG code in the code editor
- View the SVG in real-time in the preview window on the right
- Use the zoom slider to adjust the preview size
- Adjust the canvas size to accommodate different SVGs
- Upload an SVG file or enter SVG code in the editor
- Click the "Optimize" button
- View the file size comparison before and after optimization
- Download the optimized SVG file
- Upload an SVG file or enter SVG code in the editor
- Select the target format (PNG, JPG, etc.)
- Set output options (size, quality, etc.)
- Click the "Convert" button
- Download the converted file
The project can be easily deployed to Vercel, Netlify, or other platforms that support Next.js:
# Build for production
npm run build
# or
yarn build
# or
pnpm build
# Start production server
npm start
# or
yarn start
# or
pnpm start
Contributions are welcome! Feel free to submit issues or pull requests.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
Project Maintainer - @sing1ee
Project Link: https://github.com/sing1ee/svg-viewer