Story Generator
Generate random stories instantly with our free online tool
Benefits of Generated Stories
Creative Writing: Perfect for brainstorming ideas
Quick Prototyping: Fast way to build story concepts
Content Creation: Great for blog posts and articles
Variety: Different combinations each time
Generated Story
Story generated successfully
âś… High-quality story generated with accurate formatting
| Format | Best For | Compatibility | File Size | Features |
|---|---|---|---|---|
| Plain Text | General use | Universal | Small | Simple, readable |
| HTML | Web development | Web browsers | Small | Structured, styled |
Why Use Our Story Generator?
- Free Online Generation Tool
- Multiple Story Types
- Customizable Length
- Various Content Options
- Multiple Output Formats
- Fast Generation
- Secure and Private
- Works on All Devices
đź’ˇ Pro Tip: For creative writing exercises, enable "Include Dialogue" and "Include Conflict" for richer storytelling. The "Twist Ending" option adds surprise elements to your narrative.
Story generated successfully!
`);
showNotification('Story preview opened in new window!');
}
function downloadText() {
const text = document.getElementById('generatedText').value;
if (!text) {
alert('No text to download');
return;
}
// Create a Blob with the text
const blob = new Blob([text], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
// Create temporary link element
const a = document.createElement('a');
a.href = url;
a.download = 'generated-story.txt';
document.body.appendChild(a);
a.click();
// Clean up
setTimeout(() => {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 100);
showNotification('Story downloaded successfully!');
}
function showNotification(message) {
const notification = document.getElementById('notification');
notification.textContent = message;
notification.classList.add('show');
setTimeout(() => {
notification.classList.remove('show');
}, 3000);
}
function resetForm() {
// Reset form fields
document.getElementById('storyType').value = 'fantasy';
document.getElementById('storyLength').value = 'medium';
document.getElementById('characters').value = 'many';
document.getElementById('outputFormat').value = 'plain';
document.getElementById('includeDialogue').checked = true;
document.getElementById('includeConflict').checked = true;
document.getElementById('includeTwist').checked = false;
document.getElementById('addSetting').checked = false;
// Reset text area
document.getElementById('generatedText').value = '';
// Reset UI
document.getElementById('resultsContainer').style.display = 'none';
document.getElementById('previewBtn').disabled = true;
document.getElementById('downloadBtn').disabled = true;
// Hide progress bar
document.getElementById('progressBar').style.display = 'none';
// Hide any errors
document.getElementById('errorMessage').classList.remove('show');
}