File types · Explainer

The CUR file (.cur, .ani)

A CUR file is a Windows mouse cursor: the same small multi-size container as an ICO icon, plus a hotspot that marks the exact pixel that does the pointing. This guide explains what's inside one, how animated .ani cursors differ, how to install a cursor in Windows, and how to use one on a website with CSS.

At a glance

Full name
Windows cursor file (CUR)
Extensions
.cur for static cursors; .ani for animated cursors
MIME type
None registered; Linux desktops label it image/x-win-bitmap
Kind
Binary container of one or more cursor images, each a BMP-style bitmap or a PNG, with a hotspot per image
Owner
Microsoft
First released
The multi-image layout, shared with ICO, dates from Windows 3.0 (1990)
Hotspot
An x and y position in pixels from the top-left corner, stored in each directory entry
Sizes
Up to 256 × 256 per image; Windows uses 32, 48, 64, 96 or 128 pixels depending on display scaling
Magic number
00 00 02 00 (icons: 00 00 01 00)
Opens with
Windows mouse settings, cursor and icon editors, ImageMagick, Python Pillow; desktop browsers use it through CSS

The basics

What is a CUR file?

A CUR file holds a mouse pointer for Windows: the arrow, the hand over a link, the text beam, the busy circle or a custom design. Microsoft's documentation describes cursor files as storing several images at different sizes, like icons, and Windows picks the best match for the screen.

What makes a cursor more than an icon is the hotspot: in Microsoft's words, the pixel that marks the exact screen location affected by a mouse event. For an arrow it's the tip, for a crosshair the centre, for a pencil the point. A cursor with the hotspot in the wrong place clicks a few pixels away from where it seems to point.

  • Static cursors use .cur. Each image can be a monochrome bitmap, a colour bitmap, a 32-bit image with an alpha channel, or a PNG.
  • Animated cursors use .ani, a different container that holds a sequence of cursor images with timing. The Windows busy and working-in-background pointers are animated cursors.

Cursor files turn up in Windows pointer schemes and cursor packs, inside programs (as resources in .exe and .dll files), and on websites, which can set a custom pointer with CSS.

Anatomy

What's inside a CUR file

There are no sample files on this page, so to show real bytes we wrote a small arrow cursor with a 32 × 32 and a 48 × 48 image, byte by byte, following the same layout as the samples on our ICO page. Both images have their hotspot at (1, 1), the tip of the arrow. All numbers are little-endian: a8 10 means 0x10A8, which is 4,264.

A two-size arrow cursor (hex)
offset  bytes                                            meaning
000000  00 00                                            reserved
000002  02 00                                            type 2: cursor
000004  02 00                                            2 images
000006  20 20 00 00 01 00 01 00 a8 10 00 00 26 00 00 00  entry 1: 32 × 32
000016  30 30 00 00 01 00 01 00 a8 25 00 00 ce 10 00 00  entry 2: 48 × 48
000026  28 00 00 00 20 00 00 00 40 00 00 00 01 00 20 00  image 1: header
000036  00 00 00 00 … (24 bytes, all 0)                  image 1: header, rest
00004e  00 00 00 00 00 00 00 00 …                        image 1: pixels
        y = 1:  00 00 00 00 00 00 00 ff …                the hotspot pixel
00104e  ff ff ff ff ff ff ff ff …  (128 bytes)           image 1: AND mask
0010ce  28 00 00 00 30 00 00 00 60 00 00 00 01 00 20 00  image 2 (48 × 48)
003676                                                   end of file: 13,942 bytes
  1. 100 00 02 00

    The signature

    A reserved zero, then type 2. This is the only place where the file header differs from an icon, which has type 1. Software that reads ICO files usually reads CUR files too.

  2. 202 00

    The image count

    Two images, so Windows can pick the one that matches the current cursor size instead of scaling a single picture.

  3. 320 20 00 00 01 00 01 00

    Width, height and the hotspot

    Width 0x20 (32), height 32, colour count 0, a reserved 0. In an icon the next two fields are colour planes and bits per pixel; in a cursor they're the hotspot: x = 1, y = 1. The bitmap header further on says how many bits per pixel the image uses.

  4. 4a8 10 00 00 26 00 00 00

    Size and offset

    The image takes 4,264 bytes and starts at offset 0x26 (38), straight after the directory.

  5. 528 00 00 00 20 00 00 00 40 00 00 00

    The bitmap header

    A 40-byte BITMAPINFOHEADER as in a BMP file. The height reads 0x40 (64) for a 32-pixel cursor because it counts the colour image and the 1-bit mask stacked together, exactly as in an icon.

  6. 600 00 00 ff

    The hotspot pixel

    Pixels are stored as blue, green, red, alpha, starting with the bottom row. In row y = 1, the second pixel (x = 1) is opaque black: the tip of the arrow, exactly where the hotspot points.

  7. 7ff ff ff ff … (128 bytes)

    The AND mask

    One bit per pixel, 4 bytes per row: 1 for transparent, 0 for drawn. Here it mirrors the alpha channel. In old 1-bit cursors this mask, combined with the colour image, also produced pixels that invert whatever is underneath.

  8. 8image 2 (48 × 48)

    The larger image

    Windows uses it when display scaling is between 150% and 199%. Without it, the 32-pixel image would be stretched and look soft.

