File types · Explainer

The Atom file (.atom, .xml)

An Atom file is an XML feed, defined by an IETF standard, that lists the latest entries from a blog, a code repository or a video channel for feed readers to pick up. This guide explains what every Atom feed must contain, how it labels dates and content, how it differs from RSS, and has free sample Atom files to download for testing.

At a glance

Full name
Atom Syndication Format
Extensions
.atom (registered), often .xml
MIME type
application/atom+xml, registered with IANA; ;type=entry marks a single-entry document
Kind
Plain text (XML)
Namespace
http://www.w3.org/2005/Atom
Standard
RFC 4287 (IETF Proposed Standard, December 2005); publishing protocol in RFC 5023
First released
2005, by the IETF Atompub Working Group
Dates
RFC 3339, such as 2026-10-27T09:00:00Z
Opens with
Feed readers to follow; browsers and text editors to read the XML
Magic number
None; files start with <?xml or <feed

The basics

What is an Atom file?

An Atom file is a feed: a list of a site's latest entries that feed readers download from time to time to see what's new. It does the same job as RSS, with a stricter, fully specified design. Work on it began in 2003, when bloggers and developers wanted a feed format with a precise specification and an open process. The IETF published it as RFC 4287 in December 2005.

You meet Atom feeds where software generates them: GitHub offers them for a repository's releases and commits, YouTube publishes one for each channel, and many static site generators, such as Jekyll with its feed plugin, write one at build time. Feed readers treat Atom and RSS feeds the same way, so most readers never notice which one they have.

Three things Atom is not:

  • Not a newer version of RSS. It's a separate format with its own element names, built to avoid RSS's ambiguities.
  • Not Atom 0.3. Before the standard, a draft version 0.3 was widely deployed. It uses a different namespace, and some old feeds still carry it.
  • Not only for blogs. Atom's precise identifiers and dates make it a common choice for machine-generated feeds of releases, changes and search results.

Anatomy

What's inside an Atom file

An Atom feed is a <feed> element with some metadata about the feed, followed by <entry> elements, one per post. Every element lives in the Atom namespace. Here is a small but complete feed, part by part.

feed.atom
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>tag:example.com,2026:notes</id>
  <title>Sample Notes</title>
  <updated>2026-10-27T09:00:00Z</updated>
  <author>
    <name>Ada Example</name>
  </author>
  <link rel="self" href="https://example.com/feed.atom"/>
  <link rel="alternate" href="https://example.com/"/>
  <entry>
    <id>tag:example.com,2026:notes/1</id>
    <title>Hello, world</title>
    <updated>2026-10-27T08:15:00+01:00</updated>
    <published>2026-10-26T08:30:00+01:00</published>
    <link href="https://example.com/hello"/>
    <summary>The first post.</summary>
    <content type="html">&lt;p&gt;The first post.&lt;/p&gt;</content>
  </entry>
</feed>
  1. 1<feed xmlns="http://www.w3.org/2005/Atom">

    The root and its namespace

    The namespace is what makes this Atom. A <feed> without it, or with the namespace of the older draft Atom 0.3, isn't an Atom 1.0 feed.

  2. 2<id>tag:example.com,2026:notes</id>

    The feed's id

    Required. A permanent, unique identifier written as an absolute IRI. It may look like a web address, but readers must not assume they can load it.

  3. 3<title>Sample Notes</title>

    The title

    Required for the feed and for each entry.

  4. 4<updated>2026-10-27T09:00:00Z</updated>

    The last update

    Required. When the feed last changed in a way the publisher considers significant. An RFC 3339 timestamp with an upper-case T and Z.

  5. 5<author><name>…</name></author>

    The author

    A name, with optional email and uri. Required on the feed unless every entry has its own.

  6. 6<link rel="self" …/>

    The self link

    The feed's own address. The standard says a feed SHOULD have one, so readers know where to fetch it from.

  7. 7<link rel="alternate" …/>

    The web page

    The HTML page the feed belongs to. A link without rel means alternate.

  8. 8<entry>

    An entry

    One post. It needs its own id, title and updated, and either content or a link to the full text.

  9. 9<published>…</published>

    First published

    Optional: when the entry first appeared. updated moves with each edit; published stays put.

  10. 10<summary> and <content>

    Summary and content

    A short version and the full text. type="html" says the content is HTML, escaped once for XML, so readers never have to guess.

The rules

What every Atom feed and entry must have

RFC 4287 is precise about what's required, which is the main practical difference from RSS. A feed missing any of these is not valid Atom:

