Text Toolbox
Text Toolbox is an integrated browser text utility that consolidates the most common cleanup, extraction, and formatting operations into a single page. Messy text from a webpage, lists of fields, or content that needs bulk reordering — all handled in a few clicks.

What problems does it solve?
- Extract specific content: pull URLs, JSON keys, pattern-matching fields from a large body of text
- Clean up noise: strip ads, citation residue, HTML tags, blank lines
- Tidy terminal-copied text: strip the quote bars and hard line wraps from Claude Code / terminal output and restore paste-ready paragraphs
- Batch formatting: add prefixes/suffixes to each line — Markdown lists, CSV, SQL
INclauses - Normalize case: upper, lower, title case, sentence case
- Sort & organize: asc/desc sort, reverse, dedup (with an exclusion list)
- Complex pipelines: filter → regex → affix multi-step cleanups
Page layout
The page is a two-column layout. The main column carries the primary flow; the side rail holds the more specialized panels:
Main column
- Source Text — input area + file upload + the "Smart Trim" toggle (bottom right)
- LINES — organize / filter / prefix-suffix rows, with parameter inputs inline
- CASE — the four case-conversion buttons
- Result pane (appears once there's output) — copy / export / format / move-to-source
Side rail
- REGEX — regex input + 4 presets + 3 flags + Run Match / Remove Matches / Batch Task Extract
- FORMAT — Format, Smart Split, CLI Text Cleanup, JSON Beautify
- LINKS — Common Link Replace, Weibo Link Convert, Custom Operation
Line operations and case conversion are the highest-frequency actions, so they sit between input and result; regex, whole-text reflow, and link converters are more specialized and live in the rail so the result pane stays on screen.
Source Text card
- Paste: directly into the textarea
- Upload: drag-and-drop or click; TXT, MD, JSON, CSV and other rich-text formats supported
- Smart Trim toggle (default on): when on, almost every processing button first trims per-line whitespace and drops empty lines; when off, the original line structure is preserved
REGEX panel (side rail)
- Regex input: any JavaScript regex pattern
- 4 common presets (CheckableTags): one click fills in the regex and sets the appropriate flags
- URL (no params): matches plain
https://URLs without trailing punctuation - URL (loose): catches URLs containing brackets, semicolons, more punctuation cases
- Remove Index: strips leading "1. ", "2、", "3) " line numbers
- Extract JSON Key: pulls every key name out of a JSON blob (multiline)
- URL (no params): matches plain
- 3 flags: global (g) / multiline (m) / case-insensitive (i)
- Three buttons:
- Run Match: extract every match and list them; toast shows the count
- Remove Matches: delete matches from the source; also collapses 3+ newlines to 2
- Batch Task Extract: a URL → number pairing pipeline — finds each line's URL, then scans for numbers attached to keywords like 点赞 / 转发 / 评论 / 播放 / 差 / 曝光 / 阅读 (Chinese social-media metrics) and outputs CSV grouped by metric
LINES panel (main column)
Organize
- Sort Ascending / Descending: alphabetical (Unicode order); click toggles direction
- Reverse: invert line order
- Adjacent Swap: swap line pairs end-to-end (input must have an even line count; built for classification tasks where the number sits on the line above the link)
- Dedup: drop fully duplicate lines
- Exclude (the input on the same row): entries listed here are ignored by Dedup and persist locally. E.g. add
HomeandAboutto preserve those headings across repeated occurrences
Filter
- Type comma-separated keywords, e.g.
ad,promo,channel - Click "Filter Lines": delete every line containing any of the keywords; result lands in the Result card
Prefix / Suffix
- Prefix input: prepended to every line (empty by default)
- Suffix input: appended to every line (defaults to
,100, edit freely) - Regex Extract + Affix: the button on the right of the same row — extracts using the regex from the REGEX panel, then batch-applies prefix/suffix in one step
- Example: prefix
-, empty suffix → convert plain text into a Markdown list - Example: prefix
', suffix',→ convert a list of strings into a SQLIN (...)clause
CASE panel (main column)
Four buttons, applied line by line across the whole text:
- UPPERCASE / lowercase
- Title Case: capitalize the first letter of every word
- Sentence case: capitalize the first letter of every sentence, lowercase the rest
FORMAT panel (side rail)
- Format: drop blank lines + smart trim (or not, depending on the toggle)
- Smart Split: uses
compromiseEnglish NLP for sentence boundaries + Chinese paragraph rules - CLI Text Cleanup: built for text copied out of Claude Code / a terminal — strips leading quote bars (
▎ ▌ │) and indentation, reflows lines hard-wrapped at the terminal width back into full paragraphs (CJK lines join directly, Latin lines get a single space), and keeps list items and code blocks line-by-line. The result is auto-copied to the clipboard, ready to paste - JSON Beautify: lenient parse (handles unquoted keys, single quotes, comments) + 2-space indent
LINKS panel (side rail)
- Common Link Replace: replace every
https://huggingface.cowithhttps://modelscope.cn/models— useful for switching HuggingFace links to a China-accessible mirror - Weibo Link Convert: batch-convert mobile Weibo (
m.weibo.cn) links into PCweibo.comlinks plus the author's profile URL. Output is grouped into PC links / author profiles / unresolved; links carrying a uid resolve locally, detail pages need a network lookup for uid/bid, and each failure is annotated with its reason (no uid in link, uid/bid not found on the page, request failed) - Custom Operation: extract all URLs via the "URL (loose)" preset + reverse order + join with commas (handy for reverse-lookup URL lists)
Result pane
When something has been produced, the result pane surfaces:
- Copy: one-click clipboard copy
- Export: download as
text-processed.txt - Format: clean up extra blank lines in the result
- Result → Source: pipe the result back into the input for the next step (great for multi-stage pipelines)
Tips
Getting started
- Try the presets first — REGEX panel in the side rail → click a tag
- Test on a small slice before processing critical data
- Stacked operations: filter → extract → affix solves most cleanups in three clicks
Power moves
- Keep Smart Trim on for almost every workflow
- Chain multi-step pipelines via "Result → Source"
- When regex stumps you, describe the problem + sample input + expected output to ChatGPT/Claude
Runs entirely in your browser — no data is uploaded — safe for sensitive material.

