| Internet-Draft | Well Known Button.json | September 2026 |
| Filmröllchen & LunarEclipse | Expires 31 March 2027 | [Page] |
This document specifies the well-known URI /.well-known/button.json,
which describes a web site's "buttons". Buttons are usually 88x31 pixel
images representing the web site with text, logos, artwork, and
animations.¶
/.well-known/button.json files facilitate sharing buttons between web
site owners and alleviate issues commonly encountered when doing so. By
utilizing a standardized, machine-readable format, automated tools can
also utilize the provided information.¶
This note is to be removed before publishing as an RFC.¶
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-filmroellchen-lunar-well-known-button/.¶
Source for this draft and an issue tracker can be found at https://codeberg.org/LunarEclipse/well-known-button.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 31 March 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
"Buttons", in the context of this specification, refer to a certain type of common image on the Web. Buttons are graphics, usually 88 pixels wide and 31 pixels high, featuring text, logos, artwork, as well as animations. The purpose of a button is to represent the web site or its owner(s)/author(s), often using minimal information to do so, owing to the low resolution available. For this representational purpose, buttons are usually intended to be included on other web sites, most commonly in a footer or other dedicated section. This way, web site owners may show their affiliation with, or appreciation of other's web sites.¶
Buttons originate from the early days of the Web as a form of banners, originally representing the site or technology used to host a particular home page. The 88x31 format, also named "Micro Button", originated with the free hosting provider GeoCities.com and their mandatory advertising banner. For a detailed historical account, see [Tekeye]. Buttons have seen a renewed surge in popularity in the 2020s with certain subcultures.¶
The goal of this specification is to provide a clearly defined standard for web site authors who wish to share web site buttons with other web site authors and end users, and lay out a format for a common endpoint that can be used to fetch and/or embed the buttons. To this end, this specification introduces a new well-known [RFC8615] URI utilizing a standard JSON format to specify one or more buttons.¶
The intended use cases are:¶
to share buttons in a standardized way¶
to avoid issues with crediting the original button author(s)¶
to avoid issues with button authors' consent to including buttons on other pages¶
to facilitate automation around inclusion of buttons, including but not limited to:¶
The specification aims to be easy to implement for web sites using shared hosting providers, which are unable to change HTTP response headers and cannot host extension-less files.¶
Accessibility is a primary concern of this specification. Images and fast animations are notoriously inaccessible to users with vision impairment, light-sensitivity, and other disabilities. This specification attempts to combat that by requiring image descriptions, and providing a standard mechanism for selecting between multiple versions of a button for accessibility purposes.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A server is any web server providing a /.well-known/button.json file.¶
A client is any program accessing the /.well-known/button.json of a
server. Clients include other web servers, automated programs, as well
as programs manually invoked on behalf of a user.¶
An animated image (as opposed to a static image) is an image which has multiple frames of nonzero and non-infinite length, where at least one of the frames is visually distinct from the others. Examples:¶
A GIF image with three frames, all containing different text in front of the same background, is animated.¶
A WEBP image with two very distinct frames is animated.¶
An AVIF image with several hundred frames and over two minutes in runtime, featuring a "gloss" effect that very slowly moves across the image, is animated.¶
A GIF image abusing a frame time of zero to show more than 256 colors at once is animated, as almost every modern program restricts the frame time to a minimum of 10ms.¶
An AVIF image with five frames, all of which are identical, is not animated.¶
An APNG image with two thousand identical frames is not animated.¶
A GIF image with a single frame is not animated.¶
A typical example is as follows:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-01.schema.json",
"default": "my.web site",
"buttons": [
{
"id": "my.web site",
"uri": "https://my.website.example.org/my.website.png",
"alt": "Button to my web site!",
"link": "https://my.website.example.org",
"sha256": "66a421c7e726e9de99eeb88c57b93b49278d64b2a4602a6f90f7d64baee154cf",
"hotlink": true
}
]
}
¶
A minimal example:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-01.schema.json",
"buttons": [
{
"id": "some button id",
"uri": "https://example.com/res/my-button.gif",
"alt": "button saying example.com"
}
]
}
¶
And an exhaustive example:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-01.schema.json",
"default": "8b556a30-c5d9-4117-88a5-b779a3f2f567",
"buttons": [
{
"id": "8b556a30-c5d9-4117-88a5-b779a3f2f567",
"groupId": "mainbutton",
"uri": "https://website.example.com/res/my-button.png",
"alt": "button saying example.com with black text on a white background",
"caption": "Example web site",
"sha256": "e35a78bcb7f9b9cc0c3929d1763b96b6013071b0f9950886a20d2bcc0e943612",
"link": "https://website.example.com/",
"colorScheme": "light",
"animations": "none",
"contrast": "more",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"imageRendering": "pixelated",
"hotlink": false
},
{
"id": "64dbf02d-44e0-4aa9-ad45-c4959eadd3db",
"groupId": "mainbutton",
"uri": "https://website.example.com/res/my-button-dark.png",
"alt": "button saying example.com with white text on a black background",
"caption": "Example web site",
"sha256": "4598d79c6c1877aa9121c8b0845fe4e8f031684fabb09caa10357dfe5d295986",
"link": "https://website.example.com/",
"colorScheme": "dark",
"animations": "none",
"contrast": "more",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"imageRendering": "auto",
"hotlink": false
},
{
"id": "57ad38e5-94ad-4b64-a6bc-583f41b7c3b5",
"groupId": "mainbutton",
"uri": "https://website.example.com/res/my-button-rainbow.gif",
"alt": "button saying example.com with black text on an animated rainbow background",
"caption": "Example web site",
"sha256": "2fecb1bbd1fdb1f8fa634632f9726f9bce7f653fe94cde59b616f4032b70a758",
"link": "https://website.example.com/",
"colorScheme": "other",
"animations": "high",
"contrast": "standard",
"license": "LicenseRef-Commercial",
"licenseText": "Copyright 2024 by the Example Author, all rights reserved. You can include this button on your page but nothing else.",
"imageRendering": "smooth",
"hotlink": true
},
{
"id": "ee5cc4b3-b88b-4b1c-ae1f-fb9a3de063c9",
"uri": "https://website.example.com/res/blog-button.gif",
"alt": "example.com blog button with some starts gently twinkling in the background",
"caption": "Example web site",
"sha256": "b2fe6da951362a7e3909390c5634fe4804cb845eddccad8dcea5819122f94be0",
"link": "https://website.example.com/blog/",
"animations": "minimal",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"hotlink": true
}
]
}
¶
These examples show possible compliant HTML5 source code which may be
generated based on .well-known/button.json data. They are neither
normative, nor do they represent the only compliant HTML that may be
generated from the data. The HTML is provided purely for the information
of implementors.¶
Based on the typical example above, the following HTML may be generated:¶
<a href="https://my.website.example.org">
<img
class="button"
src="https://my.website.example.org/my.website.png"
alt="Button to my web site!"
loading="lazy"
/>
</a>
¶
Note that this button allows hotlinking, and the HTML makes use of this
here. Additionally, the loading="lazy" option avoids loading the
button on a web page unless the user scrolls over it, reducing page load
times. Alternatively, the client may copy the image to their own web
server, serve it on the path /buttons/my.website.png, and use the
following HTML instead:¶
<a href="https://my.website.example.org">
<img
class="button"
src="/buttons/my.website.png"
alt="Button to my web site!"
loading="lazy"
/>
</a>
¶
As an extended example, the following HTML may be generated from the
button with ID ee5cc4b3-b88b-4b1c-ae1f-fb9a3de063c9 in the exhaustive
/.well-known/button.json example above. Once again the client chose
not to hotlink the button despite "hotlink": true.¶
<a href="https://website.example.com/blog/" title="Example web site">
<img
class="button"
src="/buttons/blog-button.gif"
alt="example.com blog button with some starts gently twinkling in the background"
loading="lazy"
/>
</a>
¶
Since the button author specified a license and accompanying text, the client should include this somewhere on their web site, such as:¶
<p>The button for the <a href="https://website.example.com/blog/"> example.com blog</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0 </a>. Copyright 2024 by the Example Author. </p>¶
Button images SHOULD be compressed as strongly as possible. For example, typical images of size 88x31 can reach about 800-1000 bytes in size using the PNG format, but are frequently distributed with sizes between 10% and 200% larger than this. Using strong compression usually does not affect decoding time for the recommended image formats, but reduces bandwidth requirements on both server and client, especially when the image is hotlinked. With the image sizes used for buttons, it is computationally feasible on consumer hardware to compress images optimally within a reasonable amount of time (usually a few minutes at maximum, usually much less).¶
The minimum or maximum length of the text properties in
/.well-known/button.json is not restricted. In combination with the
unrestricted number of button objects that may be present within one
such file, the length of the JSON document, even if minified by removing
superfluous whitespace, may be arbitrarily large and cause issues with a
client’s memory usage.¶
Therefore, clients MUST support a property length of at least 65536
bytes (2^16 or 64 KiB) for each string property that is not otherwise
restricted; namely the properties id (and therefore default as
well), uri, alt, caption, link, license, licenseText,
groupId, and imageRendering. For imageRendering specifically, a
client MAY only support the three standard values smooth, auto, and
pixelated; i.e. a maximum length of 9 bytes. Any property beyond the
supported length MAY be rejected by a client.¶
Clients SHOULD be able to handle a large number of buttons within a
document, but not necessarily by reading and evaluating every single
button definition. As fallback mechanisms, reading only the first button
or the one set by the default property is RECOMMENDED. Servers SHOULD
position the default top-level property, the default button, and other
important buttons towards the start of the document, allowing them to be
processed without loading or processing the entire
/.well-known/button.json.¶
In some cases, a server-provided /.well-known/button.json may have
considerable size, or it may be generated on-demand with significant
processing power. Especially in these cases, it is important that
servers and clients follow standard HTTP caching practice as specified
by [RFC9110] and [RFC9111]. Servers SHOULD provide appropriate
caching headers, allowing the client to cache the response. Clients
SHOULD use HTTP caching ([RFC9111]). In particular, the following
features of HTTP caching are RECOMMENDED for use by servers and
implementation by clients:¶
The If-Modified-Since request header [RFC9110] (Section 13.1.3)
can be used by clients to inform the server about the last time an
updated /.well-known/button.json was retrieved. In accordance with
the standard, servers SHOULD respond with 304 (Not Modified) to
indicate no change occurred to the /.well-known/button.json file.¶
In a similar manner, the Etag response header [RFC9110] (Section 8.8.3) can be used by servers to supply an entity tag for
/.well-known/button.json independently of modification times.
Managed web hosting providers frequently implement Etag by default,
therefore clients SHOULD implement this header and its corresponding
request headers If-Match, If-None-Match, or If-Range, as per
Section 4.3.1 of [RFC9111].¶
The Cache-Control: immutable response header [RFC8246], in
combination with the max-age property [RFC9111] (Section 5.2.2.1)
can be used by servers to specify that the /.well-known/button.json
is guaranteed to be valid for the specified amount of time, and that
clients never need to send another request for the
/.well-known/button.json within that time frame. This can
significantly reduce the load on servers where button changes occur
infrequently, and where update propagation delays due to valid but
stale caches are acceptable.¶
Button image files themselves SHOULD use HTTP caching in the same manner.¶
IANA will register the well-known URI /.well-known/button.json in the
well-known URIs registry [IANA-well-known] in conformance with the
requirements for this registration in [RFC8615]. The following
information is provided to facilitate the registration:¶
URI suffix: button.json¶
Change controller: IETF¶
Specification document(s): This RFC¶
Status: permanent¶
In case a JSON Schema registry is set up with IANA in the future, the
button.json Schema (Appendix A), as defined in this
specification and any of its updates and errata, shall be registered by
IANA with this JSON Schema registry. In the likely case that this JSON
Schema registry includes a canonical schema URL for registered schemas,
the canonical schema URL in this specification should be changed to the
one registered with IANA.¶
Buttons are usually copyrightable artworks. As such, unauthorized copying and inclusion of a button is a legal offense in most jurisdictions. This specification does not supersede the legal frameworks for copyright, licenses and permissions, but it attempts to aid all involved parties in avoiding legal issues.¶
Publication of a /.well-known/button.json file, as per this
specification, implies a permission to download (copy) the linked-to
buttons, and include them on other pages, provided that a button's link
(as per this specification) is persisted. These are the minimal
permissions required to make the data in /.well-known/button.json
useful to third parties. This does not waive copyright and is not
comparable to stronger copyleft licenses. It is also not as legally
unambiguous as the license properties, so the use of these properties is
strongly RECOMMENDED.¶
The license and licenseText properties allow the button author to
provide a copyright license. In case the author is not provided in
either of those properties, it can be assumed to be the same as the
author of the web site's content, or the web site's owner.¶
It is RECOMMENDED that clients use SPDX tooling and human-in-the-loop
verification of both license and licenseText to verify that the
client's use of the button is allowed by the license.¶
The following licenses are RECOMMENDED for use in
/.well-known/button.json:¶
Any of the current Creative Commons licenses [CC], including CC BY,
CC BY-SA, and CC BY-ND. The no-derivative licenses including the
latter are closest to the default permissions implied with publication
of a /.well-known/button.json file.¶
A full list of standard licenses tracked by SPDX is available at https://spdx.org/licenses/.¶
Specifying the location of a button image in /.well-known/button.json
exposes it to automated scrapers, including malicious ones. If a web
server operator wishes to decrease the visibility of the buttons,
robots.txt [RFC9309] can be used to discourage scrapers from
accessing /.well-known/button.json and the button images, but since
some scrapers do not respect robots.txt properly, the web server may
additionally need to block certain user agents and IP addresses from
accessing /.well-known/button.json and/or button images.¶
Hotlinking, which the server can explicitly request via the
hotlink (Section 2.1.2.3) button property, may expose users to tracking by
the button origin server. Every visit to a third-party site which
includes and hotlinks the button will cause a request to be sent to the
origin server, possibly including the Referer HTTP header pointing to
the third-party site. This allows the origin server to determine which
users, identified at least by their IP addresses and HTTP user agents,
visited which third-party site. It also allows the origin server to
determine which third-party sites are publicly displaying the button in
the first place. This may be a concern to both the third-party site,
wishing to protect its users from such data collection, as well as the
users themselves.¶
Therefore, clients SHOULD NOT strictly follow the recommendations set
out by "hotlink": true. This attribute is explicitly only specified as
a server-side recommendation for clients, not a recommendation that
clients should necessarily follow. Clients MUST consider the privacy
concerns described above carefully and weigh them against the benefits
of hotlinking, such as decreased storage requirements for the web site,
and faster button updates. When in doubt, clients SHOULD err on the side
of caution and not use hotlinking.¶
imageRendering CSS Injection
The imageRendering property may be set to an arbitrary string by a
malicious web site operator. Clients which use the property without
additional checks as part of the button's CSS properties (whether in
stylesheets or inline style in HTML), are subsequently vulnerable to
CSS or HTML injection attacks. Therefore, clients MUST NOT use this
property without validating it, and reject any unknown values.¶
Hotlinking buttons imposes an additional load on the server, as it has
to serve the button to every visitor of a client's web page, not just
its own page(s). Therefore, usage of the "hotlink": true setting
should be carefully evaluated, as even well-intentioned clients may
cause increased load on the server if their pages receive many views.¶
Malicious or careless clients may ignore the hotlink attribute and
always hotlink the button image. This scenario is no different from
ordinary HTTP Denial-of-Service attacks and should be addressed
similarly. For instance, the Referer header [RFC9110] (Section 10.1.3) may be used to determine which requests for the images are
being sent from a third-party web page, and block those requests
accordingly.¶
At a basic level, this can be done easily with jq:¶
jq '{ "$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-01.schema.json", "buttons": . }' $old_filename > $new_filename
¶
You will no longer need special logic for your web server, instead the
new path for the file is /.well-known/button.json.¶
You may add a copy of the schema version matching your file in
/.well-known/button.schema.json.¶
You might want to add a default property, especially if you provide
multiple buttons.¶
You should consider adding the extra accessibility properties where the
default values aren't sufficient (especially animations).¶
The current schema is backwards-compatible with the 2024-06 one, adding only optional properties.¶
You should consider adding the new properties where applicable,
especially license.¶
This specification would not have been possible without the many
excellent ideas from various beings, most of which are listed under
Appendix "Contributors". The authors thank Arch Retriever in particular
for the original ./well-known/button.json idea.¶
Arch came up with the idea and created the original version of this specification.¶
Reina contributed the idea of an alt text property.¶
Sugar contributed ideas on how to make this specification more accessible to people using shared hosting services.¶
Seirdy contributed the idea of multiple versions of a button with different accessibility properties.¶
Soblow contributed examples and correction to the 2024 second draft, as well as the hotlink attribute.¶
Natty contributed the idea of a caption property distinct from the alt property.¶