ElementOn the feedOn each entry
idExactly oneExactly one
titleExactly oneExactly one
updatedExactly oneExactly one
authorOne or more, unless every entry has oneOne or more, unless the feed (or the entry's source) has one
link rel="self"Recommended (SHOULD)Not used
contentNot usedAt most one; without it, a link rel="alternate" is required
summaryNot usedRequired when content has a src or holds binary data; otherwise optional

Identifiers deserve the most care. An id must be an absolute IRI that never changes, even when the feed moves to a new domain or the post gets a new title or address. Two common styles:

  • Tag URIs (RFC 4151): tag:example.com,2026:notes/1, a domain you owned on a date, plus your own name for the item. They never pretend to be addresses.
  • UUIDs: urn:uuid:7f3c0d52-1e9b-4b8f-a2d6-0c4e6b9a1d11, generated once and stored with the post.

Using the post's URL as its id works until the URL changes. Then every reader sees the post as new. Store the id with the post when you first publish it.

Timestamps

Dates: RFC 3339, updated and published

Every date in Atom follows RFC 3339, a strict profile of ISO 8601: 2026-10-27T09:00:00Z or 2026-10-27T10:00:00+01:00. The date and time are separated by an upper-case T, and the time ends with an upper-case Z for UTC or a numeric offset. Fractions of a second are allowed. Dates without a time zone, or with a space instead of the T, are invalid.

ElementRequiredChanges when
updated on the feedYesAnything significant in the feed changes, usually the newest entry's updated
updated on an entryYesThe entry is edited in a way the publisher wants readers to notice
published on an entryNoNever: it records when the entry first appeared

Compare RSS, which uses the email date format (Mon, 26 Oct 2026 08:30:00 +0100) and has no separate "last edited" date per item. Atom's dates sort correctly as text and parse with any ISO 8601 library.

Content

Text, HTML or XHTML: how Atom labels content

In RSS, a reader has to guess whether a description is plain text or HTML. Atom says so. title, subtitle, summary, rights and content all take a type attribute:

typeWhat's insideExample
text (default)Plain text. A < is shown as a less-than sign.<title>3 &lt; 4</title>
htmlHTML escaped once for XML, or in a CDATA section.<content type="html">&lt;p&gt;Hi&lt;/p&gt;</content>
xhtmlReal XHTML markup inside a single <div> in the XHTML namespace. The div itself is a wrapper, not part of the content.<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Hi</p></div></content>
A MIME typeOn content only: other XML as is, text, or binary data in Base64.<content type="image/png">iVBORw0KGgo…</content>
src="…"On content only: the content is elsewhere, at that address. A summary is then required.<content type="text/html" src="https://…"/>

The common bug is double escaping: HTML escaped twice (&amp;lt;p&amp;gt;) shows up as visible tags in the reader. Escape exactly once, or use type="xhtml" and write the markup directly, which is safer but requires well-formed XHTML.

RFC 5005

Paged and archived feeds (RFC 5005)

A feed usually holds only the latest entries. RFC 5005 adds link relations so that a client can find the rest, and defines three kinds of feed:

KindHow it's markedUse it for
CompleteAn empty fh:complete elementA list that replaces itself, like a top-ten chart: entries no longer in the file should be removed.
PagedLinks with rel values first, previous, next and lastSearch results and large lists, read page by page. Pages can change between visits.
ArchivedLinks with rel values prev-archive, next-archive and current; an empty fh:archive in each archiveFull history: archive documents don't change, so a client can rebuild every entry ever published.

The fh: prefix is the namespace http://purl.org/syndication/history/1.0. The paging links work in RSS too, through atom:link elements.

Comparison

Atom vs RSS 2.0, element by element

For a broader comparison that includes JSON Feed, see the RSS page. If you're converting a feed or writing a parser that reads both, this is how the elements map:

RSS 2.0AtomDifference
<channel> inside <rss><feed>Atom has no wrapper element.
<item><entry>
<guid> (optional)<id> (required)Atom requires one on the feed and every entry.
<pubDate><published> and <updated>Atom requires updated and uses RFC 3339 dates.
<lastBuildDate><updated> on the feed
<description> (channel)<subtitle>
<description> (item)<summary> or <content>Atom labels the content type.
<link><link rel="alternate" href="…"/>Atom links are attributes and can have any rel.
<author> (an email address)<author> with name, email, uriAtom requires a name; email is optional.
<category><category term="…" scheme="…" label="…"/>
<enclosure><link rel="enclosure" length="…" type="…"/>Atom allows several per entry; the RSS spec doesn't say, and readers expect one.
<copyright><rights>
<image><logo> and <icon>icon should be square, logo twice as wide as it is tall.
<language>xml:lang on any element
<ttl>NoneAtom leaves caching to HTTP headers.

Related

AtomPub, briefly

The Atom Publishing Protocol (RFC 5023, October 2007) is a separate standard for creating and editing entries over HTTP: GET a collection to list entries, POST an Atom entry to create one, PUT to edit and DELETE to remove. A service document (application/atomsvc+xml) lists the collections a client can write to. Most web APIs now use JSON instead, but the Atom feed format itself is unaffected.

How to

How to open, validate and publish an Atom feed

  • Follow it: paste its address into any feed reader.
  • Read it: open it in a browser or text editor. Browsers show the XML itself, not a formatted page; the RSS page explains why, and why XSLT stylesheets are going away.
  • Validate it: the W3C Feed Validation Service checks Atom as well as RSS. RFC 4287 also includes a RELAX NG schema, which xmllint --relaxng can use after conversion to XML syntax.
  • Announce it: add <link rel="alternate" type="application/atom+xml" href="…"> to the <head> of your pages so readers can discover it.

Problems that come up again and again:

  • The wrong namespace, or none: readers then don't recognise the file as Atom at all.
  • Ids that change when a site moves domain, making old entries reappear as new.
  • Dates without a time zone, or in the RSS format.
  • Relative links in content. Atom supports xml:base to set the base address, but not every reader honours it, so absolute https:// links are safer.
  • Unescaped &, which breaks the XML. The security advice for parsing untrusted XML on the XML page applies to Atom too.

Free downloads

Sample Atom files to download

Free sample Atom feeds for testing feed readers and parsers. Each one validates against the RELAX NG schema in RFC 4287, reads cleanly in Python's feedparser, and passes the W3C Feed Validation Service.

sample-blog.atom · 3.7 KBDownloadOpen
Loading…

What's inside sample-blog.atom

The file is commented: open it in a text editor and each numbered comment marks one of these parts.

  1. Comments 1 and 2: declaration and namespace

    The XML declaration, then <feed> in the Atom namespace with xml:lang="en-GB".

  2. Comments 3 and 4: what's required

    A tag URI as the feed's id, its title and updated, and a feed-level author with a name, email and URI.

  3. Comments 5 and 6: links and metadata

    A self link to the file's 99helpers address and an alternate link to the blog, then subtitle, rights, generator, icon and a category.

  4. Comments 7 to 9: a full entry

    An entry with its own tag URI, updated and published in different time zones, a summary, and HTML content escaped once.

  5. Comments 10 and 11: an entry's own author and plain text

    The second entry names its own author, overriding the feed's, and uses type="text" content, where &lt; is shown as a plain less-than sign.

  6. Comment 12: content that lives elsewhere

    The third entry points to its full text with src, so it must carry a summary.

All sample Atom files

  • Commented blog feed

    sample-blog.atom · 3.7 KB (3,826 bytes)

    A three-entry feed for a fictional blog with every required element, links, metadata, HTML and text content, an entry author and out-of-line content, with numbered comments explaining each part.

    • Teaching the parts of an Atom feed
    • Testing a feed reader or parser
  • XHTML content, several authors

    sample-xhtml.atom · 3.0 KB (3,021 bytes)

    Entries with type="xhtml" content, an HTML title, two authors and a contributor, categories with scheme and label, UUID ids and non-ASCII text.

    • Testing XHTML and HTML text constructs
    • Checking multiple authors are all shown
  • Minimal valid Atom feed

    sample-minimal.atom · 631 bytes

    A feed with only the required elements plus a self link, and one entry with an id, title, updated, link and summary.

    • Parser smoke tests
    • A starting point for a new feed
  • Paged feed, page 2 of 3 (RFC 5005)

    sample-paged.atom · 3.6 KB (3,642 bytes)

    Ten entries forming the middle page of a fictional 30-result feed, with first, previous, next and last links. The page links point to example.com, so following them loads nothing.

    • Testing pagination code
    • Checking readers ignore links they don't understand

Ways to test with them

  • Feed readers: subscribe to sample-blog.atom at its 99helpers address. The second entry should be credited to Sam Sample and the others to Ada Example.
  • Content types: in sample-blog.atom, the first entry should show bold text, and the second should show 3 < 4 as text, not as a broken tag.
  • Multiple authors: sample-xhtml.atom has an entry with two authors and a contributor; check your reader or parser keeps all of them.
  • Paging: a client that follows RFC 5005 should find first, previous, next and last in sample-paged.atom and request page 3 next.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have an Atom feed? Give it a link.

Drop an Atom file on 99helpers and it gets its own web address. Browsers show it as XML, and feed readers can subscribe to the link.

Questions

Atom files, frequently asked

What is an Atom feed?

An XML file that lists a site's latest entries for feed readers, in the format defined by RFC 4287. It does the same job as RSS with stricter rules.

What's the difference between Atom and RSS?

Both are XML feed formats. Atom is an IETF standard that requires an id and an updated date on every entry, uses RFC 3339 dates and says whether content is text, HTML or XHTML. RSS 2.0 is looser and remains the norm for podcasts.

How do I open an .atom file?

Add its address to a feed reader to follow it. To read the XML, open it in a browser or a text editor.

What is the MIME type of an Atom feed?

application/atom+xml, registered with IANA. A document holding a single entry can add ;type=entry.

What should I use as an Atom id?

Something unique that will never change: a tag URI like tag:example.com,2026:post-1 or a urn:uuid: value. Avoid the post's URL if it might ever move.

What date format does Atom use?

RFC 3339, like 2026-10-27T09:00:00Z, with an upper-case T and either Z or an offset such as +01:00.

Is Atom still used?

Yes. GitHub and YouTube publish Atom feeds, many static site generators write them, and every mainstream feed reader reads them.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.