Overview
Emoji2PNG is a lightweight JavaScript library that converts emoji characters into PNG images programmatically. It supports custom size, transparent background and export-ready output.
Features
- Convert emoji to PNG image
- Custom output size
- Transparent background support
- Base64 image output
- Reusable JavaScript API
Quick Start
- Download the library.
- Import emoji2png.js into your project.
- Pass an emoji and size value.
- Receive PNG output and use it anywhere.
Usage Example
import {emojiToPng} from "./emoji2png.js";
const img = await emojiToPng("🔥",128);
console.log(img);
Display Result
document.body.innerHTML =
`<img src="${img}">`;
API
-
emojiToPng(emoji,size)
Converts emoji to PNG. -
emoji
Any emoji character. -
size
Output image size in pixels.
Example Inputs
emojiToPng("😀",64)
emojiToPng("🚀",128)
emojiToPng("🔥",256)
Use Cases
- Sticker generators
- Emoji icon systems
- Social media tools
- Canvas drawing projects
- Custom avatar generation