Related formats

CUR vs ICO and ANI

CURICOANI
Used forStatic mouse pointersProgram, file and website iconsAnimated mouse pointers
Starts with00 00 02 0000 00 01 0052 49 46 46 (RIFF), with form type ACON
ImagesOne or more sizes, each with a hotspotOne or more sizes and colour depthsA sequence of frames, each a complete cursor image
Directory fields at offsets 4 and 6Hotspot x and yColour planes and bits per pixel(not applicable)
In CSS on websitesYes, in desktop browsersYes, as an imageNot in current browsers

Because the layouts are so close, an ICO file can be turned into a cursor by changing its type to 2 and writing a hotspot into each directory entry. Going the other way loses the hotspot. An .ani file is a RIFF container, the family WAV and AVI belong to, holding the frames plus chunks that set how long each frame shows and in which order.

Animated cursors and security

In 2007 a flaw in how Windows read animated cursor headers let a crafted .ani file run code. US-CERT warned it could be triggered by a web page, an HTML email, or just opening a folder that contained such a file, because Windows Explorer reads cursor files to show them. Microsoft fixed it in security bulletin MS07-017. Cursor packs from unknown websites are still worth treating with care.

Sizes

Cursor sizes and display scaling

Unlike icons, cursor sizes change in steps. Microsoft lists the default cursor size Windows uses at each display scaling level:

Display scalingCursor size
Below 150%32 × 32
150% to 199%48 × 48
200% to 299%64 × 64
300% to 399%96 × 96
400% and above128 × 128

The pointer size slider in Settings makes cursors bigger still. A cursor file with a single 32-pixel image works everywhere, but on a high-resolution screen it's scaled up and looks blurry; include the larger sizes for a sharp pointer. The visible shape is usually smaller than the image, with transparent space around it.

How to

How to install a custom cursor in Windows

  1. 1Save the .cur or .ani file somewhere permanent; Windows' own cursors live in C:\Windows\Cursors.
  2. 2Open Start > Settings > Bluetooth & devices > Mouse, and under Related settings choose Additional mouse settings.
  3. 3In Mouse Properties, open the Pointers tab.
  4. 4Under Customize, select the pointer to replace (Normal Select, Text Select, Busy and so on), choose Browse, pick your file and choose Open.
  5. 5Optionally choose Save As to keep the set as a scheme, then OK.

Cursor packs often include an .inf file that installs the whole scheme: right-click it and choose Install (on Windows 11, under Show more options), then select the scheme on the Pointers tab. To go back, pick Windows Default in the Scheme list. For size and colour without custom files, use Settings > Accessibility > Mouse pointer and touch.

macOS and Linux don't use .cur files for the system pointer. macOS only offers pointer size and colour settings, and Linux desktops use their own cursor themes (the Xcursor format), so Windows cursors have to be converted first.

On the web

Using a .cur file on a website

The CSS cursor property accepts image URLs, and MDN notes that desktop browsers broadly support the .cur format alongside PNG and SVG:

styles.css
/* .cur first, a PNG with an explicit hotspot as the next choice,
   and a keyword fallback, which is required */
