Convert SRT to TXT programmatically with one HTTP request. The SRT to TXT API strips the timestamps and cue numbers and returns the plain transcript — nothing but the dialogue text.
It's the conversion for transcripts, archives, search indexes, and any place that wants captions without timing. One credit per conversion, 100 free credits to start.
Why convert SRT to TXT with an API
- Transcripts: clean dialogue text for notes or publishing.
- Search: index subtitle text without timing noise.
- Automate: extract plain text from caption files at scale.
Convert with cURL
curl -X POST https://api.example.com/api/v1/convert \
-H "Authorization: Bearer your_api_key" \
-F "[email protected]" \
-F "from=srt" \
-F "to=txt" \
-o transcript.txt
Compact example — Ruby
require "net/http"
require "uri"
url = URI("https://api.example.com/api/v1/convert")
boundary = "----SubtoVTT#{rand(1_000_000)}"
content = File.binread("movie.srt")
body = +"--#{boundary}\r\n"
body << "Content-Disposition: form-data; name=\"file\"; filename=\"movie.srt\"\r\n\r\n"
body << content << "\r\n"
body << "--#{boundary}\r\nContent-Disposition: form-data; name=\"from\"\r\n\r\nsrt\r\n"
body << "--#{boundary}\r\nContent-Disposition: form-data; name=\"to\"\r\n\r\ntxt\r\n"
body << "--#{boundary}--\r\n"
req = Net::HTTP::Post.new(url)
req["Authorization"] = "Bearer #{ENV['SUBTOVTT_API_KEY']}"
req["Content-Type"] = "multipart/form-data; boundary=#{boundary}"
req.body = body
res = Net::HTTP.start(url.host, url.port, use_ssl: true) { |http| http.request(req) }
File.binwrite("transcript.txt", res.body)
Full examples by language
- Convert SRT to VTT with Python
- Convert SRT to VTT with Node.js
- Convert SRT to VTT with cURL
- Convert SRT to VTT with PHP
- Convert SRT to VTT in the browser
Format notes
| Topic | Detail |
|---|---|
| Output | Plain text (.txt), UTF-8 |
| Timestamps | Removed |
| Cue numbers | Removed |
| Dialogue | Kept, line breaks preserved |
| Usage | Transcripts, search, archives |
Tip: keep the original SRT — timing is lost in TXT output, so this is a one-way conversion.
FAQ
Is SRT to TXT one-way? Yes. TXT has no timing, so you can't convert it back to a timed format.
Can I clean the text while converting? Yes — combine with clean_sdh (strip [sound]/(applause)) or fix_all_caps for a readable transcript in one call.
Next
- Convert SRT to VTT →
- Convert ASS to SRT →
- Try the free subtitle-to-text tool — no signup required
- Get credits →