Skip to main content
SubtitleMatrix

Remove Underline Tags from Subtitles

Text and stylingStrip markup and tags
Or paste subtitle text

Options

One box, seven choices, and each choice has a page of its own. Italic, bold, underline and colour remove that one kind of range and leave the rest of the line's styling alone. All removes every range the tool models — those four plus karaoke timing — while leaving everything else in the text untouched. HTML does the same and then also sweeps out the angle-bracket markup that was left in the text because the tool does not model it, such as VTT's <v Bob> speaker tags and <c.className>. ASS does the same for override blocks instead, clearing the {...} codes that were not recognised at parse time, such as {\fad(500,500)}. This page fills the box in with the choice its title names and lists no other.

Which frame rate the timings are counted in. On the format pages this is what MicroDVD needs, because it stores timing as frame numbers. On the frame rate pages it is the rate the file was timed against — the version the subtitles were made for — and the page's second box takes the rate of the video you are going to use them with. 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60 are the common ones. Getting it wrong shifts the whole timeline, and on the frame rate pages it shifts it by a ratio rather than by a fixed amount.

This page removes underlined ranges from a subtitle file without touching the text, the timecodes or any of the other styling on the same line. Drop the file in, run it, and the words come back as they were written with the underline markup gone — and only the underline markup, so a line that was also italic comes back italic.

Underlining is the least decorative of the three common emphasis styles, and what it usually means is that somebody was marking something up rather than designing something. A legal captioner underlines the names of the parties; a medical file underlines a drug name; a translator underlines a term that needs a second look; a reviewer underlines the words whose timing is in doubt. Those marks are working notes on a file, and the moment the file is delivered they stop being useful — a reader has no way to tell an underlined word from a marked one.

That cuts the other way too, and it is worth saying before you run it: once the underlines are gone, nothing in the file records which words were marked. If you need that list, copy it out of the file first. Underline is also unusual in that some delivery specifications ban it outright, because an underline can be confused with a character, which is exactly the risk a working mark carries into a finished file.

SRT, WebVTT, SBV and SAMI write underline as `<u>` and `</u>`, ASS and SSA as `{\u1}` and `{\u0}`, TTML as a span with an underline text decoration. Nothing is uploaded; the file is read and written inside the browser tab, and a file with no underlines in it comes back byte for byte.

Examples

Names underlined for a delivery

Input

1
00:00:01,000 --> 00:00:02,000
The <u>defendant</u> was not present.

2
00:00:03,000 --> 00:00:04,000
<u>Exhibit B</u> is a letter.

Output

1
00:00:01,000 --> 00:00:02,000
The defendant was not present.

2
00:00:03,000 --> 00:00:04,000
Exhibit B is a letter.

The underlined words keep their spelling and their place in the sentence, and only the tag pairs are gone. Nothing in the output shows that `defendant` and `Exhibit B` were ever marked, which is the point of the run and also the thing to check before you run it.

A WebVTT file with both a class tag and an underline

Input

WEBVTT

00:00:01.000 --> 00:00:02.000
<c.lawyer>The <u>defendant</u></c> was not present.

Output

WEBVTT

00:00:01.000 --> 00:00:02.000
<c.lawyer>The defendant</c> was not present.

The underline goes and `<c.lawyer>` stays, because a class name is not a styling range — it is a name the player looks up in the page's own stylesheet. Leaving it is what the tool can honestly do with a tag it never modelled, and the page that sweeps those out says so in its title.

An ASS file with an underline beside an italic

Input

[Script Info]
Title: underline

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

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:02.00,Default,,0,0,0,,{\u1}hello{\u0} {\i1}there{\i0}

Output

[Script Info]
Title: underline

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

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:02.00,Default,,0,0,0,,hello {\i1}there{\i0}

The same removal in ASS syntax: `{\u1}` and `{\u0}` disappear and the italic pair right beside them is left exactly as the file wrote it. Two runs sit next to each other on the line and only one of them is being asked for, which is the case the tool has to get right on a real file.

Frequently asked questions

Is an underline written the same way in every subtitle format?

No, though all of them mean the same thing. SRT, WebVTT, SBV and SAMI use a pair of `<u>` tags, ASS and SSA switch it on with `{\u1}` and off with `{\u0}`, and TTML wraps the words in a span with an underline decoration. The file is read for the format it really is, so an `.srt` file that is actually WebVTT still has its underlines found.

Will removing underlines change the text or the timing of my file?

Neither. The page rewrites markup and nothing else: cue starts and ends keep their millisecond values, the order of the cues is the file's own, and the number of cues does not change. The characters are byte-identical apart from the tag characters, so no word is respelled, no line is joined to another and no punctuation is added.

Do I lose the information about which words were underlined?

Yes, and that is the one thing to think about before running it. The underline is the only record that a word was marked, so once it is gone the file no longer distinguishes a marked word from an ordinary one. If the marks matter — a reviewer's list of terms to check, a captioner's list of party names — copy them out of the file first, then run the page.

Why is underlining discouraged in subtitle delivery specifications?

Because an underline attaches itself to the letters and can be read as part of them. Descenders collide with the line, and at small sizes a underlined character is easy to mistake for a different one — which is a real cost in a medium that is read once, at speed, by someone who cannot pause to look again. That is why a file full of working marks is worth cleaning before it goes out.

Can I remove underlines from part of the file only?

This page works on the whole file, so no. If only some cues need cleaning, the reliable route is to split the file first and run the page on the part that needs it, or to run the page and then put the tags back on the cues you wanted to keep. A single dropped file carries no instruction about which cues to touch.

What happens to bold, italic and colour on a line whose underline is removed?

They stay. Each kind of styling is a separate range, so a line that is underlined and bold comes back bold and not underlined, and a line that is underlined inside an italic run keeps the italic exactly as far as the file had it. Removing all of them together is Strip All Formatting from Subtitles, which is a different job from taking one of them out.

Related tools