Skip to content
UniKit

Google Translate tag cleaner

Unwrap the font tags and goog-* highlight spans that Google Translate injects into pages, keep the text and the rest of the markup, and see tag, empty-tag and byte counts. Nothing is uploaded.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Translated HTML
Unwrap font tagsRemove <font …> and </font>, keeping the content
Unwrap injected spansRemove spans whose class starts with goog- (such as goog-text-highlight)

Cleaned HTML

Parsed character by character using HTML tag rules; comments and script/style content are untouched.

Paste HTML to see the cleaned result

What this tool does

  • Clean up HTML copied from a page that was machine-translated, removing wrappers such as <font class="google-src-text">
  • Unwrap the goog-text-highlight spans that translation injects before pasting into a CMS, email template or document
  • Check how many font tags and empty tags were removed, and how many bytes that saved

Example

Input

<font class="google-src-text">Hello</font> <font>world</font>

Output

Hello world

Both font wrappers (4 tags in total) are unwrapped; the text inside and the rest of the markup are kept as written.

Frequently asked questions

Is it an HTML beautifier or formatter?

No. It only unwraps font tags (and optionally goog-* spans). The text inside, other tags and attribute order are left as written; it does not re-indent, fix tags or validate markup. The only extra step is trimming the ends of the output.

Can I use it as an HTML sanitizer?

No. It deletes text using HTML tag rules only: it does not parse CSS/JavaScript, does not handle href="javascript:", data: URLs, event attributes or obfuscated variants, and applies no allowlist. Use a real sanitizer such as DOMPurify together with server-side validation.

What happens when the font tags do not balance?

It still produces output, but it does not pretend everything is fine: the result reports the number of unmatched <font> and </font> tags and shows a warning so you can inspect the structure. Extra tags are removed one by one instead of a regex replacing the whole document unpredictably.

Which patterns are not recognised?

A <font> inside a comment <!-- --> is comment text and is left alone. A <font> inside an attribute value (for example data-x="<font>") is not a tag. The body of script/style is copied verbatim, so strings in JavaScript are never treated as tags. A self-closing <font /> counts as an empty tag.

Which spans are treated as translation wrappers?

Only spans whose class list contains a class starting with goog- (for example goog-text-highlight or goog-te-…). Ordinary spans from your own markup are untouched, and the behaviour can be switched off in the UI.

Keywords:谷歌翻译标签处理google-src-textgoog-text-highlight去掉font标签网页翻译清理google translate font tagsremove font tagsweb-translate

Related tools