Fork me on GitHub

Crafatar

A blazing fast API for Minecraft faces!

Try it

Avatars

avatar
https://crafatar.com/avatars/uuid

Accepted modifiers: size, overlay, default.

Head Renders

head
https://crafatar.com/renders/head/uuid

Accepted modifiers: scale, overlay, default.

Body Renders

body
https://crafatar.com/renders/body/uuid

Accepted modifiers: scale, overlay, default.

Skins

skin
https://crafatar.com/skins/uuid

Accepted modifiers: default.

Capes

cape
https://crafatar.com/capes/uuid

Accepted modifiers: default.


Meta

In the examples above, you can generally use usernames instead of uuid. However, apart from the special cases MHF_Steve and MHF_Alex this is discouraged as explained below.
You can append .png or any other file extension to the URL path if you like to, but all images are PNG.

Attribution

Attribution is not required, but it is encouraged.
If you want to show some support for this (free!) service, place a notice like this somewhere: Thank you to <a href="https://crafatar.com">Crafatar</a> for providing avatars.

URL Parameters

You can tweak images using query string parameters.
Example: https://crafatar.com/avatars/853c80ef3c3749fdaa49938b674adae6?size=4&default=MHF_Steve&overlay

  • size: The size for avatars in pixels. 1 - 512
  • scale: The scale factor for renders. 1 - 10
  • overlay: Apply the overlay to the avatar. Presence of this parameter implies true. This option was previously known as helm.
  • default: The fallback to be used when the requested image cannot be served. You can use a custom URL or any uuid.
    The option defaults to either MHF_Steve or MHF_Alex, depending on the requested UUID. All usernames default to MHF_Steve.

About UUIDs

UUIDs may be any valid Mojang UUID in the blank or dashed format.

Malformed UUIDs are rejected.

About Usernames

We strongly advise you to use UUIDs instead of usernames! UUIDs never change while usernames do.
Looking up players by username has officially been deprecated by Mojang ever since UUIDs were introduced.
Crafatar uses a legacy API which updates very slowly to retrieve skins for usernames.
Skins come without any details, including whether a player uses the Alex or Steve skin model.
Additionally, Mojang has stated that this legacy interface may be disabled anytime, causing all requests to fail.

Malformed usernames are rejected.

About Caching

Crafatar checks for skin updates every 20 minutes.
Images are cached in your browser for 60 minutes until a new request to Crafatar is made.
In addition, CloudFlare caches up to 2 hours on a per-url basis.

When you changed your skin you can try clearing your browser cache to see the change faster.

CORS

Crafatar supports Cross-Origin Resource Sharing, so you can make AJAX request from other sites!

HTTP Headers

Responses come with some custom HTTP headers, useful for debugging.
Please note that these headers may be cached by CloudFlare.

  • X-Storage-Type: Details about how the requested image was stored on the server
    • none: No external requests. Player has no skin (cached)
    • cached: No external requests. (skin cached)
    • checked: Requested skin details, skin cached. (1 external request)
      This happens either when the user removed their skin or when it didn't change.
    • downloaded: Requested skin details, skin downloaded. (2 external requests)
    • server error: This can happen, for example, when Mojang's servers are down.
      If possible, a cached image is served instead.
    • user error: You have done something wrong, such as requesting a malformed uuid.
      Check the response body for details.
  • X-Request-ID: The internal ID assigned to this request.
    If you think something is wrong with your request, please contact us and provide this ID.

Contact

Popular Crafatar users

See also: what users say about Crafatar


Crafatar Tools & Plugins