A powerful web-based tool for converting HTML content to various image formats. Built with Next.js and React.
- Convert HTML code to PNG, JPEG, and SVG formats
- Live preview of the rendered HTML
- Adjustable image settings (quality, pixel ratio, dimensions)
- File upload support for HTML and SVG files
- Background color customization
- Settings saved automatically to localStorage
- Responsive design for all devices
- Next.js 15
- React 19
- TypeScript
- html-to-image - Core conversion library
- Shadcn UI - UI components
- TailwindCSS - Styling
- Sonner - Toast notifications
- Node.js 20.x or higher
- npm, yarn, or pnpm
-
Clone the repository:
git clone https://github.com/yourusername/2image.git cd 2image
-
Install dependencies:
npm install # or yarn install # or pnpm install
-
Start the development server:
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open http://localhost:3000 with your browser to see the application.
- Enter your HTML code in the editor
- Customize image settings (format, quality, dimensions, background color)
- View the live preview
- Download the generated image in your preferred format
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.
- html-to-image for the core conversion functionality
- Shadcn UI for the beautiful UI components