Random Joke Generator
Get instant random jokes from a built-in bank of 60 clean jokes across 8 categories with filters, favorites, autoplay, and export.
Updated
What is the Random Joke Generator?
The Random Joke Generator instantly serves up a random joke from a curated, built-in bank of 60 clean, family-friendly jokes across 8 categories — Dad Jokes, Puns, Programming, Science, Knock-Knock, One-Liners, Math, and Food. No API keys, no network calls, no NSFW surprises.
Unlike thin joke sites that hammer a flaky third-party API and repeat the same ten jokes, this tool ships the whole bank locally in your browser. That means:
- Zero latency — jokes appear the instant you tap.
- Works offline — perfect for classrooms, planes, and stand-up prep.
- Never repeats the joke you just saw (smart avoid-repeats).
- Truly random — cryptographic-quality shuffle, not the same "top 5" over and over.
Why people use it
- Icebreakers for meetings, classes, and first dates.
- Kid-safe entertainment on long car rides.
- Stand-up warm-ups and open-mic filler material.
- Slack / Discord daily-joke bots (copy → paste).
- Content creators who need fresh material without licensing headaches.
What makes this one better
| Feature | This tool | Typical joke sites |
|---|---|---|
| Works offline | ✅ | ❌ |
| Category filters | ✅ 8 categories | Usually 1–2 |
| Rating filter (clean / mild) | ✅ | ❌ |
| Hide punchline until tap | ✅ | ❌ |
| Autoplay with interval | ✅ | ❌ |
| Favorites + history | ✅ | ❌ |
| Export (Text / Markdown / JSON) | ✅ | ❌ |
| Keyboard shortcuts | ✅ Space / R / F | ❌ |
| Works offline after load | ✅ | ❌ |
Everything runs client-side. Your favorites and history live in your browser only.
How it works
How It Works
The Random Joke Generator is a single-page tool with a simple loop: filter → draw → reveal → save or share. Everything is client-side JavaScript running against a static joke bank.
1. The joke bank
The tool ships with 60 hand-curated jokes, each tagged with:
category— one ofdad,pun,programming,science,knock-knock,one-liner,math,food.rating—clean(fully family-safe) ormild(still PG, may include very tame adult humor like a therapy punchline).setupandpunchline— stored separately so the UI can hide the punchline until you tap.
interface Joke {
id: number;
category: JokeCategory;
rating: "clean" | "mild";
setup: string;
punchline: string;
}
2. Filtering the pool
When you toggle categories or ratings, the tool computes the eligible pool:
pool = JOKES.filter(
(j) =>
selectedCategories.includes(j.category) &&
selectedRatings.includes(j.rating) &&
j.id !== lastShownId, // avoid immediate repeats
);
If the pool is empty (e.g., you turned every category off), the UI tells you to re-enable at least one.
3. Drawing a random joke
A uniform random index picks the next joke:
If the pick happens to equal the last shown joke, the tool re-draws once, then falls back to any other joke — guaranteeing you never see the same joke twice in a row (as long as more than one joke matches your filters).
4. Reveal, autoplay, save
- Reveal — the punchline is blurred by default; tap the card (or press Space) to reveal.
- Autoplay — turn it on and pick an interval (3–15 s) to cycle jokes hands-free.
- Favorite — press F or tap the star to keep a joke; favorites live in
localStorage. - History — the last 20 shown jokes are kept so you can scroll back.
- Copy — one tap copies the joke as plain text.
5. Export
Export Favorites, Recent history, or the entire bank in three formats:
- Text — dividers between jokes, ready for Slack / Discord.
- Markdown —
###headings, blockquoted setups, bold punchlines — drops straight into README, Notion, or Obsidian. - JSON — the full structured record (
id,category,rating,setup,punchline) for bots, spreadsheets, or your own app.
Keyboard shortcuts
| Key | Action |
|---|---|
| Space | Reveal punchline / next joke |
| R | Reveal punchline |
| F | Favorite current joke |
| → | Next joke |
Privacy
Nothing leaves your browser. No analytics on jokes and no network requests for content. Favorites and history are stored in localStorage on your device and can be cleared at any time.
Examples
Pull a random dad joke
Filter to the Dad Jokes category and hit Next to get one setup-and-punchline joke.
Programming joke for a standup
Filter to Programming, tap the card to reveal the punchline in front of your team.
Autoplay a party set
Enable autoplay with a 6-second interval to cycle random jokes hands-free.
Export favorites as Markdown
Star the jokes you love, then export the list as a Markdown file to paste anywhere.
Frequently asked questions
Is the Random Joke Generator really free?
Is the Random Joke Generator really free?
Yes — 100% free, no signup, and no API keys. The entire joke bank ships with the page, so you can use it as much as you want without hitting rate limits or paywalls.
How many jokes are in the bank?
How many jokes are in the bank?
There are 60 curated jokes spread across 8 categories: Dad Jokes, Puns, Programming, Science, Knock-Knock, One-Liners, Math, and Food. Every joke is human-picked for quality — no scraped filler.
Are the jokes safe for kids and workplaces?
Are the jokes safe for kids and workplaces?
Yes. Every joke is rated clean or mild. clean jokes are fully family-safe. mild jokes are still PG and workplace-appropriate — think tame observational humor, no profanity, no adult content. You can filter to clean only with one toggle.
Does it work offline?
Does it work offline?
Yes. Once the page loads, the entire joke bank is stored in your browser. You can turn off Wi-Fi and keep pulling jokes indefinitely — great for planes, classrooms, or spotty connections.
Will I ever see the same joke twice in a row?
Will I ever see the same joke twice in a row?
No. The generator explicitly avoids showing the joke you just saw. Across a full session you may eventually revisit a joke (the bank is 60 strong), but never back-to-back.
Can I filter by category?
Can I filter by category?
Yes. Toggle any combination of the 8 categories on or off. For example, enable only Programming for a tech standup, or only Knock-Knock for a kids' party.
What is autoplay?
What is autoplay?
Autoplay cycles a new random joke every 3–15 seconds (you pick the interval). Perfect for parties, waiting-room screens, or looping content on a second monitor. Toggle it off any time.
Can I save my favorite jokes?
Can I save my favorite jokes?
Yes. Tap the star (or press F) on any joke to favorite it. Favorites persist in your browser's local storage and can be exported as Text, Markdown, or JSON.
How do I export jokes to use elsewhere?
How do I export jokes to use elsewhere?
Use the Export menu. Pick a scope (Favorites, Recent, or the full bank) and a format (Text, Markdown, or JSON). The file downloads instantly and is ready to paste into Slack, Notion, GitHub READMEs, or a spreadsheet.
Are these jokes copyrighted?
Are these jokes copyrighted?
The jokes are traditional, public-domain-style short-form humor (puns, knock-knocks, one-liners) that have circulated for decades. You can use them freely for personal use, presentations, social posts, and non-commercial content.
Does the tool track me or send data anywhere?
Does the tool track me or send data anywhere?
No. There are no analytics on joke content and no third-party API calls. Favorites and history are stored only in your browser's localStorage and never leave your device.
What keyboard shortcuts are supported?
What keyboard shortcuts are supported?
- Space — reveal punchline or advance to the next joke
- R — reveal the current punchline
- F — favorite the current joke
- → — next joke
Why hide the punchline until I tap?
Why hide the punchline until I tap?
Great jokes rely on timing. Hiding the punchline lets you read the setup out loud, pause for effect, then tap to reveal — perfect for stand-up practice or telling jokes to friends without spoiling the delivery.
Can I add my own jokes?
Can I add my own jokes?
The built-in bank is fixed for this version, but the JSON export gives you the exact schema (id, category, rating, setup, punchline) if you want to fork the project or build on top of it.
What if no jokes match my filters?
What if no jokes match my filters?
If you disable every category or rating, the pool becomes empty and the tool will prompt you to re-enable at least one category. Turn a category back on and hit Next to resume.
Related tools
More utilities you might find handy.
Chinese Zodiac Calculator – Find Your Animal Sign, Element & Compatibility
Discover your Chinese zodiac animal by birth date or year. Includes element, Yin/Yang, stem‑branch, personality, and love compatibility.
Numerology Calculator
Calculate your Life Path, Expression, and Soul Urge numbers from your birth date and name.
Random Name Picker
Paste a list of names and instantly pick one or more random winners with a fair, unbiased selection.