Game Boy tile converter
Turn a PNG into Game Boy tile data and a tile map, ready to paste into a GBDK or RGBDS project, or turn raw tile data back into a picture you can look at.
Choose a PNG, drag one onto this box, or paste one.
Everything happens in your browser. Your files are never uploaded.
How it works
A Game Boy draws everything from 8×8 pixel tiles in four colours. Each tile is 16 bytes: two bytes for every row, one holding the low bit of each pixel's colour and one holding the high bit. That format is usually called 2bpp, for two bits per pixel.
The converter reduces your image to four colours, cuts it into tiles, and writes them out. A picture that already uses four colours or fewer keeps them as they are, lightest as colour 0; anything else is sorted into four bands by brightness. If the same tile appears more than once it is stored once, and the tile map records which tile goes in each position.
Going the other way, raw tile data has no width of its own, so you choose how many tiles to draw across. Sixteen suits most tile sheets; change it until the picture lines up.
Using the output
In GBDK, load the tiles and draw the map as a background:
set_bkg_data(0, TILES_TILE_COUNT, tiles_tiles);
set_bkg_tiles(0, 0, TILES_MAP_WIDTH,
TILES_MAP_HEIGHT, tiles_map);In RGBDS, copy the bytes between the Tiles and TilesEnd labels into video memory, then the map. The binary option saves the same bytes as files for INCBIN.
Limits
- A background can use 256 different tiles, and an original Game Boy holds 384 in total. The tool warns you past either.
- Sizes that are not a multiple of 8 are padded with colour 0 on the right and bottom.
- This is for backgrounds and tile sheets. It does not write sprite metadata or Game Boy Color palettes; GBDK's png2asset is the tool for those.
- To draw tiles, or edit ones already in C, use the sprite editor.
More tools
Game Boy Camera converter
Turn a photo or your webcam into a 128×112, four-shade Game Boy Camera picture, using the camera's real dither tables.
Game Boy Printer strip maker
Print your photos the 1998 way: a strip of Game Boy Camera shots on thermal paper, torn edges and all.
Game Boy Camera save viewer
Open a save file from a real Game Boy Camera and pull out every photo as a PNG, including deleted ones still on the cartridge.
Game Boy sprite editor
Draw 8×8 and 8×16 sprites and tiles, open existing C arrays, and export png2asset-style C for GBDK.
Super Game Boy border builder
Check 256×224 border art against the Super Game Boy's tile and palette limits, preview it, and export it as C for GBDK.
Game Boy text generator
Type a title and save it as a PNG in a pixel font on a Game Boy palette, in a 160×144 frame or a thumbnail shape.
Game Boy sound toy
Play the Game Boy's four sound channels, then copy the register values and a GBDK C snippet for the sound you made.
Game Boy ROM header inspector
Drop a .gb or .gbc file to read its title, CGB and SGB flags, mapper, ROM and save RAM size, and whether its checksums are valid.