PNG to KTX2 Converter

KTX2 is the Khronos texture format for real-time 3D. This free converter turns PNG, JPG or WebP images into KTX2 files with Basis Universal (UASTC or ETC1S), with mipmaps, ready for glTF, three.js and Babylon.js. It runs in your browser, so your textures never leave your device.

Free - no signup - your files stay in your browser

Loading the tool...

How to convert PNG to KTX2

  1. 1

    Add your textures

    Drop one or many PNG, JPG or WebP images. Up to about 12 megapixels each, such as 4096x2048.

  2. 2

    Pick the settings

    UASTC for quality or ETC1S for small files, then say whether it is a colour texture, a data map or a normal map.

  3. 3

    Convert and download

    Click Convert. Each result shows its size, quality and a preview decoded from the KTX2 itself. Download one file or a ZIP.

What is KTX2?

KTX2 (KTX 2.0) is a texture file format from the Khronos Group, the standards body behind OpenGL, Vulkan and glTF. A PNG or JPG is made for screens: the GPU cannot use it until it is decoded into raw pixels, and then it takes 4 bytes per pixel in video memory. A KTX2 file instead holds texture data in a GPU block format, together with every mip level and a description of its colour space.

Most KTX2 files on the web contain Basis Universal data. It is a compact in-between format: when the app loads it, a small transcoder turns it into whatever the device supports, such as BC7 or BC1-BC3 on desktops and ASTC or ETC2 on phones. One file works everywhere and stays compressed on the GPU, which means less download, less memory and faster uploads than PNG textures.

UASTC vs ETC1S

Basis Universal has two modes for normal (LDR) textures. You can mix them in one model: pick per texture.

ModeQualityFile sizeBest for
UASTCHigh, close to the sourceLarger: 8 bits per pixel before ZstandardNormal maps, ORM / roughness / metallic maps, detailed base colour
ETC1SMedium, can show blocks on busy detailSmall, often well under a PNGColour textures, UI, large flat or simple areas, many textures on mobile
  • sRGB or linear: colour (base colour, emissive) textures are sRGB. Normal, roughness, metallic, ORM and other data maps are linear: choose "Data map" or "Normal map" so the values are not treated as colours.
  • Mipmaps: keep them on for anything on a 3D surface. They add about a third to the file and stop shimmering at a distance.
  • Zstandard: UASTC files can be supercompressed with Zstandard. Lowering the UASTC quality turns on RDO, which makes the data compress further.

KTX2 in glTF, three.js and Babylon.js

glTF points to KTX2 images through theKHR_texture_basisuextension, so a GLB can carry KTX2 textures. three.js loads them with KTX2Loader, which needs the Basis transcoder files that ship with three:

import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';

const ktx2 = new KTX2Loader()
  .setTranscoderPath('/basis/') // basis_transcoder.js + .wasm from three/examples/jsm/libs/basis/
  .detectSupport(renderer);

const texture = await ktx2.loadAsync('albedo.ktx2');      // a single texture
const gltf = await new GLTFLoader().setKTX2Loader(ktx2)   // or a glTF that uses KHR_texture_basisu
  .loadAsync('model.glb');

Compressed textures are not flipped on upload, so leave "Flip Y" off for glTF models. Turn it on only if your texture shows upside down on your own geometry.

Babylon.js loads .ktx2 files and KTX2 textures inside glTF out of the box. PlayCanvas and Needle Engine support KTX2 as well.

When to use KTX2 (and when not)

  • Use it for textures in web 3D scenes, product viewers, games and AR, above all when there are many or large textures.
  • Use it when GPU memory matters, as on phones: KTX2 textures stay compressed on the GPU.
  • Keep PNG when you need exact pixel values, such as lookup tables or pixel art, or for very small textures.
  • Keep PNG, JPG or WebP for images shown on a web page. Browsers cannot display KTX2 in an img tag.
  • HDR environment maps need an HDR mode. This tool makes LDR (8-bit) KTX2 files.

More free 3D tools

Frequently Asked Questions

KTX2 (KTX 2.0) is a texture container from the Khronos Group, the group behind OpenGL, Vulkan and glTF. It holds GPU-ready texture data with all its mip levels and colour space information. Most KTX2 files on the web carry Basis Universal data (UASTC or ETC1S), which the app transcodes at load time into a format the GPU supports, such as BC7 on desktops or ASTC and ETC on phones. The texture then stays compressed in GPU memory, while a PNG or JPG is expanded to raw pixels.
Drop your PNG files into the converter at the top of this page, choose UASTC or ETC1S, say whether each texture is colour (sRGB), data (linear) or a normal map, keep mipmaps on for 3D surfaces and click Convert. Download each .ktx2 file or all of them as a ZIP. It is free and needs no account.
Use UASTC when quality matters: normal maps, packed ORM or roughness and metallic maps, and detailed colour textures. Use ETC1S when file size matters most: colour textures, UI and simple or mostly flat surfaces. A common setup is ETC1S for base colour and UASTC for normal and ORM maps.
UASTC stores 8 bits per pixel before supercompression, so a simple PNG can be smaller on disk. On the GPU it is the other way round: the KTX2 stays compressed while the PNG is unpacked to 32 bits per pixel. To shrink the download, keep Zstandard on, lower the UASTC quality (it enables RDO, which helps Zstandard and ZIP) or switch to ETC1S. Mipmaps add about a third.
Yes. glTF references KTX2 textures through the KHR_texture_basisu extension. three.js loads them with KTX2Loader (and GLTFLoader.setKTX2Loader for glTF files), Babylon.js loads .ktx2 natively, and PlayCanvas and Needle Engine support it too. Browsers cannot show a KTX2 file in a plain img tag: it is meant for WebGL and WebGPU apps.
Yes. It is free, with no signup and no watermark, and your images are never uploaded. The Basis Universal encoder (open source, Apache 2.0) is downloaded once when you click Convert and then runs on your device in a background worker.