Newline & Whitespace Tool
FAQ
What is the Newline & Whitespace Tool for?
This is a text-cleanup tool for developers, writers, and anyone who needs consistent formatting. It helps normalize messy line endings, indentation, and whitespace so your text is cleaner, easier to review, and ready to paste into editors, repositories, or other systems.
What are DOS (CRLF) and Unix (LF)?
They are two different ways to mark line breaks in text files. CRLF means carriage return + line feed and is common on Windows. LF means line feed only and is common on Linux, macOS, and most code repositories. They usually look the same on screen, but the underlying characters are different, so normalizing them matters for cross-platform editing and Git workflows.
What is the processing order?
- First, the tool applies the line-ending rule you selected.
- Then it trims trailing whitespace if enabled.
- Next, it removes or compresses blank lines based on your settings.
- Finally, it converts indentation between tabs and spaces if requested.
- Whitespace visualization only affects what you see, not what gets copied.
What do the buttons, dropdowns, and toggles do?
- Process Text: runs the cleanup using the current settings.
- Copy: copies the processed output to the clipboard.
- Clear: empties the input and output so you can start over.
- Line endings dropdown: choose No conversion, DOS (CRLF) → Unix (LF), or Unix (LF) → DOS (CRLF).
- Indent conversion dropdown: choose No indent change, Tabs → Spaces, or Spaces → Tabs (line-start only).
- Tab size dropdown: sets how many spaces one tab should represent; No change skips indent conversion.
- Compress consecutive blank lines: when enabled, multiple blank lines are reduced to a chosen limit.
- Keep at most dropdown: decides whether to keep 1 or 2 blank lines after compression.
- Trim trailing spaces: removes extra spaces and tabs at the end of each line.
- Trim blank lines at start/end: removes leading and trailing blank lines.
- Trim trailing blank lines: removes only the final run of blank lines.
- Visualize whitespace: see the dedicated FAQ below for the icon rules and copy behavior.
Will it change the actual words in my text?
No. It only adjusts line endings, indentation, and whitespace, not the visible content itself.
Why use whitespace visualization?
- Spaces show as ·.
- Tabs show as ➔.
- Line feeds show as ↵.
- Carriage returns show as ␍.
- Other control characters show as Unicode escapes.
- Visualization does not affect copying; the Copy button always uses the raw processed text.
Is my text uploaded anywhere?
No. Everything runs locally in your browser, which makes it suitable for code snippets, configuration files, logs, and documentation.
When is this tool most useful?
- Before committing code, to normalize line endings and remove trailing whitespace.
- When tracking down invisible characters that break formatting or diffs.
- When combining text from different operating systems.
- When cleaning Markdown, config files, scripts, logs, and docs.