Skip to content
UniKit

Plain text notepad

A minimal plain-text notepad: the content is auto-saved to browser localStorage as a versioned payload (survives refresh, tolerates corruption), one click strips pasted HTML tags, entities and extra whitespace, live character, line, word, CJK and UTF-8 byte counts, plus a .txt export.

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

Plain text

No save button needed: the content is staged in this browser (localStorage) and survives a refresh. Nothing is uploaded to any server.

What clearing removes

Strip HTML tags<br> and </p> become line breaks; other tags are deleted.
Decode HTML entitiesTurns &nbsp; &amp; &#39; back into real characters (common named plus numeric entities).
Collapse extra spacesRuns of spaces, tabs and full-width spaces become a single space.
Trim each line

Characters

0

Lines

0

Non-empty lines

0

Words

0

CJK characters

0

UTF-8 bytes

0

What this tool does

  • Turn text copied from a web page, Word or a rich editor into clean plain text by stripping HTML tags and extra whitespace before pasting it elsewhere
  • Jot down something temporary: the content is staged in this browser, survives a refresh or an accidental tab close, and can be exported as a .txt file
  • Check the counts first: characters, non-empty lines, CJK characters and UTF-8 bytes tell you whether the text fits a 140- or 500-character limit

Example

Input

<p>Hello&nbsp;<b>World</b></p>


second line  

Output

Hello World

second line

What “Clear formatting” produces: </p> becomes a line break, all tags are removed, &nbsp; turns into a regular space, blank lines collapse to one, line edges are trimmed — 22 characters fewer.

Frequently asked questions

Where is the content stored? Is anything uploaded?

Only in this browser’s localStorage (key unikit:textarea:draft:v1, payload versioned with v=1). The page never uploads the text and has no server to write to; another browser, another device or a cleared browser profile means no draft, so use “Export .txt” for anything you need to keep.

What exactly does “Clear formatting” remove?

It turns <br> and closing block tags (</p>, </div>, </li>, </h1>–</h6>) into line breaks and deletes every other tag; drops zero-width characters and the BOM; decodes common named entities and all numeric entities (&nbsp;, &amp;, &#39;, &#x4e2d;); collapses runs of spaces, tabs and full-width spaces into one space; trims each line; and collapses blank-line runs to at most one. It does not touch Markdown markers (** , ## , `) because those are text, not HTML.

Why are some entities not decoded?

Only about a dozen common named entities are built in (amp/lt/gt/quot/apos/nbsp/copy/reg/mdash …) plus every numeric entity (&#39; and &#x27;). Rare named entities such as &notin; are left untouched on purpose: leaving something unchanged is safer than rewriting it into the wrong character.

Is there a size limit for the draft? Why stop at 512 KiB?

localStorage usually grants only a few megabytes per site and throws when it fills up. The tool measures the serialized UTF-8 size and stops auto-saving past 512 KiB, with a visible warning instead of a silent failure; the content can still be copied or exported. Clearing formatting has its own 5 MiB output cap.

What exactly do I get from the export?

The file is named plain-text.txt and contains the editor content byte for byte (UTF-8, no BOM, no cleaning). It is independent of “Clear formatting”: clear first, then export, if you want the cleaned text in the file.

Keywords:plain text notepadonline text editorstrip formattingtextarea

Related tools