Zero Signup ToolsFree browser tools

Developer Tools

Retry-After Header Builder

Build and parse the HTTP Retry-After header in your browser. Generate delay-seconds or IMF-fixdate values for 429 and 503 responses with a live countdown.

Enter a non-negative integer. RFC 9110 Section 10.2.3 requires bare seconds, no units, no decimals.

2 minutes

Generated header

Retry-After: 120

Client should wait at least 2 minutes before retrying the request. The clock starts when the response is received.

Server snippets

Drop into your server config, framework, or worker. Tweak the status code and body to match the response you are sending.

Raw header

Retry-After: 120

curl response (server side)

# Returned by an HTTP/1.1 server, for example:
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 120

{ "error": "rate_limited" }

Nginx

add_header Retry-After "120" always;

Apache (.htaccess / VirtualHost)

<IfModule mod_headers.c>
  Header set Retry-After "120"
</IfModule>

Express.js (429 with rate limit)

app.use((req, res, next) => {
  if (isRateLimited(req)) {
    res.set("Retry-After", "120");
    return res.status(429).json({ error: "rate_limited" });
  }
  next();
});

Next.js Route Handler

export async function GET() {
  return new Response(JSON.stringify({ error: "rate_limited" }), {
    status: 429,
    headers: {
      "Content-Type": "application/json",
      "Retry-After": "120",
    },
  });
}

FastAPI (Python)

from fastapi import FastAPI, Response

app = FastAPI()

@app.get("/limited")
def limited(response: Response):
    response.status_code = 429
    response.headers["Retry-After"] = "120"
    return {"error": "rate_limited"}

Flask (Python)

from flask import Flask, jsonify, make_response

app = Flask(__name__)

@app.get("/limited")
def limited():
    body = jsonify({"error": "rate_limited"})
    resp = make_response(body, 429)
    resp.headers["Retry-After"] = "120"
    return resp

Go net/http

func handler(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Retry-After", "120")
    http.Error(w, "rate_limited", http.StatusTooManyRequests)
}

Cloudflare Worker

export default {
  async fetch(request) {
    return new Response("rate_limited", {
      status: 429,
      headers: {
        "Retry-After": "120",
      },
    });
  },
};

Quick reference

delay-seconds form

A non-negative integer count of seconds the client should wait, for example: Retry-After: 120.

HTTP-date form

An IMF-fixdate in GMT, for example: Retry-After: Wed, 21 Oct 2026 07:28:00 GMT. Used for scheduled maintenance windows.

When servers send it

Most often with 429 Too Many Requests, 503 Service Unavailable, and 3xx redirects. RFC 9110 Section 10.2.3 lists the exact responses.

What clients should do

Wait for the stated interval before retrying. Production clients clamp very long values and may add jitter to avoid retry thundering herds.

No units allowed

The seconds form is bare digits only. Values like '60s', '60 seconds', or '1m' are invalid and will be ignored by most clients.

No ISO 8601 dates

The HTTP-date form must be IMF-fixdate (or the obsolete RFC 850 or asctime, accepted for legacy reasons). Do not send '2026-10-21T07:28:00Z'.

How to use

  1. Pick a tab: Build seconds for a delay in seconds, Build HTTP-date for an absolute future instant, or Parse and explain to decode any incoming Retry-After value.
  2. On Build seconds, enter a non-negative integer (or tap a preset like 30 seconds or 1 hour). Copy the formatted header value and drop one of the server snippets into your Nginx, Apache, Express, Next.js, FastAPI, Flask, Go, or Cloudflare Worker code.
  3. On Build HTTP-date, pick the absolute time the client should retry at from the datetime-local picker, or tap a preset (in 5 minutes, in 30 minutes, in 1 hour, tomorrow same time). The header is emitted as IMF-fixdate in GMT, with the local and UTC representations shown side by side.
  4. On Parse and explain, paste any Retry-After value. The tool detects whether it is delay-seconds or HTTP-date, computes the absolute retry instant in your local time and UTC, runs a live countdown, and lists every issue it finds.
  5. Use the sample buttons in the parser to load valid and invalid examples (negative seconds, ISO 8601 by mistake, '60s' with a unit suffix, the obsolete RFC 850 format) so you can see exactly which errors each one produces.

About this tool

Retry-After Header Builder is a browser-only tool for the HTTP Retry-After response header defined by RFC 9110 Section 10.2.3. The header takes one of two forms: a non-negative integer count of seconds (delay-seconds), or an absolute HTTP-date in IMF-fixdate format such as 'Wed, 21 Oct 2026 07:28:00 GMT'. It is most commonly returned with 429 Too Many Requests for rate-limited APIs, 503 Service Unavailable during maintenance windows, and 3xx redirects (301, 302, 303, 307, 308) that ask the client to wait before following. The Build seconds tab takes a count of seconds, validates that it is a non-negative integer, shows a plain English summary of how long the client should wait, and emits a ready-to-paste header along with snippets for Nginx, Apache, Express, Next.js Route Handlers, FastAPI, Flask, Go net/http, and Cloudflare Workers. Quick presets cover the common rate-limit windows (1 second, 10 seconds, 30 seconds, 1 minute, 5 minutes, 15 minutes, 1 hour, 1 day). The Build HTTP-date tab takes an absolute future instant from a datetime-local picker (in the browser's local timezone), formats it as IMF-fixdate in GMT, and shows both the local and UTC representations side by side so the maintenance window is unambiguous. The Parse and explain tab accepts any incoming Retry-After value (with or without the 'Retry-After:' prefix), detects which form was sent, computes the absolute retry instant, shows a live countdown that updates each second, and surfaces every issue the parser finds: negative seconds, decimal seconds, ISO 8601 dates pasted by mistake, the obsolete RFC 850 and ANSI C asctime formats accepted only for legacy reasons, past dates that most clients treat as 'retry now', delays longer than a year that clients typically clamp, unit suffixes like '60s' that are invalid, and leading or trailing whitespace. A built-in quick reference panel summarizes the spec rules so the tool doubles as a learning aid. Useful for backend developers implementing rate limits, SREs scheduling maintenance windows, API consumers debugging why their retry logic fires too soon or too late, and anyone reading a 429 response and wondering exactly when they are allowed to try again. Everything runs locally; the header values you paste and the instants you generate never leave your browser.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools