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 a skip list)
- Many lines into one: join a column with any separator, ready to paste into a spreadsheet or query
- 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 — sort / delete / merge / affix 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 / Extract links with metrics
- FORMAT — Format, Smart Split, CLI Text Cleanup, JSON Beautify
- LINKS — HuggingFace → ModelScope, Weibo Link Convert, Extract links reversed
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
- Extract links with metrics: a URL → number pairing pipeline — finds each line's URL, then grabs the number next to it, groups by metric, and outputs one
link,numberper line. The metric words are seven hard-coded Chinese terms — 点赞 / 转发 / 评论 / 播放 / 差 / 曝光 / 阅读 — so it only works on text containing those Chinese words
LINES panel (main column)
The panel title spells out its four groups — sort · delete · merge · affix — one row each, with parameter inputs inline.
Sort
- Sort Ascending / Descending: alphabetical (Unicode order); click toggles direction
- Reverse: invert line order
- Adjacent Swap: swaps lines in pairs. Blank lines are removed first (the remaining count must be even, otherwise it errors), a blank line is put back between each pair, and the result is copied automatically. Built for data where the number sits on the line above its link, feeding "Extract links with metrics"
Delete
- Deduplicate: drop fully duplicate lines
- Skip when deduping (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 - Delete matching lines: type comma-separated keywords in the input to its right (e.g.
ad,promo,channel) and every line containing one of them is removed, the rest kept
Merge
- Merge into one line: join multiple lines into a single line
- Join with (the input on the same row): what goes between the lines. Blank joins them directly, and escapes like
\twork - Example: set it to
,to turn a column intoA, B, C; set it to\tfor a tab-separated string you can paste straight into one Excel row
Affix
- 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)
- HuggingFace → ModelScope: swaps the
https://huggingface.coprefix forhttps://modelscope.cn/models— useful where HuggingFace is hard to reach. It does not check that the target exists, sodatasets,spaces, and other non-model paths turn into dead links; it also drops blank lines and copies the result automatically - 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) - Extract links, reversed: pull every link out, reverse their order, join them with commas on one line, and copy it automatically (handy for reverse-lookup URL lists). If the Delete row's keyword box has content, matching lines are removed first
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.

