---
title: "Difference between 256x256, 512x512, and HiDPI/Retina rasterized tiles | Guides | Maps apis | Maps platform"
description: "Differences between tile sizes and HiDPI resolution in MapTiler."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Difference between 256x256, 512x512, and HiDPI/Retina rasterized tiles

This article explains what are the several types of rasterized map tiles available in [MapTiler](https://cloud.maptiler.com/).

You will learn what is the difference between larger tile size and scale as well as what to choose when developing your application.

_The differences between rasterized map tiles described in this article only apply to on-the-fly rasterized **Maps** requested from MapTiler (and MapTiler Server). It does not apply when requesting **Tiles**, which are pre-generated and there is no dynamic processing involved._

## Introduction

The maps available in MapTiler are primarily _vector-based_ and it is recommended to display the maps as vectors whenever possible.

In case your application is not able to display the vector maps directly, or if you need the maps as raster tiles for compatibility or performance reasons, it is possible to use the on-the-fly rasterized map tiles.

There are two different endpoint parameters, which affect how the resulting tile is rasterized from the vector data. See the [API specification](https://docs.maptiler.com/cloud/api/#tag/Maps/paths/~1maps~1{mapId}~1{tileSize~1}~1{z}~1{x}~1{y}{scale}.{format}/get) of the endpoint for details on how to use them.

## Larger size → larger area

The first parameter is the **size of the tile**. By default, MapTiler rasterizes each requested tile as a 512x512 image, but you can also explicitly request a 256x256 image instead (using a `256/` prefix).

We _recommend_ sticking with the 512x512 tiles because these usually result in _better application performance_ – fewer network requests are required to cover the same area.

Both 256x256 and 512x512 have exactly **the same content scale** (identical pixel size of features and labels), the only **difference is in the covered area**.

Note

The StyleJSON specification and the Style editor use the zoom-level numbering based on the 512x512 tile size, so when requesting the 256x256 tiles instead, you need to shift the zoom levels by 1 to get the same visual style.

## HiDPI/retina → better resolution

In addition to the different tile sizes, it is also possible to request a **HiDPI** (also called “retina”) version of the tile by adding a `@2x` suffix before the extension.

Both the default and the HiDPI versions display exactly **the same area and content**, but the HiDPI version simply contains **more pixels**. Therefore all the lines are “thicker” and all the labels are “bigger”.

It is intended to be used on devices with very fine pixels (such as mobile phones) so that the labels remain readable and the map style looks as intended.

### Device pixel ratio

In reality, the devices have various displays with different physical sizes and pixel resolutions. The _device pixel ratio_ tells you how many pixels you need to use on the specific device so that the final content looks the same across all the devices.

The `@2x` suffix generates images that are double the size in both dimensions, so it’s ideal for devices with a device pixel ratio equal to 2. However, many devices have this ratio different and ideally, you would need different tiles for different devices.

The correct solution to this issue is to use the vector tiles instead because then each feature of the map is actually rendered client-side taking into account all the specifics of the device and its display.

Note

The HiDPI/retina suffix can also be used when requesting images via the [Static Maps API](https://docs.maptiler.com/cloud/api/#tag/Static-maps).

## Visual comparison

![](./4410423203601_7d0b31c341.webp)

## Choosing the correct variant

As previously mentioned, we strongly recommend using the **vector maps** wherever possible. The [MapLibre project](https://maplibre.org/) provides great SDKs for both browser and mobile platforms. It is also possible to use [OpenLayers](https://openlayers.org/en/latest/examples/mapbox-style.html) for displaying the map in the browser (which _does not require WebGL_). There are also code samples available in MapTiler for both [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/examples/display-map-navigation-controls/) and [OpenLayers](https://docs.maptiler.com/openlayers/examples/vector-tiles-in-openlayers/). _This is the best way to achieve a really sharp-looking map._

In case you want to use the raster tiles, MapTiler provides the standard **TileJSON** for both 512x512 and 256x256 map tiles. These can be used in OpenLayers, Leaflet (with a plugin), and many other applications.

You can also use the **XYZ tiles** directly (without requesting the TileJSON), but this usually requires a little more setup (e.g. make sure to correctly display the _attribution_).

If possible, we recommend using the **512x512** tiles, which usually result in _better performance_ and a _better user experience_. Use the 256x256 only when working with legacy application/software/framework, which is unable to use the larger tiles.

For using the HiDPI/retina tiles, there is an official [OpenLayers example](https://openlayers.org/en/latest/examples/xyz-retina.html) of how to do it. But once again, using the vector tiles is the superior approach to achieve the best-looking result across different devices.

## Conclusion

-   When building a new application, try to use **vector maps** whenever possible to achieve the best visual look of the map across multiple devices. Using [MapLibre SDKs](https://maplibre.org/) or [OpenLayers](https://openlayers.org/).
-   If your application/framework can only display rasterize maps tiles:
    -   the default 512x512 is usually the best choice
    -   use the legacy 256x256 rasterized map tiles only if you have no other option
    -   you can use the HiDPI/retina tiles if you want to make the map look sharper on mobile devices. (And your application/framework is able to handle it correctly.)

## Useful links

[Raster Data vs. Vector Data](https://docs.maptiler.com/guides/how-maps-work/raster-vector-tiles/)