.canvas {
  cursor: url("pencil.cur"), url("pencil.png") 2 30, crosshair;
}
  • A keyword fallback is required. Without one (auto, pointer, crosshair…) at the end of the list, the whole declaration is invalid and ignored.
  • The hotspot comes from the file. If you don't give x and y after the URL, a .cur file's own hotspot can be used. A PNG has no hotspot, so give one, or the top-left corner is used.
  • Size limits: according to MDN, Firefox and Chromium ignore cursor images larger than 128 × 128 pixels, and 32 × 32 is the recommended size.
  • No animation: current browsers don't play .ani cursors, and old-style inverting pixels aren't supported either.
  • Touch screens have no cursor. On phones the setting has no effect, and on iPadOS only the text value changes the pointer.

How to

How to make, open and convert a CUR file

  • Use a cursor editor. Cursor and icon editors let you draw each size, set the hotspot visually, and save .cur and .ani files. This is the easiest way to get the hotspot right.
  • From an ICO, by hand: make a 32 × 32 icon (for example magick input.png -resize 32x32 icon.ico), then in a hex editor change byte 2 from 01 to 02 and write the hotspot's x into bytes 10–11 and y into bytes 12–13, low byte first. Rename it to .cur. Do this for each directory entry if the file has several images.
  • Check your tool's output. In our tests, ImageMagick 6 saved a file named .cur with the icon type (1) in its header, so Windows would treat it as an icon. Look at the first four bytes: a cursor starts 00 00 02 00.
  • Open or convert one: magick pointer.cur pointer.png writes one PNG per image inside; Python's Pillow opens .cur files too, though it can't write them.
  • Inspect one: on Linux and macOS, the file command prints the image count, size and hotspot, for example hotspot @1x1.

Troubleshooting

Common cursor problems

  • Clicks land in the wrong place. The hotspot is wrong, often (0, 0) from a tool that didn't set one. Fix it in a cursor editor or in bytes 10 to 13 of each directory entry.
  • The custom cursor doesn't show on a website. Check the fallback keyword is there, the URL loads (open it directly), and the image is no bigger than 128 × 128.
  • The cursor is blurry. It has only one small image, scaled up for a high-DPI screen or a bigger pointer size. Add 48, 64 and larger images.
  • Windows won't accept the file. It may be a PNG or ICO renamed to .cur. Check the first bytes: 00 00 02 00 for a cursor.
  • Black boxes or odd edges in old software. 32-bit cursors with alpha need a reasonably recent Windows; very old systems expect 1- or 4-bit images with an AND mask.

Sample files

There are no sample CUR files on this page yet. To make one for testing, save a 32 × 32 icon with magick input.png -resize 32x32 icon.ico, then in a hex editor change byte 2 from 01 to 02 and put the hotspot's x and y in bytes 10–11 and 12–13: the result is a valid cursor, and our ICO samples use the same layout.

Put it online

Have a CUR file? Give it a link.

Drop a cursor file on 99helpers and it gets its own web address, so you can share it or point a stylesheet at it. Anyone who opens the link downloads the file to install it.

Questions

CUR files, frequently asked

What is a CUR file?

A Windows mouse cursor. It has the same structure as an ICO icon file, holding one or more image sizes, plus a hotspot that marks the pixel that does the clicking.

How do I install a .cur file in Windows?

Settings > Bluetooth & devices > Mouse > Additional mouse settings, then the Pointers tab. Select the pointer to change, choose Browse, pick the file and choose OK.

What's the difference between CUR and ICO?

Almost nothing in the layout: the header type is 2 instead of 1, and each directory entry stores a hotspot where an icon stores colour planes and bit depth.

What's the difference between CUR and ANI?

A .cur file is a static cursor. An .ani file is an animated cursor: a RIFF container with a sequence of cursor frames and their timing.

Can I use a .cur file on my website?

Yes, with CSS: cursor: url("pointer.cur"), auto;. Keep it at 32 × 32 pixels, never over 128 × 128, and always end with a keyword fallback.

How do I convert a PNG to a cursor?

Use a cursor editor, which also lets you set the hotspot. On the web you can skip conversion: CSS accepts a PNG with hotspot coordinates, such as url("pointer.png") 4 4, auto.

Can a cursor file contain a virus?

A cursor can't run code by design, but malformed cursor files have exploited bugs in Windows, most famously the animated cursor flaw fixed in 2007. Keep Windows updated and get cursor packs from sources you trust.

Can I use .cur files on a Mac?

Not for the system pointer: macOS only lets you change the pointer's size and colours. You can still open the images inside with ImageMagick or Pillow, and web pages can use them in browsers that support .cur.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.