Game Boy Tile Converter
Turn a picture into Game Boy graphics: the four Game Boy shades, a tile set and a tile map, ready for GB Studio, GBDK or RGBDS.
Runs on your device
1. Choose a picture
Drop a picture here
or
PNG, JPEG, GIF, WebP or BMP. You can paste a screenshot too.
A little scene drawn by the page, to see what the settings do.
2. Preview
Original, resized to match
Your picture will show here.
Game Boy version
Choose a picture, or try the sample.
The tile set, 16 to a row, in the order they are saved
The tiles will show here.
Point at the picture, or tab to it and use the arrow keys, to see each tile’s number.
3. Shades
Only changes how it looks. The saved tiles are the same four shades whatever you choose.
Codes from Lospec or any paint program work, separated by spaces, commas or new lines.
Dithering mixes dots of two shades to fake the tones in between. Ordered patterns repeat, so they need fewer tiles.
Move it right for more dark shades, left for more light ones.
More shade options
Automatic keeps a picture’s own colours when it has four or fewer, so ready-made Game Boy art comes out exact. “Nearest colour” suits art drawn in the palette above but saved as a JPEG.
4. Size and tiles
From 8 to 2048. The height follows the picture’s shape.
More tile options
Top left keeps pixel art drawn on an 8 pixel grid lined up with the tiles.
Where your tiles start in video memory, say 128 to leave room for a font. The map numbers count from it. Tall sprites start on an even number.
5. Save
Used for the file names and the names in the code.
Save one file at a time
The colour attributes file is only needed when tiles are mirrored or there are more than 256.
Saving options
The GB Studio picture is always actual size.
Look at the code
Choose a picture first.
Choose a picture first.
Choose a picture first.
How it works
Your picture is opened by your own browser and worked on in the background on your device. Nothing is uploaded, and the page is not allowed to send it anywhere.
The Game Boy draws everything from tiles: little squares of 8 by 8 pixels, each pixel one of four shades. This tool shrinks your picture if it needs to, turns its colours into those four shades, cuts it into tiles, and keeps one copy of each tile that repeats. The tile map then says which tile goes where.
Which file do I need?
GB Studio: the PNG. It uses GB Studio’s own four colours, so it imports as it looks here. Backgrounds should be at least 160 by 144 pixels.
GBDK: the .c and .h files. Add the .c file to your build and include the .h file; the comment at the top shows the lines that load the tiles and the map.
RGBDS: the .asm file, to INCLUDE in your code. If you prefer INCBIN, use the .2bpp and map .bin files instead.
Anything else: the .2bpp file is the tiles exactly as the Game Boy stores them, 16 bytes each, and the map .bin is one byte per tile, row by row.
Too many tiles? How to bring the number down
A background can only point at 256 different tiles at a time, and the Game Boy holds 384 in all. A full screen is 360 tiles, so a busy photo will not fit. To bring it down: turn dithering off or pick an ordered pattern (Floyd-Steinberg makes almost every tile different), raise the contrast so more areas become flat shades, make the picture smaller, or tick “Also reuse tiles that match when mirrored” if you are making it for the Game Boy Color.
How the tiles are stored
Each tile is 16 bytes: two for each of its 8 rows. The first byte of a row holds the low bit of each pixel’s colour and the second byte the high bit, with the leftmost pixel in the top bit. Colour 0 is the lightest shade and colour 3 the darkest, which is how the Game Boy’s usual palette sets them up. On sprites, colour 0 is see-through.
In 8 by 16 mode each sprite is two tiles, the top one then the bottom one, and the map gives the top tile’s number, which is always even.
Mirrored tiles use bit 5 (left to right) and bit 6 (top to bottom) of the colour attributes file, and tiles past number 255 set bit 3 for the Game Boy Color’s second bank. An original Game Boy cannot mirror background tiles.
Good to know
Only the first frame of an animated GIF is used. Very large pictures are read at up to 2560 pixels on their longest side (pictures over about 80 million pixels are too big to open, so make those smaller first), and the finished picture can be up to 2048 pixels on a side. Pixel art that was enlarged by a whole number, such as an emulator screenshot at 3 times, is shrunk back automatically. Your settings are remembered in this browser only.