Subtitle Editor API

Category: media

Upload, edit, and export SRT subtitle files. Edit timestamps and text in an interactive table. Runs entirely in the browser.

Endpoint

N/A Browser API (FileReader)
No Server API

Response

Content-Type: N/A

This tool parses and edits SRT files in the browser. No server-side API is available.

// Browser-only: SRT parsing and editing

cURL Example

# No cURL equivalent — this tool runs in the browser

Code Samples

// SRT parsing in JavaScript
function parseSrt(srtText) {
    return srtText.trim().split('\n\n').map(block => {
        const lines = block.split('\n');
        return {
            index: parseInt(lines[0]),
            time: lines[1],
            text: lines.slice(2).join('\n')
        };
    });
}
# For server-side SRT processing:
import pysrt

subs = pysrt.open('subtitles.srt')
for sub in subs:
    print(f'{sub.start} --> {sub.end}: {sub.text}')
// For server-side SRT processing:
// Parse SRT format: index, timestamp line, text, blank line
// String[] blocks = srtContent.split("\\n\\n");