Convert txt to ass

Convert TXT to ASS

Create timed, styled ASS subtitles from a TXT transcript with Subtitle Edit, Aegisub, or Python.

Convert TXT files online

We don’t have a dedicated online converter for TXT to ASS yet, but you can convert TXT files online to these and more formats:

How to convert txt to ass file

Some video players, subtitle editors, and authoring workflows require an .ass file for timed, styled subtitles, while the available source may be only a plain-text transcript. Converting the file is straightforward only when the text already has usable timing data; an untimed transcript still needs synchronization.

What the TXT format is

.txt is a plain-text format containing characters but no standard subtitle timing, styling, positioning, or animation. Notepad, TextEdit, code editors, transcription services, and speech-recognition software commonly produce it. A TXT file may contain a script, transcript, dialogue list, or rough subtitle draft.

Its structure determines the conversion effort: each subtitle may occupy one line, one paragraph, or several lines of continuous prose. Headings, page numbers, speaker labels, timestamps, notes, and formatting markers usually require cleanup. Plain text does not define how those elements should be interpreted.

What the ASS format is

.ass is Advanced SubStation Alpha, a structured subtitle format that stores timed dialogue events and style definitions. An ASS file can specify fonts, colors, outlines, shadows, margins, alignment, screen coordinates, multiple styles, karaoke effects, and vector drawing commands.

ASS is suitable for karaoke, anime subtitles, captions with different speaker styles, on-screen signs, and typesetting workflows in Aegisub or Subtitle Edit. It provides more control than SRT, but many televisions, hardware players, web platforms, and streaming services support only SRT or WebVTT and may discard ASS styling.

Convert the text with Subtitle Edit

  1. Install the current Subtitle Edit release from its official website or GitHub repository.
  2. Clean the source so that each intended subtitle is on a separate line. Remove content that should not appear on screen, then save the file as UTF-8, preferably UTF-8 with or without a BOM as supported by the editor.
  3. Open the file through Subtitle Edit's plain-text import command, such as File → Import → Plain text. Menu names can vary slightly by release.
  4. Choose the import rule that treats each line as a subtitle and assign an initial duration and gap, for example four seconds per line with a 0.1-second gap. These values create a draft; they do not synchronize speech.
  5. Open the video and correct every event's start time, end time, line break, and reading speed using the video preview and waveform where available. Split long lines and remove empty or non-dialogue events.
  6. Choose File → Save as, select Advanced SubStation Alpha (*.ass), and save the result as output.ass.
  7. Edit the style through Subtitle Edit's style manager if required. Set the font, size, colors, outline, shadow, alignment, and margins, then save again.

Use Aegisub for typesetting and precise timing

Aegisub is appropriate when the file needs detailed timing, multiple styles, karaoke tags, or positioned signs. Create a subtitle script, paste the cleaned TXT lines into separate dialogue rows, and set each row's start and end time against the video. Configure styles under Subtitles → Styles Manager, then save with File → Save Subtitles as an ASS file. Aegisub does not infer timing from an ordinary transcript.

Generate a draft with Python

For one subtitle per line, this script creates a minimal ASS file with four seconds per nonempty line. It is useful for an initial draft, not a finished synchronized subtitle.

from pathlib import Path

def ass_time(seconds):
    hours = int(seconds // 3600)
    minutes = int((seconds % 3600) // 60)
    remaining = seconds % 60
    return f"{hours}:{minutes:02d}:{remaining:05.2f}"

lines = [
    line.strip().replace("\n", "\\N")
    for line in Path("input.txt").read_text(encoding="utf-8-sig").splitlines()
    if line.strip()
]

header = """[Script Info]
ScriptType: v4.00+

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,24,&H00FFFFFF,&H000000FF,&H00000000,&H64000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
"""

with Path("output.ass").open("w", encoding="utf-8") as output:
    output.write(header)
    for index, line in enumerate(lines):
        start = index * 4
        end = start + 4
        output.write(
            f"Dialogue: 0,{ass_time(start)},{ass_time(end)},Default,,0,0,0,,{line}\n"
        )

Save the code as convert.py, place input.txt beside it, and run python convert.py. Replace the generated timings by manual timing or speech-alignment software before delivery. ASS timestamps use centiseconds, so the script's H:MM:SS.cc output is valid for ordinary subtitle durations.

Online conversion and compatibility

Online services such as Zamzar or Convertio can be considered only when their current interface explicitly offers the required TXT-to-ASS operation and timing controls. A generic file-extension converter cannot derive speech timing from a transcript. Do not upload unreleased or confidential dialogue to a third-party service.

  • Renaming input.txt to output.ass does not convert it. ASS requires sections, style definitions, event fields, and valid start and end times.
  • Fixed durations assign arbitrary timing. Accurate results require a video, manually created timings, or a speech-to-text alignment workflow.
  • Use UTF-8 for accented characters, Cyrillic, Arabic, and other non-Latin scripts. Test right-to-left rendering and font availability in the target player.
  • ASS text can contain override tags and backslash line breaks such as \N; unsupported players may display tags literally or ignore positioning and styles.
  • Check the finished file in the intended playback environment. Convert to SRT or WebVTT when the destination rejects ASS or requires portable, minimally styled subtitles.

TXT vs ASS: format comparison

How the TXT and ASS formats compare on the properties that matter most for this conversion.

Comparison of the TXT and ASS file formats
Property .TXT Plain Text File .ASS Advanced SubStation Alpha
Open standard Yes Partly open
Compression Uncompressed Uncompressed
Typical file size Very small Small
Opens in a web browser Yes, natively No
Further editing Easy Easy
Metadata support None Basic
Plain-text readable Yes Yes
Best used for Data exchange Editing and post-production
Introduced — 1998
Developer — Pavlov company / community (originally by Kotus)
MIME type text/plain text/x-ass

Additional formats for
txt file conversion

Reverse conversion

Convert to ass from
other formats

Share on social media: