Text Minifier
TX-58Paste plain text and shrink it by collapsing runs of spaces and tabs, trimming each line, and joining or dropping line breaks. A second view shows how many bytes you saved.
Runs in your browser. Nothing is uploaded.
Text
Minified text
How to use it
- Paste your text into the input box.
- Choose what to do with spaces: collapse runs into one space and trim each line.
- Choose what happens to lines: join with a space, join with nothing, keep lines but drop empty ones, or keep every line.
- Press Minify text, or Show size saved for the UTF-8 byte count before and after.
What minifying plain text means
For plain text the tool only changes spacing. It never shortens words, removes punctuation or changes capitals. Collapse turns each run of spaces and tabs into one space, Trim removes spaces at the start and end of each line, and the line option decides what happens to line breaks. Empty lines are dropped by every line option except Keep every line.
Joining lines
Join with a space turns the text into one line and is the usual choice for sentences and paragraphs. Join with nothing glues the last word of a line to the first word of the next, so use it only for fragments such as split codes, hex values or base64 text. Keep lines, drop empty ones removes blank lines and leaves everything else on its own line, which suits lists and logs.
Sizes and other formats
The size view counts UTF-8 bytes, so accented letters and emoji count as more than one byte each, and the saving is shown in bytes and as a percentage. Plain text does not shrink as much as code, because most of its bytes are letters. For HTML, CSS, JSON, XML or SQL, use the matching minifier, which understands the syntax and can remove comments and safe whitespace without breaking the code.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Paste the text to minify. | The input box is empty or holds only spaces. | Paste or type the text first. |
Questions people ask
How do I minify plain text?
Paste it, keep Collapse runs of spaces and Trim each line ticked, choose Join with a space and press Minify text. You get one line with single spaces between words.
Does minifying text remove words or punctuation?
No. Only spaces, tabs and line breaks change when you minify plain text. Words, punctuation and capital letters stay exactly as written, so the meaning and wording of your text are never altered.
How do I see how many bytes I saved?
Press Show size saved instead of Minify text. It prints the original and the minified size in UTF-8 bytes and shows the saving as a byte count and as a percentage of the original size.
Can I keep line breaks but remove empty lines?
Yes. Set Lines to Keep lines, drop empty ones. Each non-empty line stays on its own line, blank lines are removed, and spaces inside lines are still collapsed if that option is ticked.
Is this the same as minifying code?
No. Code minifiers understand syntax and can remove comments and shorten names. This tool treats the input as plain text and only changes whitespace. Use the HTML, CSS or SQL minifier for code.
About this tool
This minifier is for plain text, so it only changes spacing: it never shortens words or removes punctuation. Collapse turns each run of spaces and tabs into one space, Trim removes spaces at the start and end of each line, and the line option decides what happens to line breaks. Joining with nothing glues the last word of a line to the first word of the next, so use a space unless the lines hold fragments such as hex digits. Empty lines are dropped by every option except Keep every line. The size view counts UTF-8 bytes before and after. For HTML, CSS or SQL use the matching minifier, which understands that code. The work happens in your browser and nothing is uploaded.