Hongmu Notes

🧊 Compress text into one line

Remove line breaks and half-width spaces, and put multiple lines of content into one line.

Compress text into one line

Instructions for use

  • Automatically compress after pasting or typing content. You can also click "Compress" to execute it again.
  • Only carriage returns, line feeds, and half-width spaces are processed; tabs and full-width spaces are retained.
  • The status line gives the number of characters before and after compression for easy verification.

remove spaces

Half-width spaces are very common between English and numbers. Removing them can make fixed-length fields more regular and length statistics more accurate.

📌 Will full-width spaces be removed?

No. Only half-width spaces (ASCII 0x20) are processed; full-width spaces and tab characters will be retained as they are. If necessary, use replacement to convert full-width spaces into half-width spaces and then compress them.

🔒 Dealing with location and privacy

Compression is completed locally in the browser. The input and results are not uploaded to the server or written to local storage. They are cleared when the page is refreshed. Input and results are displayed separately and can be compared verbatim; the content will not remain after closing the page.

📌 Compression rules

Make three replacements according to the original implementation: first remove the carriage return (CR), then remove the line feed (LF), and finally remove the half-width spaces, and the remaining characters are spliced in the original order. Therefore, compression is "predictable": only these three types of characters are deleted, no other characters are changed, and no case or punctuation processing is performed; the length reduction value is exactly equal to the number of deleted characters, and you can check it yourself with the length of the status line before and after.

All keywords and tutorials 12

❓ FAQ

What should I do if there are no spaces between English words?
Compression will remove all half-width spaces and English words will be connected together; if you only want to clean up excess spaces, please use replacement tools instead.
Will the spaces in the numbers be removed?
Yes. This is perfect for cleaning up the spaces in numbers copied from tables.
Applicable scenarios for removing spaces
Clean up spaces in numbers and numbers, prepare fixed-length fields, and do preprocessing before length verification.