# Tilemap Converter (TMX, Tiled JSON, PNG, collisions) > Convert Tiled TMX and JSON maps, render a PNG and merge collision rectangles. Convert tile maps between Tiled TMX (CSV, base64, zlib or gzip layers), Tiled JSON, engine-neutral JSON and Flipline Tilemap Desk projects. Render a flattened PNG with flip flags and export solid tiles as merged collision rectangles for physics engines. Part of usefulweb.site (https://usefulweb.site/). Part of [Flipline](https://flipline.usefulweb.site/) (ownerApp: flipline). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://fliplinetilemapconverter.usefulweb.site/ (interactive tool at https://fliplinetilemapconverter.usefulweb.site/tool) - JSON API: POST https://fliplinetilemapconverter.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://fliplinetilemapconverter.usefulweb.site/api/v1/tool) - OpenAPI: https://fliplinetilemapconverter.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://fliplinetilemapconverter.usefulweb.site/mcp - tool `flipline_tilemap_converter` ## Inputs - map (textarea): Map text (TMX, Tiled JSON, engine-neutral JSON or Flipline tilemap project) - file (file): Or: map file - images (file): Tileset and image-layer PNGs (one PNG or a ZIP of PNGs, matched by file name) - target (select): Convert to - encoding (select): Tile layer encoding (TMX and Tiled JSON) - render (boolean): Also render a PNG preview - scale (integer): PNG scale ## Method - Reads TMX and Tiled JSON (format 1.10) with embedded single-image tilesets, tile properties, collision objects, animations and Wang sets; tile layers in CSV or base64 (uncompressed, zlib or gzip; zstd is reported). Infinite maps are read from chunks and written as 16 × 16 chunks. - Global tile ids keep Tiled’s flip flags (bit 31 horizontal, 30 vertical, 29 anti-diagonal). Tilesets are renumbered consecutively from firstgid 1. The 120° hexagonal flag, layer groups (flattened), text objects and object templates are not supported and are reported. - The PNG render draws visible tile and image layers in order, bottom-left aligned like Tiled (isometric: centred on the diamond), applying flips in Tiled’s order (anti-diagonal, then horizontal, then vertical) and layer opacity. Missing images become placeholder colours; animated tiles show their first frame; objects are not drawn. - Collision export: solid cells (non-one-way rectangles covering the whole tile) are merged by greedy meshing — the widest run in a row extended downwards — so rectangles cover exactly the solid cells without overlap. Full-tile one-way tiles become horizontal runs; other shapes become polygons in map pixels with flips applied. - The same import, export, render and collision code runs in Flipline’s Tilemap Desk, so a map exported there converts to identical bytes here.