About Text Workbench
Text Workbench is a two-pane workspace for plain text: you type or paste into the source editor on the left, and the result on the right updates live as you compose transformations from the menu bar. A counter above the panes reports characters, non-whitespace characters, words, lines, and UTF-8 bytes while you work. It is deliberately plain text only — there are no fonts, colours, or styles to lose.
A workbench beats a pile of single-purpose converters because the transformations compose, and they compose in a fixed order: writing format first, then the line-start and line-end edits, then the line ordering, with the line-ending choice applied last. That order is worth internalizing. A prefix you add is untouched by the case conversion, because the conversion already ran, and sorting sees the prefixed lines rather than the original ones. Most surprises from a chain of transformations are really surprises about this sequence.
How to use this developer tool
- Paste or type plain text into the source editor. The counter and the result pane update together, without a run button.
- Open the Transform menu to pick a writing format: lower, upper, sentence, title, camel, Pascal, snake, constant, kebab, COBOL, train, swapped, alternating, inverse alternating, or random case.
- Open the Lines menu for the rest: line order, line endings, and the line-start and line-end editors that add or remove a literal string on every line.
- Read the result pane as you go. Each menu change re-runs the whole chain from the original source, so nothing accumulates and you can back any single step out.
- Copy the result with the button on the result pane, or use Clear in the Edit menu to reset both the text and every setting at once.
Worked example: three transformations in one pass
A list of column labels needs to become camelCase identifiers, each prefixed as a Markdown list item, and sorted alphabetically. Set the writing format to camelCase, set the line-start editor to add the two characters "- ", and set line order to ascending.
order total
user id
created at- createdAt
- orderTotal
- userIdThe counter for this source reads 30 characters, 25 non-whitespace, 6 words, 3 lines, 30 bytes. The order of operations is visible in the output: the prefix was added after the case conversion, so the dash and the space were not folded into the identifier, and the sort ran after the prefix was added, so it compared the already-prefixed lines.
Every writing format, on one sample line
The sample is "parse HTTP response (v2)". The formats split into two families: the ones that rebuild a line out of its words drop punctuation and separators along the way, while the ones that map characters individually keep every character.
| Format | Result | Punctuation |
|---|---|---|
| lowercase | parse http response (v2) | Kept |
| UPPERCASE | PARSE HTTP RESPONSE (V2) | Kept |
| Sentence case | Parse http response (v2) | Kept |
| Title Case | Parse Http Response V2 | Dropped |
| camelCase | parseHttpResponseV2 | Dropped |
| PascalCase | ParseHttpResponseV2 | Dropped |
| snake_case | parse_http_response_v2 | Dropped |
| CONSTANT_CASE | PARSE_HTTP_RESPONSE_V2 | Dropped |
| kebab-case | parse-http-response-v2 | Dropped |
| COBOL-CASE | PARSE-HTTP-RESPONSE-V2 | Dropped |
| Train-Case | Parse-Http-Response-V2 | Dropped |
| Swap case | PARSE http RESPONSE (V2) | Kept |
| Alternating case | pArSe hTtP ReSpOnSe (V2) | Kept |
| Inverse alternating | PaRsE HtTp rEsPoNsE (v2) | Kept |
| Random case | not reproducible; drawn from secure randomness | Kept |
Troubleshooting
Title case removed the punctuation and split a contraction.
Why it happens Title, camel, Pascal, snake, constant, kebab, COBOL, and train case all rebuild the line from its words, and a word boundary is any character that is neither a letter nor a digit. An apostrophe is therefore a boundary, and the surrounding punctuation has nowhere to go.
Fix Expect "hello, world! it's here." to become "Hello World It S Here". Use sentence case when you want capitalization without losing punctuation; it lowercases the line and then capitalizes after a full stop, question mark, or exclamation mark, leaving everything else alone.
An acronym comes out as one lowercase run in snake or kebab case.
Why it happens Word splitting inserts a boundary where a lowercase letter or digit is followed by an uppercase letter. A run of capitals has no such boundary inside it, so parseHTTPResponse is read as two words, not three.
Fix Expect parseHTTPResponse to become parse_httpresponse. Put a space or an underscore in the acronym before converting — parse HTTP Response works — or fix the handful of affected identifiers by hand afterwards.
The output uses Windows line endings even though the line-ending setting is Preserve.
Why it happens Preserve inspects the original source and picks one separator for the whole document. If the source contains even one CRLF, every line in the result gets CRLF.
Fix This is usually what you want, since a mixed-ending file is almost always an accident. Choose LF or CRLF explicitly when the destination is strict, for example a shell script that must not carry carriage returns.
Sorting puts item100 before item9, and the character count disagrees with the byte count.
Why it happens Lines are sorted with locale-aware string comparison, which has no notion of embedded numbers, so item1, item10, item100, item9 is the correct string order. Separately, the counter reports characters as Unicode code points and bytes as the UTF-8 encoding, so any non-ASCII text makes the two numbers diverge.
Fix Zero-pad numeric suffixes before sorting if you need numeric order. For the counters, remember the relationship: "naive cafe" with its accents and a rocket emoji is 12 characters and 17 bytes, and it is the byte figure that matters for a database column limit.
When this tool is the right choice
- Turning a column of labels, headings, or spreadsheet cells into identifiers in a consistent case.
- Preparing a list for pasting elsewhere: sort it, add a bullet or a quote marker to every line, and normalize the line endings in one pass.
- Checking a value against a length limit, where the byte count rather than the character count is what the database will enforce.
- Stripping a repeated prefix — an indent, a log timestamp marker, a comment character — from every line of a pasted block.
When to use something else
- Find and replace, or any pattern-based edit. The line-edge editors match a literal string at the start or end of a line only; the Regular Expression Tester handles patterns and replacements.
- Comparing two texts. Use the Text Compare & Diff Checker, which shows what changed between versions rather than transforming one of them.
- Deduplicating a list. There is no unique option here; paste the list into the List Compare Tool with the second pane empty and read the unique set from the first result.
Privacy and data handling
Everything runs in this browser tab. The counter, the transformations, and the sort all execute locally, and very large documents go to a background worker in the same tab rather than to a server. Nothing is stored between visits, so a reload discards the source. Shuffle and random case draw from the browser's cryptographic random source, so neither result can be reproduced.
Related developer tools
Frequently asked questions
In what order are the transformations applied?
Writing format first, then the line-start and line-end edits, then the line ordering, and the line-ending conversion last. The whole chain re-runs from the original source on every change, so settings never stack up and removing one step restores exactly what came before it.
Why does the word count look wrong for Chinese or Japanese text?
A word is counted as a run of letters, digits, underscores, apostrophes, and hyphens. Chinese characters are letters, so an unspaced run of them counts as a single word — the seven characters of a short Chinese phrase register as one. The character and byte counts remain accurate for that text.
Why is "don't re-run" counted as two words?
The apostrophe and the hyphen are both treated as word characters, so neither splits its word. That matches how English prose counts, and it is a deliberate difference from the word splitting used by the case conversions, where both characters are boundaries.
What is the difference between characters and bytes?
Characters counts Unicode code points, so an emoji counts as one even though it occupies two UTF-16 units internally. Bytes counts the UTF-8 encoding, where an ASCII character is one byte, an accented Latin letter is two, and a Chinese character is three. Database limits and HTTP headers are almost always specified in bytes.
Can I undo a transformation?
Set that menu option back to "no change" and the result is rebuilt from the untouched source, so nothing needs undoing. The source editor keeps your text exactly as you pasted it; only the result pane reflects the transformations.
Why can shuffle and random case not be reproduced?
Both draw from the browser's cryptographic random source, so there is no seed to reuse. Copy a result you want to keep before changing anything else, because re-running produces a different arrangement.
Does the workbench handle a very large file?
Counting and sorting move to a background worker once the text passes roughly 250,000 characters, which keeps the editor responsive. The whole document still lives in this tab's memory, so a file of many megabytes is better handled by a command-line tool.