The basics
What is an XCF file?
XCF is the native format of GIMP, the free image editor for Windows, macOS and Linux. The name comes from the eXperimental Computing Facility at the University of California, Berkeley, where GIMP started as a student project. Like PSD for Photoshop, it's a working file: it keeps the image exactly as it is in the editor so you can carry on later.
In GIMP's words, XCF is the only format that can store everything about an image, except the undo history. That includes layers and layer groups, transparency, blend modes, layer masks, text layers, extra channels and the selection, paths, guides, the colour profile and metadata. Since GIMP 3, it also keeps non-destructive filters, and since GIMP 3.2, vector and link layers.
- Save means XCF, Export means everything else. In GIMP, File, Save only writes XCF. To get a PNG or JPG, use File, Export As. Exporting doesn't change the open image, so keep the XCF as your master copy.
- Few other programs read it. XCF is documented, but it follows GIMP's features closely, so other apps support only part of it.
- Browsers can't display it. A link to an XCF downloads the file.
Anatomy
What's inside an XCF file
There's no sample on this page, so here is a tiny XCF we built byte by byte from GIMP's documentation of the format: a 64 × 64 sky with a 32 × 32 sun on a second layer. ImageMagick reads both layers back and flattens them correctly. A file saved by GIMP has the same structure with many more properties. All numbers are big-endian; from XCF version 11, pointers (file offsets) are 8 bytes.
offset bytes part
0 67 69 6D 70 20 78 63 66 20 "gimp xcf "
9 76 30 31 31 00 "v011", then 0: version 11
14 00 00 00 40 00 00 00 40 width 64, height 64
22 00 00 00 00 base type 0: RGB
26 00 00 00 96 precision 150: 8-bit gamma
30 00 00 00 11 00 00 00 01 01 PROP_COMPRESSION: 1 = RLE
39 00 00 00 13 00 00 00 08 42 90 00 00 42 90 00 00
PROP_RESOLUTION: 72 × 72 ppi
55 00 00 00 15 00 00 00 47 … PROP_PARASITES: "gimp-comment"
134 00 00 00 00 00 00 00 00 PROP_END
142 00 00 00 00 00 00 00 AE layer at 174 (top)
150 00 00 00 00 00 00 01 46 layer at 326
158 00 00 00 00 00 00 00 00 end of layers
166 00 00 00 00 00 00 00 00 no channels
174 00 00 00 20 00 00 00 20 00 00 00 01 layer 32 × 32, RGBA
186 00 00 00 04 53 75 6E 00 name "Sun"
194 props: OPACITY 255, VISIBLE 1, OFFSETS 24, 8, END
hierarchy pointer, mask pointer 0
hierarchy: 32 × 32, 4 bytes per pixel → level
level: 32 × 32, one tile pointer, 0
310 7F 04 00 F5 7F 04 00 9E RLE: 1,024 × F5 (red),
7F 04 00 0B 7F 04 00 FF × 9E, × 0B, × FF (alpha)
326 00 00 00 40 00 00 00 40 00 00 00 00 layer 64 × 64, RGB
338 00 00 00 0B "Background" 00 … same structure
469 7F 10 00 7D 7F 10 00 D3 7F 10 00 FC 4,096 × each channel
481 end of file- 1
gimp xcf v011Signature and version
Every XCF starts with
gimp xcf(with a space), then a 4-character version:filefor version 0, otherwisevand three digits, then a zero byte. GIMP writes the lowest version that can hold the image, so a simple picture saved by GIMP 3 may still carry an old number. - 2
width, height, base type, precisionThe canvas
Size in pixels, then the base type (0 RGB, 1 greyscale, 2 indexed) and, from version 4, the precision: 150 means 8-bit integers with gamma, and values up to 750 cover 16- and 32-bit integers and 16-, 32- and 64-bit floating point.
- 3
00 00 00 11 00 00 00 01 01A property
Most of an XCF is property lists: a type number, a payload length and a payload. Type 17 is the compression used for every tile, here 1 (RLE, what GIMP writes by default); 2 is zlib. Readers skip types they don't know, so new properties don't break old readers.
- 4
PROP_PARASITESParasites
Named pieces of extra data attached to the image, a layer, a channel or a path: the image comment, Exif and XMP metadata, the colour profile, print settings, plug-in data. Here a
gimp-commentsaying where the file comes from. - 5
00 00 00 00 00 00 00 AELayer pointers
Offsets of each layer's data, top layer first, ended by a zero. Then the same for channels (extra channels and the saved selection) and, in newer versions, for paths. A reader can jump straight to any layer.
- 6
00 00 00 20 … 53 75 6E 00A layer
Width, height, type (1 = RGB with alpha), name, then the layer's own properties: opacity, visibility, position on the canvas (24, 8), blend mode, locks, effects, and pointers to its pixels and its mask.
- 7
hierarchy → level → tilesPixels in tiles
A layer's pixels are cut into tiles of up to 64 × 64, each found through a pointer. Large images load and save tile by tile, which is how GIMP handles pictures bigger than memory.
- 8
7F 04 00 F5RLE compression
Each tile is compressed one channel at a time.
7Fmeans a long run:04 00(1,024) copies ofF5. That's the whole red channel of the solid orange sun in four bytes; real photos compress far less.
Under the hood
How an XCF file is organised
XCF isn't a sequence of sections like PSD. It's a small header followed by objects that point to each other by file offset:
| Part | What it holds |
|---|---|
| Header | Signature and version, width, height, base type (RGB, greyscale or indexed) and precision. |
| Image properties | Compression, resolution, guides, sample points, the colour map of an indexed image, units, parasites (comment, metadata, ICC profile) and, in older versions, paths. |
| Layer, channel and path pointers | Where each object starts; each list ends with a zero. |
| Layers | Size, type, name and properties (opacity, mode, offsets, visibility, locks, group membership, text, effects), then pointers to the pixels and the mask. |
| Channels | Extra greyscale channels, layer masks and the selection, with their own properties. |
| Hierarchy, levels, tiles | The pixel data, as 64 × 64 tiles compressed with RLE or zlib. |
Because almost everything is a property with a type and a length, GIMP can add features without breaking older readers: an unknown property is skipped. When a feature changes how existing data must be read, the version number goes up. GIMP's own documentation calls XCF a living format whose final reference is GIMP's source code.
Compressed XCF files
Tile compression keeps XCF files lossless but often large. GIMP can also open and save whole XCF files compressed with gzip, bzip2 or xz: name the file image.xcf.gz, .xcf.bz2 or .xcf.xz. They're smaller, but slower to open and save, and even fewer other programs read them.
History
XCF versions from GIMP 2.10 to 3.2
| XCF version | Introduced in | What changed |
|---|---|---|
| 0 and 1 | GIMP 0.99.16 (1997) | The original format; colour maps |
| 2 | GIMP 1.3 (2002) | More layer modes, better paths |
| 3 | GIMP 2.7.1 (2010) | Layer groups |
| 4 to 13 | GIMP 2.10 (2018) | High bit depth (precision), many new layer modes, masks on groups, zlib compression, 64-bit pointers for files over 4 GB (from 11) |
| 14 to 23 | GIMP 3.0 (March 2025) | Several selected layers and channels, off-canvas guides, locks, a new path structure, new text font storage, non-destructive layer effects, a perceptual RGB blend space |
| 24 and 25 | GIMP 3.2 (March 2026) | Vector layers, link layers (external images placed in the composition) and their transforms |
| 26 | GIMP 3.2.6 | Non-destructive filters on channels |
GIMP writes the lowest version that can represent the image. A file that uses a newer feature gets a newer number, and an older GIMP refuses it with "XCF error: unsupported XCF file version". If you need to open a file in an older GIMP, avoid the newer features, or export a PSD or layered TIFF as well.
A new project format is on the way
In August 2026 the GIMP team announced that it is designing a new "zipped XML" project format to replace XCF for new features, because the binary XCF struggles with very large and complex projects. GIMP will keep loading XCF files in all future versions. No release date has been given.
Comparison
XCF vs PSD, TIFF and PNG
| XCF | PSD | TIFF | PNG | |
|---|---|---|---|---|
| Layers | Yes | Yes | Only from some apps | No |
| Made for | GIMP working files | Photoshop working files | Print and archiving | Finished images, the web |
| Read by other editors | A few, partly | Most | Most (as a flat image) | All |
| Compression | Lossless (RLE or zlib) | Lossless (RLE, ZIP) | None, LZW, ZIP or JPEG | Lossless |
| CMYK | No | Yes | Yes | No |
| Opens in a browser | No | No | Safari only | Yes |
| Flattened copy inside | No | Yes, with Maximize Compatibility | Not applicable | Not applicable |
The last row matters: a PSD usually carries a ready-made flattened image that simple programs can show, but an XCF doesn't. Any program that displays an XCF has to rebuild the picture from its layers, modes and effects, which is why other apps often get it slightly wrong. To hand an image to someone who doesn't use GIMP, export a PNG or JPG; to keep layers for Photoshop users, export a PSD.
How to
How to open and convert an XCF file
- GIMP (free, Windows, macOS, Linux) is the only program that reads every feature. Use a GIMP version at least as new as the one that saved the file.
- Krita (free) imports XCF files with their layers; blend modes and newer GIMP features may be lost.
- Photopea opens XCF in the browser and can save the result as PSD or export PNG.
- ImageMagick reads the layers of simple XCF files:
convert image.xcf -flatten image.png(ormagickin ImageMagick 7) merges them into one picture. It can't write XCF. - Paint.NET on Windows opens layered XCF files with a plug-in.
- Convert in GIMP: File, Export As, then type a name ending in
.png,.jpg,.psd,.tifor another format. For PSD, layers are kept; for PNG and JPG, the image is flattened.
Troubleshooting
Common XCF problems
- "Unsupported XCF file version". The file was saved by a newer GIMP than the one opening it. Update GIMP, or ask for a PSD or PNG export.
- GIMP won't save as PNG or JPG. File, Save only writes XCF. Use File, Export As.
- It looks different in another app. That app rebuilds the image from the layers and doesn't support some blend modes, text layers, effects or vector layers. Export a PNG from GIMP for the correct picture.
- The file is huge. Every layer is stored at its own size, uncompressed or lightly compressed, and high-bit-depth images double or quadruple that. Delete unused layers, crop layers to the canvas, use 8-bit precision if you don't need more, or save as
.xcf.xz. - Windows doesn't show thumbnails. File Explorer has no XCF previewer. GIMP's own Open dialog shows previews.
- It won't open at all. Check the first nine bytes:
gimp xcfmeans XCF. If they're1F 8Bit's a gzip-compressed XCF missing its.gzextension; rename it and try again.
Security
Privacy and security
Like any working file, an XCF can contain more than you meant to share: hidden layers, parts of layers outside the canvas, saved selections and paths, the image comment and Exif or XMP metadata such as camera details and GPS location. Export a flattened PNG or JPG, with metadata removed in the export dialog, to send only the picture.
An XCF can't run code. The risk lies in parsers: XCF readers in GIMP, ImageMagick and other libraries have had bugs that crafted files could trigger, so keep them updated. A server that converts uploaded XCF files should check the declared width and height before decoding, since the header can claim an image far larger than the file.
Sample files
There are no sample XCF files on this page yet. To make one for testing, open or create any image in GIMP and save it with File › Save As; add a few layers first to test layer support.
Put it online
Have an XCF file? Give it a link.
Drop a GIMP file on 99helpers and it gets its own link. Browsers can't display XCF, so anyone who opens the link downloads it and opens it in GIMP; upload a PNG export next to it so people can see the image straight away.
Questions
XCF files, frequently asked
What is an XCF file?
GIMP's own image format. It keeps layers, channels, paths, text, masks and other editing information so the image can be edited later in GIMP. It's the equivalent of Photoshop's PSD.
How do I open an XCF file?
Open it in GIMP, which is free for Windows, macOS and Linux. Krita, Photopea and ImageMagick can also read many XCF files, with some features lost.
How do I convert XCF to PNG or JPG?
In GIMP, use File, Export As and give the file a .png or .jpg name. On the command line, convert image.xcf -flatten image.png works for simple files with ImageMagick.
Can Photoshop open XCF files?
No. Export a PSD from GIMP (File, Export As, with a .psd name) to keep the layers, or open the XCF in Photopea and save it as PSD.
Why can't GIMP save my image as a JPG?
In GIMP, Save always writes XCF. Use File, Export As to create a JPG, PNG or other format. The XCF stays your editable master copy.
Can GIMP 2.10 open files from GIMP 3?
Only if they don't use features introduced in GIMP 3. GIMP saves the lowest XCF version that can hold the image; files that need a newer version are refused by older GIMP releases.
What does XCF stand for?
eXperimental Computing Facility, at the University of California, Berkeley, where GIMP was started in the 1990s.
Is GIMP replacing XCF?
The GIMP team announced in August 2026 that a new zipped-XML project format is being designed for future features. GIMP will keep opening XCF files.
Related formats
Other file types explained
Keep going
Related
Sources
- GIMP Developer: documentation of the XCF file format
- GIMP 3.2 documentation: Getting images out of GIMP
- GIMP 3.0 released (GIMP news, March 2025)
- GIMP 3.2 released (GIMP news, March 2026)
- GIMP Development Update, August 2026: a new project file format
- Wikipedia: XCF (file format), software support
Last reviewed 27 October 2026.