===============================
An open-source, lightweight tool to convert plain text scripts into CapCut-compatible .SRT subtitle files with accurate timing and formatting.
This tool allows content creators, video editors, and storytellers to paste their script into a textbox, set timing parameters, and instantly generate subtitles for platforms like CapCut or Premiere Pro.
- Paste your script and generate .srt files instantly
- Adjust Words Per Second (WPS), Minimum Duration, and Pause Padding
- Copy subtitles or download the .srt file
- Clean and responsive 60/40 UI layout with live preview
- Fully runs in-browser with a PHP backend (no database required)
- Clone or download the repository to your localhost or web server.
- Make sure you have PHP installed (PHP 7.4 or later recommended).
- Ensure the
/srt_files/
folder exists and is writable:- On Linux/Mac: mkdir srt_files chmod 775 srt_files
- Open
index.php
in your browser via localhost (e.g. http://localhost/CapCut-SRT/index.php). - Paste your text, adjust timing, and click “Process” to preview subtitles.
- Use the Copy or Download buttons to export your final .srt file.
- index.php → Main interface with input, preview, and controls
- generate_srt.php → PHP backend script that parses text and generates SRT
- /srt_files/ → Writable folder where .srt files are saved before download
- PHP (no database required)
- HTML/CSS (Flexbox layout)
- Vanilla JavaScript (Fetch API, clipboard, file generation)
- Auto line splitting for long lines
- Speaker label parsing (e.g.
Narrator:
) - Dark/Light mode toggle
- SRT structure validation (time overlaps, line length)
Developed by Tarek Tarabichi MIT License – Free to use, modify, and distribute.
Found a bug? Have a feature idea? Feel free to open an issue or submit a pull request via GitHub.