pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

squeeze Collapse extra whitespace and blank lines

Aa Text
Input0 chars
Output0 chars

Examples

Collapse extra whitespace and blank lines

Usage
"too   many   spaces



and   blank   lines" | squeeze

Clean up a draft email with messy spacing

Usage
"Dear   Customer,



Thank you  for  your   order.



Best  r..." | squeeze

Fix double-spaced text pasted from a PDF

Usage
"The  quick   brown   fox



jumps  over   the



lazy   dog." | squeeze
View source
(input)=>input.replace(/[ \t]+/g, " ").replace(/\n{3,}/g, "\n\n")