← Developer

RRULE Formatter

Build, parse, and preview iCalendar RRULE recurrence rules in your browser.

Build Rule

Frequency

Output

Next occurrences

    Use this tool from AI agents

    This tool's engine is available to AI agents over MCP as expand_rrule. Add the Clean.tools server, then your agent can call it directly.

    Claude Code
    claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
    Claude Desktop (mcpServers)
    {"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
    Cursor
    https://mcp.clean.tools/mcp

    Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

    curl
    curl -s https://api.clean.tools/v1/expand_rrule \ -H 'content-type: application/json' \ -d '{"freq":"WEEKLY","start":"2026-01-05T09:00","interval":1,"count":10,"byday":["MO","WE","FR"]}'
    JavaScript
    const res = await fetch('https://api.clean.tools/v1/expand_rrule', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ freq: 'WEEKLY', start: '2026-01-05T09:00', interval: 1, count: 10, byday: ['MO', 'WE', 'FR'] }) }); const data = await res.json();

    How it works

    This RRULE formatter helps you build and understand iCalendar recurrence rules (RFC 5545). Select a frequency, interval, days, and other options to generate a valid RRULE string. The tool also shows a human-readable description and previews the next occurrences based on your start date.

    All formatting and date calculations run entirely in your browser. No data is sent to a server. No cost, no signup, no tracking.

    Need the same recurrence logic in a script or an AI agent? The same engine is available as the expand_rrule tool through the Clean.tools rrule API and MCP server, or you can install the @clean-tools/mcp package from npm.


    Frequently asked questions

    Why does the Until field turn off when I set a count?

    RFC 5545 does not allow COUNT and UNTIL in the same rule, so the tool disables one field while the other is in use. If you fill both anyway, COUNT wins and the effective end date is ignored.

    Why does a monthly rule on the 31st skip some months?

    For monthly-by-date rules, RFC 5545 skips any month that lacks the start day rather than clamping backward. A rule starting January 31 lands on March 31 and May 31, skipping February, April, and June.

    Does the Until date I generate assume UTC?

    No. Because the start date is a floating local date-time with no TZID, the UNTIL value is emitted as floating local time too, with no trailing Z. This avoids silently shifting your rule by your time zone offset.

    How many occurrences does the preview show?

    The preview lists up to the next 10 matching dates from your start date, or fewer if your count is smaller. The full rule string still applies without that limit in your calendar app.

    Can I use this from the command line or an AI agent?

    Yes. The same engine is exposed as a REST endpoint at https://api.clean.tools/v1/expand_rrule, so you can build and expand rules from any script with a plain JSON request. It is also an MCP server you can add to Claude, Claude Code, or Cursor to let an agent call it directly. The @clean-tools/mcp npm package runs the same server locally over stdio.


    More tools from Clean.tools

    View all tools

    Use Clean.tools from your AI agent

    This tool is also expand_rrule on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.

    Claude Code
    claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
    Any MCP client (streamable HTTP, authless)
    https://mcp.clean.tools/mcp

    Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →